This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bounds checking and traps
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Jan Beulich" <JBeulich at novell dot com>
- Cc: <wilson at specifixinc dot com>, <gcc at gcc dot gnu dot org>
- Date: Thu, 12 Aug 2004 23:54:19 -0700
- Subject: Re: bounds checking and traps
- References: <s11c70fe.004@emea1-mh.id2.novell.com>
"Jan Beulich" <JBeulich@novell.com> writes:
>>These are standard named patterns. Grep for "gen_trap", and note where
>
>>it is called.
>
> I did exactly that, and didn't find any meaningful references (as I
> said before, folloiwng the call tree, TRAP_IF must be found somewhere in
> order for gen_trap [or gen_conditional_trap] to be called, but I wasn't
> able to find anything anywhere that would actually set TRAP_IF).
Look for the code implementing __builtin_trap().
>>Yes, this may need to be OS dependent.
>
> But then this can't be OS-independent (i386.md) code.
i386.md can certainly contain OS-conditionalized code, if necessary,
but I think the problem is with your OS - this might as well be part
of the i386 ABI.
zw