linux-origin
[Top] [All Lists]

Re: broken compiler?

To: ralf@xxxxxxxxxxx (Ralf Baechle)
Subject: Re: broken compiler?
From: kanoj@xxxxxxxxxxxxxxxxxxx (Kanoj Sarcar)
Date: Tue, 28 Mar 2000 16:11:04 -0800 (PST)
Cc: linux-origin@xxxxxxxxxxx
In-reply-to: <20000329020346.A1451@xxxxxxxxxxxxxx> from "Ralf Baechle" at Mar 29, 2000 02:03:46 AM
Sender: owner-linux-origin@xxxxxxxxxxx
> 
> On Tue, Mar 28, 2000 at 02:41:57PM -0800, Kanoj Sarcar wrote:
> 
> > I am going nuts. The above should read:
> > 
> > volatile unsigned int test_lock2 = 0x123;
> > volatile unsigned int test_lock = 0xabc;
> > volatile unsigned int test_lock3 = 0x789;
> > 
> > If I load the dword at address &test_lock (which is a dword aligned addr),
> > I get 0xabc00000789. I was expecting 0x78900000abc.
> 
> Ok, but that's exactly what is expected to happen?!?
> 
>   Ralf
> 

Yes, okay, I was wrong. 

0xabc00000789 is expected, and that is what happens.

Which means, given an arbitrary address (and not the type), you have to do 
a lw, and not a ld, to access it. Which pretty much means that all the 
bitops routines need to do ll/sc instead of lld/scd. I will try out some
changes and see if it helps. (btw, I don't know what bestiality would
occur if you did a lld on a non dword aligned addr anyway).

Kanoj

<Prev in Thread] Current Thread [Next in Thread>