1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

AMDGPU: Replace assert with report_fatal_error

Also use a more refined condition.

llvm-svn: 295239
This commit is contained in:
Matt Arsenault 2017-02-15 21:50:34 +00:00
parent c568d201c5
commit 332d674a45
2 changed files with 6 additions and 1 deletions

View File

@ -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);

View 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