Logical shift right problem on alpha_osf32

Eduardo Takahashi takahasi+ at cs.cmu.edu
Thu Apr 24 12:34:39 PDT 1997

I noticed a problem with the logical shift right operation (>>>)
on the alpha_osf32 platform (works fine on other platforms)
The sign is being propagated to the right, producing wrong results,
as can be verified using this simple test:

class Shiftright {

    static void ShR() {

	int unsigned = 0x80000000;

	unsigned = unsigned >>> 24;

    public static void main (String[] args) {


The output is:


when it should be:


I found that when trying to decode Internet addresses from int's.
Couldn't figure out what is wrong though (don't have alpha assembly
documentation available).

Any suggestions?



More information about the kaffe mailing list