mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
AMDGPU: Replace assert with report_fatal_error
Also use a more refined condition. llvm-svn: 295239
This commit is contained in:
parent
c568d201c5
commit
332d674a45
@ -138,7 +138,8 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
|
||||
CommentStream = &CS;
|
||||
|
||||
// ToDo: AMDGPUDisassembler supports only VI ISA.
|
||||
assert(AMDGPU::isVI(STI) && "Can disassemble only VI ISA.");
|
||||
if (!STI.getFeatureBits()[AMDGPU::FeatureGCN3Encoding])
|
||||
report_fatal_error("Disassembly not yet supported for subtarget");
|
||||
|
||||
const unsigned MaxInstBytesNum = (std::min)((size_t)8, Bytes_.size());
|
||||
Bytes = Bytes_.slice(0, MaxInstBytesNum);
|
||||
|
4
test/MC/Disassembler/AMDGPU/si-support.txt
Normal file
4
test/MC/Disassembler/AMDGPU/si-support.txt
Normal file
@ -0,0 +1,4 @@
|
||||
# RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -disassemble < %s 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: LLVM ERROR: Disassembly not yet supported for subtarget
|
||||
0x00 0x00 0x00 0x7e
|
Loading…
Reference in New Issue
Block a user