PATCH libjava: Enable bytecode interpreter for sparc*-*

Jeff Sturm jsturm@one-point.com
Wed Jul 24 14:08:00 GMT 2002


On 24 Jul 2002, Tom Tromey wrote:
> Jeff> 	* configure.host (sparc*-*): Enable libgcj_interpreter.
> Jeff> 	* interpret.cc (_Jv_InterpMethod::run_normal): Pass cif to run.
> Jeff> 	(_Jv_InterpMethod::run_synch_object): Likewise.
> Jeff> 	(_Jv_InterpMethod::run_synch_class): Likewise.
> Jeff> 	(_Jv_InterpMethod::run): Receive cif from caller.
> Jeff> 	(perform_invoke): Create union type for rvalue.
> Jeff> 	(insn_ireturn): Use narrowing conversions on pointer type.
> Jeff> 	* include/java-interp.h (_Jv_InterpMethod::run):
> Jeff> 	Declare cif argument.
>
> Ok, thanks.

I should mention, this may "break" powerpc.  Though I have no way of
testing it, I see code like the following in ppc_closure.S:

# case signed int8
.L55:
    addi %r5,%r5,3  <---
    lbz %r3,0(%r5)
    extsb %r3,%r3
    b .L44

Why is the return pointer adjusted by 3?  I guess ppc_closure.S assumes
the closure fn will store byte return values to a (int *).  Which happens
to be just what libgcj did.

I figured that libgcj got this wrong, but I could be drawing the wrong
conclusions based on the other port implementations.

Jeff



More information about the Java-patches mailing list