Skip to content

Commit

Permalink
Hexagon: Put relocations after instructions not packets.
Browse files Browse the repository at this point in the history
Change relocation output so that relocation information follows
individual instructions rather than clustering them at the end
of packets.

This change required shifting block of code but the actual change
is in HexagonPrettyPrinter's PrintInst.

Differential Revision: https://reviews.llvm.org/D46728

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332283 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Sid Manning committed May 14, 2018
1 parent 3220080 commit 86cf232
Show file tree
Hide file tree
Showing 4 changed files with 448 additions and 404 deletions.
2 changes: 1 addition & 1 deletion test/CodeGen/Hexagon/relax.ll
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ ret void
}

; CHECK: { call 0
; CHECK: allocframe(#0)
; CHECK: 00000000: R_HEX_B22_PCREL
; CHECK: allocframe(#0)
; CHECK: { dealloc_return }
15 changes: 15 additions & 0 deletions test/MC/Hexagon/packetrelo.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# RUN: llvm-mc -filetype=obj -triple=hexagon %s | llvm-objdump -r -d - | FileCheck %s
{
call ##foo
memw(##a) = r0
}
#CHECK: { immext(#0)
#CHECK: : R_HEX_B32_PCREL_X foo
#CHECK: call
#CHECK: R_HEX_B22_PCREL_X foo
#CHECK: immext(#0)
#CHECK: R_HEX_32_6_X a
#CHECK: memw(##0) = r0 }
#CHECK: R_HEX_16_X a


4 changes: 2 additions & 2 deletions test/MC/Hexagon/plt-rel.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ call foo@GDPLT
# CHECK: R_HEX_GD_PLT_B22_PCREL
call ##foo@GDPLT
# CHECK: R_HEX_GD_PLT_B32_PCREL_X
# CHECK-NEXT: R_HEX_GD_PLT_B22_PCREL_X
# CHECK: R_HEX_GD_PLT_B22_PCREL_X

call foo@LDPLT
# CHECK: R_HEX_LD_PLT_B22_PCREL
call ##foo@LDPLT
# CHECK: R_HEX_LD_PLT_B32_PCREL_X
# CHECK-NEXT: R_HEX_LD_PLT_B22_PCREL_X
# CHECK: R_HEX_LD_PLT_B22_PCREL_X
Loading

0 comments on commit 86cf232

Please sign in to comment.