This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: ARM: Implement __builtin_trap
On Sep 9, 2010, at 11:28 AM, Mark Mitchell wrote:
> On 9/9/2010 11:20 AM, David Daney wrote:
>
>> I saw that, and I have no objections to that patch. But I was thinking
>> that this essentially augments the ABI. Could or should this be
>> coordinated with the maintainers of any ARM ABIs?
>
> Do other psABIs document how __builtin_trap is implemented?
>
> Richard E. is certainly in a position to comment on this. The only
> issue I see is that we're "using up" an instruction in the undefined
> instruction space, meaning that it can't be used in some other magic way
> by an OS. Linux presently uses an undefined instruction as a software
> breakpoint. (I'm not sure why it does that instead of using an SVC
> instruction?) But is there other stuff out there that might need this?
FWIW, the LLVM ARM backend compiles __builtin_trap into "trap" (aka .word 0xe7ffdefe).
-Chris