Skip to content

Commit

Permalink
[AMDGPU] Assembler: Fix s_setpc_b64
Browse files Browse the repository at this point in the history
s_setpc_b64 has just one 64-bit source which is the address of instruction to jump to.

Differential Revision: http://reviews.llvm.org/D17888

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263005 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Nikolay Haustov authored and Nikolay Haustov committed Mar 9, 2016
1 parent a3c641f commit 7b74d3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Target/AMDGPU/SIInstructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ defm S_BITSET0_B64 : SOP1_64 <sop1<0x1c, 0x19>, "s_bitset0_b64", []>;
defm S_BITSET1_B32 : SOP1_32 <sop1<0x1d, 0x1a>, "s_bitset1_b32", []>;
defm S_BITSET1_B64 : SOP1_64 <sop1<0x1e, 0x1b>, "s_bitset1_b64", []>;
defm S_GETPC_B64 : SOP1_64_0 <sop1<0x1f, 0x1c>, "s_getpc_b64", []>;
defm S_SETPC_B64 : SOP1_64 <sop1<0x20, 0x1d>, "s_setpc_b64", []>;
defm S_SETPC_B64 : SOP1_1 <sop1<0x20, 0x1d>, "s_setpc_b64", []>;
defm S_SWAPPC_B64 : SOP1_64 <sop1<0x21, 0x1e>, "s_swappc_b64", []>;
defm S_RFE_B64 : SOP1_64 <sop1<0x22, 0x1f>, "s_rfe_b64", []>;

Expand Down
4 changes: 2 additions & 2 deletions test/MC/AMDGPU/sop1.s
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ s_bitset1_b64 s[2:3], s[4:5]
s_getpc_b64 s[2:3]
// CHECK: s_getpc_b64 s[2:3] ; encoding: [0x00,0x1f,0x82,0xbe]

s_setpc_b64 s[2:3], s[4:5]
// CHECK: s_setpc_b64 s[2:3], s[4:5] ; encoding: [0x04,0x20,0x82,0xbe]
s_setpc_b64 s[4:5]
// CHECK: s_setpc_b64 s[4:5] ; encoding: [0x04,0x20,0x80,0xbe]

s_swappc_b64 s[2:3], s[4:5]
// CHECK: s_swappc_b64 s[2:3], s[4:5] ; encoding: [0x04,0x21,0x82,0xbe]
Expand Down

0 comments on commit 7b74d3d

Please sign in to comment.