This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CFG and libcall conflict for java
- To: gcc at gcc dot gnu dot org
- Subject: Re: CFG and libcall conflict for java
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: 26 Sep 2001 10:25:23 -0700
- Cc: jh at suse dot cz, wilson at cygnus dot com
- References: <200109260435.VAA01084@wilson.cygnus.com>
Jim Wilson <wilson@cygnus.com> writes:
> I haven't checked this yet. My assumption is that the java compiler
> installs a signal handler that catches the appropriate signal and then
> calls throw to generate an language-level exception.
The java compiler actually emits calls into the runtime (see
libjava/prims.cc:_Jv_{rem,div}{I,J}) gcc/java/expr.c:build_java_soft_divmod
assembles the tree node for that and gets called when -fuse-divide-subroutine
is on. It is on by default.
Otherwise, the runtime is responsible for catching the signal and
throwing an exception from it. The FE doesn't insert signal handling
code around with is generated for / or %.
I should have clarified that earlier, but I thought it was assumed in
the early post. I guess I mis-read.
./A