mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 20:16:05 +00:00

Construct LLVM Support module about CSKY target parser and attribute parser. It refers CSKY ABIv2 and implementation of GNU binutils and GCC. https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf Now we only support CSKY 800 series cpus and newer cpus in the future undering CSKYv2 ABI specification. There are 11 archs including ck801, ck802, ck803, ck803s, ck804, ck805, ck807, ck810, ck810v, ck860, ck860v. Every arch has base extensions, the cpus of that arch family have more extended extensions than base extensions. We need specify extended extensions for every cpu. Every extension has its enum value, name and related llvm feature string with +/-. Every enum value represents a bit of uint64_t integer. Differential Revision: https://reviews.llvm.org/D119917
34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
//===-- CSKYAttributes.cpp - CSKY Attributes ------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Support/CSKYAttributes.h"
|
|
|
|
using namespace llvm;
|
|
using namespace llvm::CSKYAttrs;
|
|
|
|
static const TagNameItem tagData[] = {
|
|
{CSKY_ARCH_NAME, "Tag_CSKY_ARCH_NAME"},
|
|
{CSKY_CPU_NAME, "Tag_CSKY_CPU_NAME"},
|
|
{CSKY_CPU_NAME, "Tag_CSKY_CPU_NAME"},
|
|
{CSKY_ISA_FLAGS, "Tag_CSKY_ISA_FLAGS"},
|
|
{CSKY_ISA_EXT_FLAGS, "Tag_CSKY_ISA_EXT_FLAGS"},
|
|
{CSKY_DSP_VERSION, "Tag_CSKY_DSP_VERSION"},
|
|
{CSKY_VDSP_VERSION, "Tag_CSKY_VDSP_VERSION"},
|
|
{CSKY_FPU_VERSION, "Tag_CSKY_FPU_VERSION"},
|
|
{CSKY_FPU_ABI, "Tag_CSKY_FPU_ABI"},
|
|
{CSKY_FPU_ROUNDING, "Tag_CSKY_FPU_ROUNDING"},
|
|
{CSKY_FPU_DENORMAL, "Tag_CSKY_FPU_DENORMAL"},
|
|
{CSKY_FPU_EXCEPTION, "Tag_CSKY_FPU_EXCEPTION"},
|
|
{CSKY_FPU_NUMBER_MODULE, "Tag_CSKY_FPU_NUMBER_MODULE"},
|
|
{CSKY_FPU_HARDFP, "Tag_CSKY_FPU_HARDFP"}};
|
|
|
|
constexpr TagNameMap CSKYAttributeTags{tagData};
|
|
const TagNameMap &llvm::CSKYAttrs::getCSKYAttributeTags() {
|
|
return CSKYAttributeTags;
|
|
}
|