30 lines
988 B
YAML
30 lines
988 B
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
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Tests PC-Relative data relocations
|
|
#------------------------------------------------------------------------------
|
|
|
|
--- |
|
|
|
|
@dst = external global i32
|
|
|
|
define void @DATA() { entry: ret void }
|
|
...
|
|
--- # DATA
|
|
# Offset Info Type Sym. Value Sym S Addend
|
|
# CHECK: 00000003 {{[0-9]+}} R_68K_PC8 {{[0-9]*}} dst + 1
|
|
# CHECK: 00000006 {{[0-9]+}} R_68K_PC16 {{[0-9]*}} dst + 0
|
|
# No need for relocation here
|
|
# CHECK-NOT: 0000000a {{[0-9]+}} R_68K_PC16 0
|
|
name: DATA
|
|
body: |
|
|
bb.0:
|
|
$a0 = MOV32rk @dst, $a0, implicit-def $ccr
|
|
$a0 = MOV32rq @dst, implicit-def $ccr
|
|
$a0 = MOV32rq 0, implicit-def $ccr
|
|
|
|
...
|