This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Re: RFA PATCH: Enable MIPS SIGFPE handling...


Andrew Haley wrote:
> David Daney writes:
>  > When I made my initial series of MIPS patches my misunderstanding of how
>  > GCC generates divide by zero checks led me to omit SIGFPE handling.
>  > 
>  > Now since I have seen the light, I present this patch to enable use of
>  > SIGFPE for generation of ArithmeticException("/ by zero");
>  > 
>  > 
>  > Tested on --host=i686-pc-linux-gnu --target=mipsel-linux with no
>  > regressions in top level make check.
>  > 
>  > And yes it is correct to #undef HANDLE_DIVIDE_OVERFLOW as MIPS does
>  > division according to the JLS without any of the mickey-mouse stuff that
>  > has to be done with the x86.
>  > 
>  > O.K to commit?
>  > 
>  > David Daney.
>  > 2004-09-03  David Daney  <ddaney@avtrex.com>
>  > 
>  > 	* configure.host: Use -fno-use-divide-subroutine for mips*-*-linux*.
>  > 	* include/mips-signal.h: Added HANDLE_FPE support.
> 
> Where does the saved PC in the sigcontext point to when a divide
> overflow happens?  The trap instruction, or the instruction after?

To the best of my knowledge, it points to the teq/break instruction.

David Daney.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]