Trap instruction for ARMv7 and Thumb

HI group.

I was wondering why the “trap” instruction is implemented in the ARM backend as an undefined opcode. For ARM mode, it uses 0xe7ffdefe, for Thumb 0xdefe.

Why not use the BKT #imm instruction?
Does anybody remember the reason behind this?


The OS delivers different signals on each of these instructions. I had a discussion about this with Jim Grosbach when checking in the NaCl TRAP, see the commit archive.