[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / test / CodeGen / ARM / build-attributes-encoding.s
blob8de3758c0bb4dcb8a7fc2219b600d834cb596eb6
1 // This tests that ARM attributes are properly encoded.
3 // RUN: llvm-mc < %s -triple=arm-linux-gnueabi -filetype=obj -o - \
4 // RUN: | llvm-readobj -S --sd - | FileCheck %s
6 // Tag_CPU_name (=5)
7 .cpu cortex-a8
9 // Tag_CPU_arch (=6)
10 .eabi_attribute 6, 10
12 // Tag_arch_profile (=7)
13 .eabi_attribute 7, 'A'
15 // Tag_ARM_ISA_use (=8)
16 .eabi_attribute 8, 1
18 // Tag_THUMB_ISA_use (=9)
19 .eabi_attribute 9, 2
21 // Tag_FP_arch (=10)
22 .fpu vfpv3
24 // Tag_Advanced_SIMD_arch (=12)
25 .eabi_attribute 12, 2
27 // Tag_ABI_FP_denormal (=20)
28 .eabi_attribute 20, 1
30 // Tag_ABI_FP_exceptions (=21)
31 .eabi_attribute 21, 1
33 // Tag_ABI_FP_number_model (=23)
34 .eabi_attribute 23, 1
36 // Tag_ABI_align_needed (=24)
37 .eabi_attribute 24, 1
39 // Tag_ABI_align_preserved (=25)
40 .eabi_attribute 25, 1
42 // Tag_ABI_HardFP_use (=27)
43 .eabi_attribute 27, 0
45 // Tag_ABI_VFP_args (=28)
46 .eabi_attribute 28, 1
48 // Tag_FP_HP_extension (=36)
49 .eabi_attribute 36, 1
51 // Tag_MPextension_use (=42)
52 .eabi_attribute 42, 1
54 // Tag_DIV_use (=44)
55 .eabi_attribute 44, 2
57 // Tag_DSP_extension (=46)
58 .eabi_attribute 46, 1
60 // Tag_PAC_extension (=50)
61 .eabi_attribute 50, 0
63 // Tag_BTI_extension (=52)
64 .eabi_attribute 52, 0
66 // Tag_also_compatible_with (=65)
67 .eabi_attribute 65, "\006\017"
69 // Tag_BTI_use (=74)
70 .eabi_attribute 74, 0
72 // Tag_PACRET_use (=76)
73 .eabi_attribute 76, 0
75 // Tag_Virtualization_use (=68)
76 .eabi_attribute 68, 3
78 // Check that values > 128 are encoded properly
79 .eabi_attribute 110, 160
81 // Check that tags > 128 are encoded properly
82 .eabi_attribute 129, "1"
83 .eabi_attribute 250, 1
85 // CHECK: Section {
86 // CHECK: Name: .ARM.attributes (7)
87 // CHECK-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
88 // CHECK-NEXT: Flags [ (0x0)
89 // CHECK-NEXT: ]
90 // CHECK-NEXT: Address: 0x0
91 // CHECK-NEXT: Offset: 0x34
92 // CHECK-NEXT: Size: 85
93 // CHECK-NEXT: Link: 0
94 // CHECK-NEXT: Info: 0
95 // CHECK-NEXT: AddressAlignment: 1
96 // CHECK-NEXT: EntrySize: 0
97 // CHECK-NEXT: SectionData (
98 // CHECK-NEXT: 0000: 41540000 00616561 62690001 4A000000 |AT...aeabi..J...|
99 // CHECK-NEXT: 0010: 05636F72 7465782D 61380006 0A074108 |.cortex-a8....A.|
100 // CHECK-NEXT: 0020: 0109020A 030C0214 01150117 01180119 |................|
101 // CHECK-NEXT: 0030: 011B001C 0124012A 012C022E 01320034 |.....$.*.,...2.4|
102 // CHECK-NEXT: 0040: 0041060F 0044034A 004C006E A0018101 |.A...D.J.L.n....|
103 // CHECK-NEXT: 0050: 3100FA01 01 |1....|
104 // CHECK-NEXT: )