Boost logo

Boost :

From: Tomas Puverle (Tomas.Puverle_at_[hidden])
Date: 2006-07-04 13:28:22


> Could you send the sunpro versions to me (or the list) please? I'll
> see what I can do about getting them into asm() blocks in the morning.

I have tried and tried a while ago. :) My conclusion was that unfortunately
register allocation doesn't play nicely with inlining. Also, returning a
parameter is REALLY hard to do and I wasn't able to get it to work in the
general case. The atomics for sunpro are pretty much identical to the gcc
version, however, because the asm() block is inserted at a different stage of
compilation than the .il file, the block doesn't recognise the synthetic
instructions such as cas or casx. You will need to use the real version of
the instruction, which is CASA and CASXA, so your asm block will look like
this (if my memory serves me well):

//32-bit
  asm("casa (%reg) #ASI_PRIMARY_BIG, %compareReg, %swapReg")

//64-bit
  asm("casxa (%reg) #ASI_PRIMARY_BIG, %compareReg, %swapReg")

If you can get this to work, I'd love to hear back from you becase I
absolutely loathe the .il model. It really makes it difficult to write libs,
because you have to do special magic to add the .il to the compile line when
your library gets included.

Tom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk