Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,149 +0,0 @@
// RUN: llvm-mc -triple thumbv7-windows-itanium -filetype obj -o %t.obj %s
// RUN: llvm-rtdyld -triple thumbv7-windows -dummy-extern OutputDebugStringW=0x01310061 -dummy-extern OutputDebugStringA=0x78563413 -dummy-extern ExitProcess=0x54769891 -dummy-extern unnamed_addr=0x00001024 -verify -check %s %t.obj
.text
.syntax unified
.def unnamed_addr
.scl 2
.type 32
.endef
.global unnamed_addr
.def branch24t
.scl 2
.type 32
.endef
.global branch24t
.p2align 1
.code 16
.thumb_func
branch24t:
@ rel1:
# b unnamed_addr @ IMAGE_REL_ARM_BRANCH24T
.def function
.scl 2
.type 32
.endef
.globl function
.p2align 1
.code 16
.thumb_func
function:
push.w {r11, lr}
mov r11, sp
rel2: @ IMAGE_REL_ARM_MOV32T
movw r0, :lower16:__imp_OutputDebugStringA
# rtdyld-check: decode_operand(rel2, 1) = (__imp_OutputDebugStringA&0x0000ffff)
movt r0, :upper16:__imp_OutputDebugStringA
# TODO rtdyld-check: decode_operand(rel2, 1) = (__imp_OutputDebugStringA&0xffff0000>>16)
ldr r1, [r0]
rel3: @ IMAGE_REL_ARM_MOV32T
movw r0, :lower16:string
# rtdyld-check: decode_operand(rel3, 1) = (string&0x0000ffff)
movt r0, :upper16:string
# TODO rtdyld-check: decode_operand(rel3, 1) = (string&0xffff0000>>16)
blx r1
rel4: @ IMAGE_REL_ARM_MOV32T
movw r0, :lower16:__imp_ExitProcess
# rtdyld-check: decode_operand(rel4, 1) = (__imp_ExitProcess&0x0000ffff)
movt r0, :upper16:__imp_ExitProcess
# TODO rtdyld-check: decode_operand(rel4, 1) = (__imp_ExitProcess&0xffff0000>>16)
ldr r1, [r0]
movs r0, #0
pop.w {r11, lr}
bx r1
.def main
.scl 2
.type 32
.endef
.globl main
.p2align 1
.code 16
.thumb_func
main:
push.w {r11, lr}
mov r11, sp
rel5:
# bl function @ IMAGE_REL_ARM_BLX23T
movs r0, #0
pop.w {r11, pc}
.section .rdata,"dr"
.global string
string:
.asciz "Hello World\n"
.data
.p2align 2
__imp_OutputDebugStringA:
@ rel6:
.long OutputDebugStringA @ IMAGE_REL_ARM_ADDR32
# rtdyld-check: *{4}__imp_OutputDebugStringA = 0x78563413
.p2align 2
__imp_ExitProcess:
@ rel7:
.long ExitProcess @ IMAGE_REL_ARM_ADDR32
# rtdyld-check: *{4}__imp_ExitProcess = 0x54769891
.global relocations
relocations:
@ rel8:
.long function(imgrel) @ IMAGE_REL_ARM_ADDR32NB
# rtdyld-check: *{4}relocations = function - section_addr(COFF_Thumb.s.tmp.obj, .text)
rel9:
.secidx __imp_OutputDebugStringA @ IMAGE_REL_ARM_SECTION
# rtdyld-check: *{2}rel9 = 1
rel10:
.long relocations(secrel32) @ IMAGE_REL_ARM_SECREL
# rtdyld-check: *{4}rel10 = relocations - section_addr(COFF_Thumb.s.tmp.obj, .data)
rel11:
.secrel32 relocations @ IMAGE_REL_ARM_SECREL
# rtdyld-check: *{4}rel11 = relocations - section_addr(COFF_Thumb.s.tmp.obj, .data)
rel12: @ IMAGE_REL_ARM_MOV32T
movw r0, :lower16:__imp_OutputDebugStringW
# rtdyld-check: decode_operand(rel12, 1) = (__imp_OutputDebugStringW&0x0000ffff)
movt r0, :upper16:__imp_OutputDebugStringW
# TODO rtdyld-check: decode_operand(rel12, 1) = (__imp_OutputDebugStringW&0xffff0000>>16)
bx r0
trap
.data
.p2align 2
__imp_OutputDebugStringW:
@ rel13:
.long OutputDebugStringW @ IMAGE_REL_ARM_ADDR32
# rtdyld-check: *{4}__imp_OutputDebugStringW = 0x01310061
.p2align 2
branch_to_thumb_func:
@ rel14: @ IMAGE_REL_ARM_MOV32T
movw r0, :lower16:function
# rtdyld-check: decode_operand(branch_to_thumb_func, 1) = (function&0x0000ffff|1)
movt r0, :upper16:function
# TODO rtdyld-check: decode_operand(branch_to_thumb_func, 1) = (function&0xffff0000>>16)
bx r0
trap
.data
.p2align 2
a_data_symbol:
.long 1073741822
.p2align 2
.text
ref_to_data_symbol_addr:
@ rel15: @ IMAGE_REL_ARM_MOV32T
movw r0, :lower16:a_data_symbol
# rtdyld-check: decode_operand(ref_to_data_symbol_addr, 1) = (a_data_symbol&0x0000ffff)
movt r0, :upper16:a_data_symbol
# TODO rtdyld-check: decode_operand(ref_to_data_symbol_addr, 1) = (a_data_symbol&0xffff0000>>16)

View File

