Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2005-04-14 10:30:02


On Thu, Apr 14, 2005 at 10:00:54AM -0500, Rene Rivera wrote:

> Peter Dimov wrote:
> >Rene Rivera wrote:
> >>OK, I tried translating the gcc_x86. But I just don't understand the
> >>GCC machine description language well enough. What does the assembly
> >>end up being for all those memory, cc, etc. ?
> >
> >I don't think that CodeWarrior has any way of specifying whether an asm
> >statement affects memory, clobbers a register, or should not be
> >reordered. It's supposedly (and hopefully) smart enough to figure these
> >things out on its own. ;-)
>
> It is smart enough, and you have to jump some hoops to make it optimize
> assembly blocks.. But I also meant all the other GCC constructs that I
> don't know :-) For example MOVL is not x86 assembly, but some GCC
> construct, and I'm not totally sure yet if it's just the argument
> inverted version of MOV. This is what I came up with for the
> atomic_conditional_increment..

I think it's just 32-bit MOV in AT&T syntax ('l' is for long).
Since it's AT&T syntax, the args are inverted.

Google for "gcc asm syntax" and you'll get a plethora of pages on it,
including converting to/from CW asm.

jon

-- 
"Yield to temptation, it may not pass your way again."
	- Robert Heinlein

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