On Nov 12, 2010, at 4:23 PM, Eduardo Horvath wrote: > On Sat, 13 Nov 2010, Valeriy E. Ushakov wrote: > >> On Fri, Nov 12, 2010 at 21:59:54 +0100, Joerg Sonnenberger wrote: >> >>> On Fri, Nov 12, 2010 at 08:31:39PM +0000, Eduardo Horvath wrote: >>>> The assignment: >>>> >>>> foo.size = htole64(size); >>>> >>>> Cannot be replaced with: >>>> >>>> __inline __asm("stxa %1, [%0] ASI_LITLE" : &foo.size : size); >>> >>> Actually, it should be possible to do exactly that if you allow the >>> output register to be a memory location. Not sure how smart GCC is for >>> this though. >> >> Yeah, I don't see why memory operand contraint wouldn't work here. >> SPARC 'T' constraint - memory address aligned at 8 bytes. > > 'Cause you're storing to foo.size which is not a parameter in the macro.
Then again, you could teach the GCC optimizer to make the substitution. paul