Commit 0465d026 by Srdjan Obucina Committed by Jim Stichnoth

Subzero, MIPS32: Intrinsic call Trap

Implements intrinsic call llvm.trap. R=stichnot@chromium.org Review URL: https://codereview.chromium.org/2351893004 . Patch from Srdjan Obucina <Srdjan.Obucina@imgtec.com>.
parent 8d16c1d3
......@@ -2890,9 +2890,11 @@ void TargetMIPS32::lowerIntrinsicCall(const InstIntrinsicCall *Instr) {
UnimplementedLoweringError(this, Instr);
return;
}
case Intrinsics::Trap:
UnimplementedLoweringError(this, Instr);
case Intrinsics::Trap: {
const uint32_t TrapCodeZero = 0;
_teq(getZero(), getZero(), TrapCodeZero);
return;
}
case Intrinsics::UnknownIntrinsic:
Func->setError("Should not be lowering UnknownIntrinsic");
return;
......
......@@ -336,6 +336,8 @@ NonZero:
; CHECK: ud2
; ARM32-LABEL: test_trap
; ARM32: .word 0xe7fedef0
; MIPS32-LABEL: test_trap
; MIPS32: teq zero,zero
define internal i32 @test_bswap_16(i32 %x) {
entry:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment