[PATCH] D17888: [AMDGPU] Assembler: Fix s_setpc_b64

Nikolay Haustov via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 07:18:47 PST 2016


nhaustov created this revision.
nhaustov added reviewers: tstellarAMD, arsenm.
nhaustov added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.

s_setpc_b64 has just one 64-bit source which is the address of instruction to jump to.

http://reviews.llvm.org/D17888

Files:
  lib/Target/AMDGPU/SIInstructions.td
  test/MC/AMDGPU/sop1.s

Index: test/MC/AMDGPU/sop1.s
===================================================================
--- test/MC/AMDGPU/sop1.s
+++ test/MC/AMDGPU/sop1.s
@@ -133,8 +133,8 @@
 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]
Index: lib/Target/AMDGPU/SIInstructions.td
===================================================================
--- lib/Target/AMDGPU/SIInstructions.td
+++ lib/Target/AMDGPU/SIInstructions.td
@@ -172,7 +172,7 @@
 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", []>;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17888.49826.patch
Type: text/x-patch
Size: 1232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160304/5ba66746/attachment.bin>


More information about the llvm-commits mailing list