Subject: Re: asm line separators
To: None <tech-toolchain@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-toolchain
Date: 06/12/2002 14:56:46
>> Is there scope for 'fixing' gcc so that a single line separater will
>> work for all architectures (in asm() statements).
> The problem isn't GCC. It's the assembler. And, the assembler
> syntax is chosen for a platform in order to be compatible with other
> assemblers for that platform, generally.
Yes...I took the suggestion to be that some character sequence is
reserved by gcc, so that when it appears in an asm, gcc knows it can
turn it into a line break in the assembler output.
Hmm, what does \n do in an asm? Perhaps that's the Right Answer:
asm("ld [%1],%0\n mfpsr %2\n frob %2,%0\n st %2,[%1]" : ...)
If it isn't, perhaps it should be. :-)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B