xref: /llvm-project/llvm/test/MC/CSKY/invalid-attribute.s (revision af20c1c1298d15f36470cd9d5b2cccb3b9b59c30)
1## Negative tests:
2##  - Feed integer value to string type attribute.
3##  - Feed string value to integer type attribute.
4##  - Invalid arch string.
5
6# RUN: not llvm-mc %s -triple=csky -filetype=asm 2>&1 | FileCheck %s
7
8.csky_attribute CSKY_UNKNOWN
9# CHECK: [[@LINE-1]]:17: error: attribute name not recognised: CSKY_UNKNOWN
10
11.csky_attribute CSKY_ARCH_NAME
12# CHECK: [[@LINE-1]]:31: error: expected comma
13
14.csky_attribute CSKY_ISA_FLAGS
15# CHECK: [[@LINE-1]]:31: error: expected comma
16
17.csky_attribute CSKY_ARCH_NAME, "foo",
18# CHECK: [[@LINE-1]]:38: error: expected newline
19
20.csky_attribute CSKY_ISA_FLAGS, 42,
21# CHECK: [[@LINE-1]]:35: error: expected newline
22
23.csky_attribute CSKY_ARCH_NAME, "foo"
24# CHECK: [[@LINE-1]]:33: error: unknown arch name
25
26.csky_attribute CSKY_CPU_NAME, "foo"
27# CHECK: [[@LINE-1]]:32: error: unknown cpu name
28
29.csky_attribute CSKY_DSP_VERSION, "1"
30# CHECK: [[@LINE-1]]:35: error: expected numeric constant
31
32.csky_attribute CSKY_VDSP_VERSION, "1"
33# CHECK: [[@LINE-1]]:36: error: expected numeric constant
34
35.csky_attribute CSKY_FPU_VERSION, "1"
36# CHECK: [[@LINE-1]]:35: error: expected numeric constant
37
38.csky_attribute CSKY_FPU_ABI, "1"
39# CHECK: [[@LINE-1]]:31: error: expected numeric constant
40
41.csky_attribute CSKY_FPU_ROUNDING, "1"
42# CHECK: [[@LINE-1]]:36: error: expected numeric constant
43
44.csky_attribute CSKY_FPU_DENORMAL, "1"
45# CHECK: [[@LINE-1]]:36: error: expected numeric constant
46
47.csky_attribute CSKY_FPU_EXCEPTION, "1"
48# CHECK: [[@LINE-1]]:37: error: expected numeric constant
49
50.csky_attribute CSKY_FPU_NUMBER_MODULE, 4
51# CHECK: [[@LINE-1]]:41: error: expected string constant
52
53.csky_attribute CSKY_FPU_HARDFP, "1"
54# CHECK: [[@LINE-1]]:34: error: expected numeric constant
55