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: PATCH libjava: Enable bytecode interpreter for sparc*-*


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


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