Zi Xuan Wu 3297758901 [CSKY] Enable TargetAsmStreamer/ELFStreamer and support asm directive of csky_attribute
Add support of parsing .csky_attribute directive and emit related target attributes in .csky.attribute section.
It does not emit attribute directive in assembly code, so only emit target attributes in ELF streamer.
In ELF streamer, it handles the header EFlag and the csky_attribute section which contains some attribute items.
The EFlag and attribute items are calculated from feature bits based on Subtarget.
2022-03-08 14:00:38 +08:00

43 lines
1.0 KiB
ArmAsm

## Test llvm-mc could handle .attribute correctly.
# RUN: llvm-mc %s -triple=csky -filetype=asm | FileCheck %s
.csky_attribute CSKY_ARCH_NAME, "ck810"
# CHECK: attribute 4, "ck810"
.csky_attribute CSKY_CPU_NAME, "ck810"
# CHECK: attribute 5, "ck810"
.csky_attribute CSKY_ISA_FLAGS, 0x333f
# CHECK: attribute 6, 13119
.csky_attribute CSKY_ISA_EXT_FLAGS, 0x333f
# CHECK: attribute 7, 13119
.csky_attribute CSKY_DSP_VERSION, 1
# CHECK: attribute 8, 1
.csky_attribute CSKY_VDSP_VERSION, 1
# CHECK: attribute 9, 1
.csky_attribute CSKY_FPU_VERSION, 1
# CHECK: attribute 16, 1
.csky_attribute CSKY_FPU_ABI, 1
# CHECK: attribute 17, 1
.csky_attribute CSKY_FPU_ROUNDING, 1
# CHECK: attribute 18, 1
.csky_attribute CSKY_FPU_DENORMAL, 1
# CHECK: attribute 19, 1
.csky_attribute CSKY_FPU_EXCEPTION, 1
# CHECK: attribute 20, 1
.csky_attribute CSKY_FPU_NUMBER_MODULE, "IEEE 754"
# CHECK: attribute 21, "IEEE 754"
.csky_attribute CSKY_FPU_HARDFP, 1
# CHECK: attribute 22, 1