Thread.sleep() strangeness
Matthew P. Gleeson
gleeson at ERC.MsState.Edu
Wed Apr 29 12:32:03 PDT 1998
I think I can see where the problem occurs: the sysdepCallMethod()
macro in config/sparc/common.h doesn't do the right thing with the
64-bit jlong argument to Thread.sleep().
Admittedly it's my first day doing SPARC assembler, but I don't even
see how the macro works at all: it seems to assume that the SPARC has
64-bit registers for %o0-%o5.
It looks like the part that goes:
ld [%2],%%o0 \n\
ld [%2+8],%%o1 \n\
ld [%2+16],%%o2 \n\
ld [%2+24],%%o3 \n\
ld [%2+32],%%o4 \n\
ld [%2+40],%%o5 \n\
should actually go something like:
ldd [%2],%%o0 \n\
ldd [%2+8],%%o2 \n\
ldd [%2+16],%%o4 \n\
but that seems to mess things up elsewhere.
gback at cs.utah.edu writes:
>
> I don't have the time to track this down right now,
> but make sure you include "support.h" in the relevant files
> so that it is known that currentTime() returns a 64bit (jlong) value.
>
> The SPARC is one of the architectures where this doesn't work
> automatically. (it does on the x86, but then again on the x86 with gcc
> even things like: "int f() { g(); }" return the return value of g().)
>
> - Godmar
>
>
>
More information about the kaffe
mailing list