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) { ...@@ -2890,9 +2890,11 @@ void TargetMIPS32::lowerIntrinsicCall(const InstIntrinsicCall *Instr) {
UnimplementedLoweringError(this, Instr); UnimplementedLoweringError(this, Instr);
return; return;
} }
case Intrinsics::Trap: case Intrinsics::Trap: {
UnimplementedLoweringError(this, Instr); const uint32_t TrapCodeZero = 0;
_teq(getZero(), getZero(), TrapCodeZero);
return; return;
}
case Intrinsics::UnknownIntrinsic: case Intrinsics::UnknownIntrinsic:
Func->setError("Should not be lowering UnknownIntrinsic"); Func->setError("Should not be lowering UnknownIntrinsic");
return; return;
......
...@@ -336,6 +336,8 @@ NonZero: ...@@ -336,6 +336,8 @@ NonZero:
; CHECK: ud2 ; CHECK: ud2
; ARM32-LABEL: test_trap ; ARM32-LABEL: test_trap
; ARM32: .word 0xe7fedef0 ; ARM32: .word 0xe7fedef0
; MIPS32-LABEL: test_trap
; MIPS32: teq zero,zero
define internal i32 @test_bswap_16(i32 %x) { define internal i32 @test_bswap_16(i32 %x) {
entry: 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