@ -1,24 +0,0 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=arm-linux-gnueabihf -filetype=obj -o %t/reloc.o %s
# RUN: llvm-rtdyld -triple=arm-linux-gnueabihf -verify -map-section reloc.o,.ARM.exidx=0x6000 -map-section reloc.o,.text=0x4000 -dummy-extern __aeabi_unwind_cpp_pr0=0x1234 -check=%s %t/reloc.o
.text
.syntax unified
.eabi_attribute 67, "2.09" @ Tag_conformance
.cpu cortex-a8
.fpu neon
.file "reloc.c"
.globl g
.align 2
.type g,%function
g:
.fnstart
movw r0, #1
bx lr
.Lfunc_end0:
.size g, .Lfunc_end0-g
.fnend
# rtdyld-check: *{4}(section_addr(reloc.o, .ARM.exidx)) = (g - (section_addr(reloc.o, .ARM.exidx))) & 0x7fffffff
# Compat unwind info: finish(0xb0), finish(0xb0), finish(0xb0)
# rtdyld-check: *{4}(section_addr(reloc.o, .ARM.exidx) + 0x4) = 0x80b0b0b0

View File

@ -1,59 +0,0 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=armv7s-apple-ios7.0.0 -filetype=obj -o %t/foo.o %s
# RUN: llvm-rtdyld -triple=armv7s-apple-ios7.0.0 -verify -check=%s %t/foo.o
.syntax unified
.section __TEXT,__text,regular,pure_instructions
.globl bar
.align 2
bar:
# Check lower 16-bits of section difference relocation
# rtdyld-check: decode_operand(insn1, 1) = (foo$non_lazy_ptr-(nextPC+8))[15:0]
insn1:
movw r0, :lower16:(foo$non_lazy_ptr-(nextPC+8))
# Check upper 16-bits of section difference relocation
# rtdyld-check: decode_operand(insn2, 2) = (foo$non_lazy_ptr-(nextPC+8))[31:16]
insn2:
movt r0, :upper16:(foo$non_lazy_ptr-(nextPC+8))
nextPC:
add r1, r0, r0
# Check stub generation for external symbols by referencing a common symbol, 'baz'.
# Check both the content of the stub, and the reference to the stub.
# Stub should contain '0xe51ff004' (ldr pc, [pc, #-4]), followed by the target.
#
# rtdyld-check: *{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004
# rtdyld-check: *{4}(stub_addr(foo.o, __text, baz) + 4) = baz
#
# rtdyld-check: decode_operand(insn3, 0) = stub_addr(foo.o, __text, baz) - (insn3 + 8)
insn3:
bl baz
# Check stub generation for internal symbols by referencing 'bar'.
# rtdyld-check: *{4}(stub_addr(foo.o, __text, bar) + 4) = bar
insn4:
bl bar
bx lr
# Add 'aaa' to the common symbols to make sure 'baz' isn't at the start of the
# section. This ensures that we test VANILLA relocation addends correctly.
.comm aaa, 4, 2
.comm baz, 4, 2
.comm foo, 4, 2
.section __DATA,__data
.globl _a
.align 2
# rtdyld-check: *{4}bar_ofs = bar + 4
bar_ofs:
.long bar + 4
# Check that the symbol pointer section entries are fixed up properly:
# rtdyld-check: *{4}foo$non_lazy_ptr = foo
.section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
.align 2
foo$non_lazy_ptr:
.indirect_symbol foo
.long 0
.subsections_via_symbols

View File

@ -1,52 +0,0 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=thumbv7s-apple-ios7.0.0 -filetype=obj -o %t/MachO_Thumb.o %s
# RUN: llvm-rtdyld -triple=thumbv7s-apple-ios7.0.0 -verify -check=%s %t/MachO_Thumb.o
.section __TEXT,__text,regular,pure_instructions
.syntax unified
# Add 'aaa' to the common symbols to make sure 'baz' isn't at the start of the
# section. This ensures that we test VANILLA relocation addends correctly.
.comm aaa, 4, 2
.comm baz, 4, 2
.globl bar
.p2align 1
.code 16 @ @bar
.thumb_func bar
bar:
# Check lower 16-bits of section difference relocation
# rtdyld-check: decode_operand(insn1, 1) = (foo-(nextPC+8))[15:0]
insn1:
movw r0, :lower16:(foo-(nextPC+8))
# Check upper 16-bits of section difference relocation
# rtdyld-check: decode_operand(insn2, 2) = (foo-(nextPC+8))[31:16]
insn2:
movt r0, :upper16:(foo-(nextPC+8))
nextPC:
nop
# Check stub generation for external symbols by referencing a common symbol, 'baz'.
# Check both the content of the stub, and the reference to the stub.
# Stub should contain '0xf000f8df' (ldr.w pc, [pc]), followed by the target.
#
# rtdyld-check: *{4}(stub_addr(MachO_Thumb.o, __text, baz)) = 0xf000f8df
# rtdyld-check: *{4}(stub_addr(MachO_Thumb.o, __text, baz) + 4) = baz
#
# rtdyld-check: decode_operand(insn3, 0) = stub_addr(MachO_Thumb.o, __text, baz) - (insn3 + 4)
insn3:
bl baz
# Check stub generation for internal symbols by referencing 'bar'.
# rtdyld-check: *{4}(stub_addr(MachO_Thumb.o, __text, bar) + 4) = bar & 0xfffffffffffffffe
insn4:
bl bar
.section __DATA,__data
.align 2
foo:
.long 0
.subsections_via_symbols

View File

@ -1,3 +0,0 @@
if not 'ARM' in config.root.targets:
config.unsupported = True