This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] MIPS, use trap instead of break to detect divide by zero
> All linux kernels that do not have the patches checked into
> linux-mips.org last week will generate SIGTRAP instead of SIGFPE on
> divide by zero when using traps. Also gas has options to select use of
> trap vs. break for this when it is expanding div macros.
>
OK.
> If I port this to 3.5 and try to get approval to check it in, should
> there be a command line switch to choose trap vs. break ?
I'd prefer if we have to do this to have it as a switch that takes an
option, perhaps -mdivide-check=(trap,break,none) and error out if we get
something that doesn't match those. We could then deprecate the existing
-mno-divide-check and save some option space.
-eric
--
Eric Christopher <echristo@redhat.com>