llvm.trap instrinsic for Mips

Sasa Stankovic Sasa.Stankovic at rt-rk.com
Tue Jul 16 09:58:33 PDT 2013


Hi,

Please find attached the patch that implements llvm.trap intrinsic for
Mips. Default behavior for this intrinsic is to call abort(). X86 and Arm
implement the intrinsic by emitting undefined instruction opcodes. Since
I'm not sure whether the undefined opcodes exist for Mips, I implemented
the intrinsic by emitting opcode for the break instruction (0xd) (break
instruction generates SIGTRAP signal).

Regards,
Sasa


-------------- next part --------------
A non-text attachment was scrubbed...
Name: trap.patch
Type: text/x-patch
Size: 2333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130716/3642e108/attachment.bin>


More information about the llvm-commits mailing list