2016-07-11 20:07:18 +08:00
|
|
|
// RUN: llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s | FileCheck %s --check-prefix=VI
|
[AMDGPU] Fix s_branch with -1 offset
Summary:
In case s_branch instruction target is itself backend should emit offset -1 but instead it emit 0.
'''
label:
s_branch label // should emit [0xff,0xff,0x82,0xbf]
'''
Tom, Matt: why are we adjusting fixup values in applyFixup() method instead of processFixup()? processFixup() is calling adjustFixupValue() but does nothing with its result.
Reviewers: vpykhtin, artem.tamazov, tstellarAMD
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl
Differential Revision: https://reviews.llvm.org/D24671
llvm-svn: 281896
2016-09-19 18:20:55 +08:00
|
|
|
// RUN: llvm-mc -arch=amdgcn -mcpu=fiji -filetype=obj %s | llvm-objdump -disassemble -mcpu=fiji - | FileCheck %s --check-prefix=BIN
|
2016-07-11 20:07:18 +08:00
|
|
|
|
|
|
|
loop_start:
|
|
|
|
s_branch loop_start
|
|
|
|
// VI: s_branch loop_start ; encoding: [A,A,0x82,0xbf]
|
|
|
|
// VI-NEXT: ; fixup A - offset: 0, value: loop_start, kind: fixup_si_sopp_br
|
[AMDGPU] Fix s_branch with -1 offset
Summary:
In case s_branch instruction target is itself backend should emit offset -1 but instead it emit 0.
'''
label:
s_branch label // should emit [0xff,0xff,0x82,0xbf]
'''
Tom, Matt: why are we adjusting fixup values in applyFixup() method instead of processFixup()? processFixup() is calling adjustFixupValue() but does nothing with its result.
Reviewers: vpykhtin, artem.tamazov, tstellarAMD
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl
Differential Revision: https://reviews.llvm.org/D24671
llvm-svn: 281896
2016-09-19 18:20:55 +08:00
|
|
|
// BIN: loop_start:
|
2016-10-06 21:46:08 +08:00
|
|
|
// BIN-NEXT: s_branch loop_start // 000000000000: BF82FFFF
|
2016-07-11 20:07:18 +08:00
|
|
|
|
|
|
|
s_branch loop_end
|
|
|
|
// VI: s_branch loop_end ; encoding: [A,A,0x82,0xbf]
|
|
|
|
// VI-NEXT: ; fixup A - offset: 0, value: loop_end, kind: fixup_si_sopp_br
|
2016-10-06 21:46:08 +08:00
|
|
|
// BIN: s_branch loop_end // 000000000004: BF820000
|
[AMDGPU] Fix s_branch with -1 offset
Summary:
In case s_branch instruction target is itself backend should emit offset -1 but instead it emit 0.
'''
label:
s_branch label // should emit [0xff,0xff,0x82,0xbf]
'''
Tom, Matt: why are we adjusting fixup values in applyFixup() method instead of processFixup()? processFixup() is calling adjustFixupValue() but does nothing with its result.
Reviewers: vpykhtin, artem.tamazov, tstellarAMD
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl
Differential Revision: https://reviews.llvm.org/D24671
llvm-svn: 281896
2016-09-19 18:20:55 +08:00
|
|
|
// BIN: loop_end:
|
2016-07-11 20:07:18 +08:00
|
|
|
loop_end:
|
|
|
|
|
|
|
|
s_branch gds
|
|
|
|
// VI: s_branch gds ; encoding: [A,A,0x82,0xbf]
|
|
|
|
// VI-NEXT: ; fixup A - offset: 0, value: gds, kind: fixup_si_sopp_br
|
2016-10-06 21:46:08 +08:00
|
|
|
// BIN: s_branch gds // 000000000008: BF820000
|
[AMDGPU] Fix s_branch with -1 offset
Summary:
In case s_branch instruction target is itself backend should emit offset -1 but instead it emit 0.
'''
label:
s_branch label // should emit [0xff,0xff,0x82,0xbf]
'''
Tom, Matt: why are we adjusting fixup values in applyFixup() method instead of processFixup()? processFixup() is calling adjustFixupValue() but does nothing with its result.
Reviewers: vpykhtin, artem.tamazov, tstellarAMD
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl
Differential Revision: https://reviews.llvm.org/D24671
llvm-svn: 281896
2016-09-19 18:20:55 +08:00
|
|
|
// BIN: gds:
|
2016-07-11 20:07:18 +08:00
|
|
|
gds:
|
|
|
|
s_nop 0
|