llvm.org GIT mirror llvm / 6099306
ARMEB: Additional test files for ARM fixups git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209200 91177308-0d34-0410-b5e6-96231b3b80d8 Christian Pirker 6 years ago
4 changed file(s) with 223 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
741741
742742 // Used to point to big endian bytes.
743743 unsigned FullSizeBytes;
744 if (!IsLittleEndian)
744 if (!IsLittleEndian) {
745745 FullSizeBytes = getFixupKindContainerSizeBytes(Fixup.getKind());
746 assert((Offset + FullSizeBytes) <= DataSize && "Invalid fixup size!");
747 assert(NumBytes <= FullSizeBytes && "Invalid fixup size!");
748 }
746749
747750 // For each byte of the fragment that the fixup touches, mask in the bits from
748751 // the fixup value. The Value has been "split up" into the appropriate
0 // RUN: llvm-mc -triple=armeb-eabi -mattr v7,vfp2 -filetype=obj < %s | llvm-objdump -s - | FileCheck %s
1
2 .syntax unified
3 .text
4 .align 2
5 .code 32
6
7 @ARM::fixup_arm_condbl
8 .section s_condbl,"ax",%progbits
9 // CHECK-LABEL: Contents of section s_condbl
10 // CHECK: 0000 0b000002
11 bleq condbl_label+16
12 condbl_label:
13
14 @ARM::fixup_arm_uncondbl
15 .section s_uncondbl,"ax",%progbits
16 // CHECK-LABEL: Contents of section s_uncondbl
17 // CHECK: 0000 eb000002
18 bl uncond_label+16
19 uncond_label:
20
21 @ARM::fixup_arm_blx
22 .section s_blx,"ax",%progbits
23 // CHECK-LABEL: Contents of section s_blx
24 // CHECK: 0000 fa000002
25 blx blx_label+16
26 blx_label:
27
28 @ARM::fixup_arm_uncondbranch
29 .section s_uncondbranch,"ax",%progbits
30 // CHECK-LABEL: Contents of section s_uncondbranch
31 // CHECK: 0000 ea000003
32 b uncondbranch_label+16
33 uncondbranch_label:
34
35 @ARM::fixup_arm_condbranch
36 .section s_condbranch,"ax",%progbits
37 // CHECK-LABEL: Contents of section s_condbranch
38 // CHECK: 0000 0a000003
39 beq condbranch_label+16
40 condbranch_label:
41
42 @ARM::fixup_arm_pcrel_10
43 .section s_arm_pcrel_10,"ax",%progbits
44 // CHECK-LABEL: Contents of section s_arm_pcrel_10
45 // CHECK: 0000 ed9f0b03
46 vldr d0, arm_pcrel_10_label+16
47 arm_pcrel_10_label:
48
49 @ARM::fixup_arm_ldst_pcrel_12
50 .section s_arm_ldst_pcrel_12,"ax",%progbits
51 // CHECK-LABEL: Contents of section s_arm_ldst_pcrel_12
52 // CHECK: 0000 e59f000c
53 ldr r0, arm_ldst_pcrel_12_label+16
54 arm_ldst_pcrel_12_label:
55
56 @ARM::fixup_arm_adr_pcrel_12
57 .section s_arm_adr_pcrel_12,"ax",%progbits
58 // CHECK-LABEL: Contents of section s_arm_adr_pcrel_12
59 // CHECK: 0000 e28f0010
60 adr r0, arm_adr_pcrel_12_label+20
61 arm_adr_pcrel_12_label:
62
63 @ARM::fixup_arm_adr_pcrel_10_unscaled
64 .section s_arm_adr_pcrel_10_unscaled,"ax",%progbits
65 // CHECK-LABEL: Contents of section s_arm_adr_pcrel_10_unscaled
66 // CHECK: 0000 e1cf01d4
67 ldrd r0, r1, arm_adr_pcrel_10_unscaled_label+24
68 arm_adr_pcrel_10_unscaled_label:
69
70 @ARM::fixup_arm_movw_lo16
71 .section s_movw,"ax",%progbits
72 // CHECK-LABEL: Contents of section s_movw
73 // CHECK: 0000 e3000008
74 movw r0, :lower16:(some_label+8)
75
76 @ARM::fixup_arm_movt_hi16
77 .section s_movt,"ax",%progbits
78 // CHECK-LABEL: Contents of section s_movt
79 // CHECK: 0000 e34f0ffc
80 movt r0, :upper16:GOT-(movt_label)
81 movt_label:
82
83 @FK_Data_1
84 .section s_fk_data_1
85 // CHECK-LABEL: Contents of section s_fk_data_1
86 // CHECK: 0000 01
87 fk_data1_l_label:
88 .byte fk_data1_h_label-fk_data1_l_label
89 fk_data1_h_label:
90
91 @FK_Data_2
92 .section s_fk_data_2
93 // CHECK-LABEL: Contents of section s_fk_data_2
94 // CHECK: 0000 0002
95 fk_data2_l_label:
96 .short fk_data2_h_label-fk_data2_l_label
97 fk_data2_h_label:
98
99 @FK_Data_4
100 .section s_fk_data_4
101 // CHECK-LABEL: Contents of section s_fk_data_4
102 // CHECK: 0000 00000004
103 fk_data4_l_label:
104 .long fk_data4_h_label-fk_data4_l_label
105 fk_data4_h_label:
106
0 // RUN: llvm-mc -triple=armeb-eabi -mattr v7,vfp2 -filetype=obj < %s | llvm-objdump -s - | FileCheck %s
1
2 .syntax unified
3 .text
4 .align 2
5 .code 16
6
7 @ARM::fixup_arm_thumb_bl
8 .section s_thumb_bl,"ax",%progbits
9 // CHECK-LABEL: Contents of section s_thumb_bl
10 // CHECK: 0000 f000f801
11 bl thumb_bl_label
12 nop
13 thumb_bl_label:
14
15 @ARM::fixup_arm_thumb_blx
16 // CHECK-LABEL: Contents of section s_thumb_bl
17 // CHECK: 0000 f000e802
18 .section s_thumb_blx,"ax",%progbits
19 blx thumb_blx_label+8
20 thumb_blx_label:
21
22 @ARM::fixup_arm_thumb_br
23 .section s_thumb_br,"ax",%progbits
24 // CHECK-LABEL: Contents of section s_thumb_br
25 // CHECK: 0000 e000bf00
26 b thumb_br_label
27 nop
28 thumb_br_label:
29
30 @ARM::fixup_arm_thumb_bcc
31 .section s_thumb_bcc,"ax",%progbits
32 // CHECK-LABEL: Contents of section s_thumb_bcc
33 // CHECK: 0000 d000bf00
34 beq thumb_bcc_label
35 nop
36 thumb_bcc_label:
37
38 @ARM::fixup_arm_thumb_cb
39 .section s_thumb_cb,"ax",%progbits
40 // CHECK-LABEL: Contents of section s_thumb_cb
41 // CHECK: 0000 b100bf00
42 cbz r0, thumb_cb_label
43 nop
44 thumb_cb_label:
45
46 @ARM::fixup_arm_thumb_cp
47 .section s_thumb_cp,"ax",%progbits
48 // CHECK-LABEL: Contents of section s_thumb_cp
49 // CHECK: 0000 4801bf00
50 ldr r0, =thumb_cp_label
51 nop
52 nop
53 thumb_cp_label:
54
55 @ARM::fixup_arm_thumb_adr_pcrel_10
56 .section s_thumb_adr_pcrel_10,"ax",%progbits
57 // CHECK-LABEL: Contents of section s_thumb_adr_pcrel_10
58 // CHECK: 0000 a000bf00
59 adr r0, thumb_adr_pcrel_10_label
60 nop
61 thumb_adr_pcrel_10_label:
62
0 // RUN: llvm-mc -triple=thumbeb-eabi -mattr v7,vfp2 -filetype=obj < %s | llvm-objdump -s - | FileCheck %s
1
2 .syntax unified
3 .text
4 .align 2
5
6 @ARM::fixup_t2_movw_lo16
7 .section s_movw,"ax",%progbits
8 // CHECK-LABEL: Contents of section s_movw
9 // CHECK: 0000 f2400008
10 movw r0, :lower16:(some_label+8)
11
12 @ARM::fixup_t2_movt_hi16
13 .section s_movt,"ax",%progbits
14 // CHECK-LABEL: Contents of section s_movt
15 // CHECK: 0000 f6cf70fc
16 movt r0, :upper16:GOT-(movt_label)
17 movt_label:
18
19 @ARM::fixup_t2_uncondbranch
20 .section s_uncondbranch,"ax",%progbits
21 // CHECK-LABEL: Contents of section s_uncondbranch
22 // CHECK: 0000 f000b801 bf00
23 b.w uncond_label
24 nop
25 uncond_label:
26
27 @ARM::fixup_t2_condbranch
28 .section s_condbranch,"ax",%progbits
29 // CHECK-LABEL: Contents of section s_condbranch
30 // CHECK: 0000 f0008001 bf00
31 beq.w cond_label
32 nop
33 cond_label:
34
35 @ARM::fixup_t2_ldst_precel_12
36 .section s_ldst_precel_12,"ax",%progbits
37 ldr r0, ldst_precel_12_label
38 nop
39 nop
40 ldst_precel_12_label:
41
42 @ARM::fixup_t2_adr_pcrel_12
43 .section s_adr_pcrel_12,"ax",%progbits
44 adr r0, adr_pcrel_12_label
45 nop
46 nop
47 adr_pcrel_12_label:
48