This is the mail archive of the gcc@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]

Re: CFG and libcall conflict for java


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


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