gcc 3.2.3 config/os/bits/i386/atomicity.h broken

Loren James Rittle rittle@latour.rsch.comm.mot.com
Mon Apr 28 22:10:00 GMT 2003


In article <hosms3ghgs.fsf@byrd.suse.de> Andreas write:
>> [...]
>> However, the patch within implies to me that plain xchgl will fail on
>> x86-64 (would a compiler configured as i386-*-* be expected to support
>> x86-64? was the patch pessimistic?):

>>   http://www.x86-64.org/lists/discuss/msg01969.html

>> (The reason, I'm questioning above, is because I don't know.  I recall
>> that the 68K weakened the strength of TAS between 000 and 0[12]0 when
>> they added support for MP and a new bus locking protocol.  But that
>> was a lifetime ago.)

> xchgl will work correctly on x86-64.  The only problem (and that's why
> it was disabled temporarily in the patch you mentioned) is that
> arguments to it might have a different size.

Andreas,

I really want to fix 3.3 before release, if possible.  Could you tell
me how to write this code for generic i386 yet still run properly on
x86-64?  Is it merely a matter of pointing to a larger space than
required for a plain i386?  How about using `xchgb' instead of
'xchgl'?  We only need one sole bit of atomic swap space for the
algorithm proposed.  As an authority on the x86-64, I'd really
appreciate any time you'd spend thinking about it.

Regards,
Loren



More information about the Libstdc++ mailing list