From: Uncle George <gatgul@voicenet.com>
To: axp-list@redhat.com, Dan Morrill <morrildl@nycap.rr.com>
Subject: Re: Function parameter weirdness
Date: Sun, 24 Oct 1999 11:03:57 -0400 [thread overview]
Message-ID: <38131FDD.C888DB8@voicenet.com> (raw)
In-Reply-To: Pine.LNX.4.10.9910232237150.13997-100000@obsequious.yi.org
Dear flummoxed:
What u have caught, as it has caught many of the unwary, is the methods of
maddness employed in passing parameters via register on the 64bit alpha.
What u see in your int compare is only what u believe is happening. In
reality there is a long compare happening ( there is no int compare as part of
the hardware instruction set ). At the time of compare, the subroutine presumes
that the Hi-Order Word ( 32bit ) is properly sign extended ( +=0fill, -=
0xffffffff filled ) BEFOR-HAND . So if u look at the register ( with gdb ) u
will see ur 9600 in the right half, but something else in the left half - junk.
One might presume that since the variable is 32 bits, that only the right half
will be used - BUT THIS AINT JUST SO. this is especially so in compares.
This sorta makes the case for getting ur parameter casts properly done.
And I'm sure there is gonna be a question of the JNI for java/alpha. The JNI for
JDK1.2 got a whole lot better at figuring out what to do with parameters &
return values. But then that is what SUN designed into their assembler/JNI
interface, and I had little choice but to follow. The JNI interface for jdk118
was a lot simpler, more stupid, and not at all intelligent about what gets put
in the unused bits of the register.. :-\
Shazzbott, where's an orkin when u need one.
.Dan Morrill wrote:
>
>
> Okay, here's a weird one for the gurii. I am attempting to get the JavaComm
> package working with UG's JDK 1.1.8. The JavaCOMM API requires that you have
> a native JNI driver for your platform; the one for Linux is called
> RXTX (at http://www.frii.com/~jarvi/rxtx/ ).
>
>
> Anyone have any ideas? This has got me mightily flummoxed.
>
> My machine is an SX164; kernel 2.2.12. More info available upon request.
>
>
next prev parent reply other threads:[~1999-10-24 15:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-24 3:03 Function parameter weirdness Dan Morrill
1999-10-24 15:03 ` Uncle George [this message]
1999-10-24 20:18 ` Dan Morrill
1999-10-25 10:19 ` Uncle George
1999-10-28 23:38 ` Richard Henderson
1999-10-29 10:28 ` Uncle George
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox