[PATCH] D69819: [AMDGPU] return Fail instead of SolfFail from addOperand()
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 13:19:16 PST 2019
rampitec updated this revision to Diff 227769.
rampitec added a comment.
Added test. Current response to is crash.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69819/new/
https://reviews.llvm.org/D69819
Files:
llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
llvm/test/MC/Disassembler/AMDGPU/decode-err.txt
Index: llvm/test/MC/Disassembler/AMDGPU/decode-err.txt
===================================================================
--- /dev/null
+++ llvm/test/MC/Disassembler/AMDGPU/decode-err.txt
@@ -0,0 +1,4 @@
+# RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -disassemble -show-encoding < %s 2>&1 | FileCheck -check-prefix=GCN %s
+
+# GCN: warning: invalid instruction encoding
+0xdf,0x00,0x00,0x02
Index: llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+++ llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
@@ -73,7 +73,7 @@
Inst.addOperand(Opnd);
return Opnd.isValid() ?
MCDisassembler::Success :
- MCDisassembler::SoftFail;
+ MCDisassembler::Fail;
}
static int insertNamedMCOperand(MCInst &MI, const MCOperand &Op,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69819.227769.patch
Type: text/x-patch
Size: 878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191104/abd52c67/attachment.bin>
More information about the llvm-commits
mailing list