Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / ExecutionEngine / RuntimeDyld / ARM / MachO_Thumb_Relocations.s
blob4931b4165f878285febfbc7ca89b6c8f72602259
1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple=thumbv7s-apple-ios7.0.0 -filetype=obj -o %t/MachO_Thumb.o %s
3 # RUN: llvm-rtdyld -triple=thumbv7s-apple-ios7.0.0 -verify -check=%s %t/MachO_Thumb.o
5 .section __TEXT,__text,regular,pure_instructions
6 .syntax unified
8 .globl thumb_caller_thumb_callee
9 .p2align 1
10 .code 16
11 .thumb_func thumb_caller_thumb_callee
12 thumb_caller_thumb_callee:
13 nop
15 .globl arm_caller_thumb_callee
16 .p2align 1
17 .code 16
18 .thumb_func arm_caller_thumb_callee
19 arm_caller_thumb_callee:
20 nop
22 .globl thumb_caller_arm_callee
23 .p2align 1
24 .code 32
25 thumb_caller_arm_callee:
26 nop
28 .globl thumb_caller
29 .p2align 1
30 .code 16
31 .thumb_func thumb_caller
32 thumb_caller:
33 nop
35 # Check that stubs for thumb callers use thumb code (not arm), and that thumb
36 # callees have the low bit set on their addresses.
38 # rtdyld-check: *{4}(stub_addr(MachO_Thumb.o/__text, thumb_caller_thumb_callee)) = 0xf000f8df
39 # rtdyld-check: *{4}(stub_addr(MachO_Thumb.o/__text, thumb_caller_thumb_callee) + 4) = (thumb_caller_thumb_callee | 0x1)
40 bl thumb_caller_thumb_callee
42 # Check that arm callees do not have the low bit set on their addresses.
44 # rtdyld-check: *{4}(stub_addr(MachO_Thumb.o/__text, thumb_caller_arm_callee)) = 0xf000f8df
45 # rtdyld-check: *{4}(stub_addr(MachO_Thumb.o/__text, thumb_caller_arm_callee) + 4) = thumb_caller_arm_callee
46 bl thumb_caller_arm_callee
48 .globl arm_caller
49 .p2align 2
50 .code 32
51 arm_caller:
52 nop
54 # Check that stubs for arm callers use arm code (not thumb), and that thumb
55 # callees have the low bit set on their addresses.
56 # rtdyld-check: *{4}(stub_addr(MachO_Thumb.o/__text, arm_caller_thumb_callee)) = 0xe51ff004
57 # rtdyld-check: *{4}(stub_addr(MachO_Thumb.o/__text, arm_caller_thumb_callee) + 4) = (arm_caller_thumb_callee | 0x1)
58 bl arm_caller_thumb_callee
59 nop
61 .subsections_via_symbols