This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
> > Hi, > > > > Currently, on ARM, you have to either call abort() or raise(SIGTRAP) > > to achieve a handy crash. > > > > This patch allows you to instead call __builtin_trap() which is much > > more efficient at falling over because it becomes just a single > > instruction that will trap for you. > > > > Two testcases have been added (for ARM and Thumb) and both pass. > > > > > > Note: This is a modified version of a patch originally submitted by > Mark > > Mitchell back in 2010, which came in response to PR target/59091. > > > > http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00639.html > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59091 > > > > The main update, other than cosmetic differences, is that we've > chosen > > the same ARM encoding as LLVM for practical purposes. (The Thumb > > encoding in Mark's patch already matched LLVM.) > > > > > > OK for trunk? > > > > Cheers, > > Ian > > > > > > 2013-12-04 Ian Bolton <ian.bolton@arm.com> > > Mark Mitchell <mark@codesourcery.com> > > > > gcc/ > > * config/arm/arm.md (trap): New pattern. > > * config/arm/types.md: Added a type for trap. > > > > testsuite/ > > * gcc.target/arm/builtin-trap.c: New test. > > * gcc.target/arm/thumb-builtin-trap.c: Likewise. > > <aarch32-builtin-trap-v2.txt> > > This needs to set the conds attribute to "unconditional". Otherwise > the ARM backend might try to turn this into a conditional instruction. > > R. Thanks, Richard. I fixed it up, tested it and committed as trivial difference compared to what was approved already.
Attachment:
aarch32-builtin-trap-v3.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |