29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
# RUN: llc %s -mtriple=m68k -start-after=prologepilog -O0 -filetype=obj \
|
|
# RUN: -code-model=small -relocation-model=pic -o - \
|
|
# RUN: | llvm-readobj -relocations -elf-output-style=GNU - \
|
|
# RUN: | FileCheck %s
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Test GOTOFF relocation
|
|
#------------------------------------------------------------------------------
|
|
|
|
--- |
|
|
|
|
@dst = external global i32
|
|
|
|
define void @DATA() { entry: ret void }
|
|
...
|
|
--- # DATA
|
|
# Offset Info Type Sym. Value Sym S Addend
|
|
# CHECK: 00000002 {{[0-9a-f]+}} R_68K_GOTPCREL16 {{[0-9]*}} _GLOBAL_OFFSET_TABLE_ + 0
|
|
# CHECK: 00000007 {{[0-9a-f]+}} R_68K_GOTOFF8 {{[0-9]*}} dst + 0
|
|
# CHECK: 0000000a {{[0-9a-f]+}} R_68K_GOTOFF16 {{[0-9]*}} dst + 0
|
|
name: DATA
|
|
body: |
|
|
bb.0:
|
|
$a5 = LEA32q target-flags(m68k-gotpcrel) &_GLOBAL_OFFSET_TABLE_
|
|
$d0 = MOV32rf target-flags(m68k-gotoff) @dst, $a5, $d0, implicit-def $ccr
|
|
$d0 = MOV32rp target-flags(m68k-gotoff) @dst, $a5, implicit-def $ccr
|
|
|
|
...
|