File: directive-arm-thumb-alignment.s

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (63 lines) | stat: -rw-r--r-- 2,047 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@ RUN: llvm-mc -triple armv7-elf -filetype obj -o - %s | llvm-readelf -S -s - | FileCheck %s

@ CHECK:   [Nr] Name              Type            Address  Off    Size   ES Flg Lk Inf Al
@ CHECK-NEXT:   [ 0]                   NULL            00000000 000000 000000 00      0   0  0
@ CHECK-NEXT:   [ 1] .strtab           STRTAB          00000000 {{.*}} {{.*}} 00      0   0  1
@ CHECK-NEXT:   [ 2] .text             PROGBITS        00000000 {{.*}} 00000d 00  AX  0   0  4
@ CHECK-NEXT:   [ 3] .arm_aligned      PROGBITS        00000000 {{.*}} 000005 00  AX  0   0  4
@ CHECK-NEXT:   [ 4] .thumb_aligned    PROGBITS        00000000 {{.*}} 000002 00  AX  0   0  2

@ CHECK:      Num:    Value  Size Type    Bind   Vis      Ndx Name
@ CHECK-NEXT:   0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
@ CHECK-NEXT:   1: 00000001     0 FUNC    LOCAL  DEFAULT    2 aligned_thumb
@ CHECK-NEXT:   2: 00000000     0 NOTYPE  LOCAL  DEFAULT    2 $t
@ CHECK-NEXT:   3: 00000004     0 FUNC    LOCAL  DEFAULT    2 thumb_to_arm
@ CHECK-NEXT:   4: 00000004     0 NOTYPE  LOCAL  DEFAULT    2 $a
@ CHECK-NEXT:   5: 00000008     0 NOTYPE  LOCAL  DEFAULT    2 $d
@ CHECK-NEXT:   6: 0000000b     0 FUNC    LOCAL  DEFAULT    2 unaligned_arm_to_thumb
@ CHECK-NEXT:   7: 0000000a     0 NOTYPE  LOCAL  DEFAULT    2 $t

.thumb

.type aligned_thumb,%function
aligned_thumb:
    nop

@ Above function has size 2 (at offset 0)
@ Expect alignment of +2 (to offset 4)
.arm

.type thumb_to_arm,%function
thumb_to_arm:
    nop

.byte 0

@ Above function has size 5 (at offset 4)
@ Expect alignment of +1 (to offset 10)
.thumb
.type unaligned_arm_to_thumb,%function
unaligned_arm_to_thumb:
    nop

.byte 0

@ Above section has size 13 (at offset 34)
@ Expect alignment of +3 (to offset 44)
.section .arm_aligned, "ax"
.arm

.type arm_aligned_section,%function
arm_aligned_section:
    nop

.byte 0

@ Above section has size 5 (at offset 44)
@ Expect alignment of +1 (to offset 4a)
.section .thumb_aligned, "ax"
.thumb

.type thumb_aligned_section,%function
thumb_aligned_section:
    nop