Guard fabs to bfc convert with V6T2 flag
[oota-llvm.git] / test / CodeGen / ARM / build-attributes-encoding.s
1 // This tests that ARM attributes are properly encoded.
2
3 // RUN: llvm-mc < %s -triple=arm-linux-gnueabi -filetype=obj -o - \
4 // RUN:   | llvm-readobj -s -sd | FileCheck %s
5
6 // Tag_CPU_name (=5)
7 .cpu cortex-a8
8
9 // Tag_CPU_arch (=6)
10 .eabi_attribute 6, 10
11
12 // Tag_arch_profile (=7)
13 .eabi_attribute 7, 'A'
14
15 // Tag_ARM_ISA_use (=8)
16 .eabi_attribute 8, 1
17
18 // Tag_THUMB_ISA_use (=9)
19 .eabi_attribute 9, 2
20
21 // Tag_FP_arch (=10)
22 .fpu vfpv3
23
24 // Tag_Advanced_SIMD_arch (=12)
25 .eabi_attribute 12, 2
26
27 // Tag_ABI_FP_denormal (=20)
28 .eabi_attribute 20, 1
29
30 // Tag_ABI_FP_exceptions (=21)
31 .eabi_attribute 21, 1
32
33 // Tag_ABI_FP_number_model (=23)
34 .eabi_attribute 23, 1
35
36 // Tag_ABI_align_needed (=24)
37 .eabi_attribute 24, 1
38
39 // Tag_ABI_align_preserved (=25)
40 .eabi_attribute 25, 1
41
42 // Tag_ABI_HardFP_use (=27)
43 .eabi_attribute 27, 0
44
45 // Tag_ABI_VFP_args (=28)
46 .eabi_attribute 28, 1
47
48 // Tag_FP_HP_extension (=36)
49 .eabi_attribute 36, 1
50
51 // Tag_MPextension_use (=42)
52 .eabi_attribute 42, 1
53
54 // Tag_DIV_use (=44)
55 .eabi_attribute 44, 2
56
57 // Tag_Virtualization_use (=68)
58 .eabi_attribute 68, 3
59
60 // Check that values > 128 are encoded properly
61 .eabi_attribute 110, 160
62
63 // Check that tags > 128 are encoded properly
64 .eabi_attribute 129, "1"
65 .eabi_attribute 250, 1
66
67 // CHECK:        Section {
68 // CHECK:          Name: .ARM.attributes
69 // CHECK-NEXT:     Type: SHT_ARM_ATTRIBUTES
70 // CHECK-NEXT:     Flags [ (0x0)
71 // CHECK-NEXT:     ]
72 // CHECK-NEXT:     Address: 0x0
73 // CHECK-NEXT:     Offset: 0x34
74 // CHECK-NEXT:     Size: 71
75 // CHECK-NEXT:     Link: 0
76 // CHECK-NEXT:     Info: 0
77 // CHECK-NEXT:     AddressAlignment: 1
78 // CHECK-NEXT:     EntrySize: 0
79 // CHECK-NEXT:     SectionData (
80 // CHECK-NEXT:       0000: 41460000 00616561 62690001 3C000000
81 // CHECK-NEXT:       0010: 05636F72 7465782D 61380006 0A074108
82 // CHECK-NEXT:       0020: 0109020A 030C0214 01150117 01180119
83 // CHECK-NEXT:       0030: 011B001C 0124012A 012C0244 036EA001
84 // CHECK-NEXT:       0040: 81013100 FA0101
85 // CHECK-NEXT:     )