Summary:
The LLVM disassembler assumes that the unused src0 operand of v_nop is
zero. Other tools can put another value in that field, which is still
valid. This commit fixes the LLVM disassembler to recognize such an
encoding as v_nop, in the same way as we already do for s_getpc.
Differential Revision: https://reviews.llvm.org/D63724
Change-Id: Iaf0363eae26ff92fc4ebc716216476adbff37a6f
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364208
91177308-0d34-0410-b5e6-
96231b3b80d8
bits<8> vdst;
bits<9> src0;
- let Inst{8-0} = !if(P.HasSrc0, src0{8-0}, 0);
+ let Inst{8-0} = !if(P.HasSrc0, src0{8-0}, ?);
let Inst{16-9} = op;
let Inst{24-17} = !if(P.EmitDst, vdst{7-0}, 0);
let Inst{31-25} = 0x3f; //encoding
# CHECK: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
0x00 0x00 0x00 0x7e
+
+# CHECK: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
+0x80 0x00 0x00 0x7e
# CHECK: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
0x00 0x00 0x00 0x7e
+# CHECK: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
+0x80 0x00 0x00 0x7e
+
# CHECK: v_clrexcp ; encoding: [0x00,0x6a,0x00,0x7e]
0x00 0x6a 0x00 0x7e
# VI: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
0x00 0x00 0x00 0x7e
+# VI: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
+0x80 0x00 0x00 0x7e
+
# VI: v_clrexcp ; encoding: [0x00,0x6a,0x00,0x7e]
0x00 0x6a 0x00 0x7e