This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MS/CW-style inline assembly for GCC


>>>>> "Stan" == Stan Shebs <shebs@apple.com> writes:

 >> To do CW-syntax (in an ideal) world, you'd want the assembler
 >> integrated into the compiler.  It would then parse the assembly
 >> code, emitting actual RTL insns into the instruction stream.
 >> Right?  (That, presumably, is how CW actually inserts code in and
 >> amongst these assembly instructions; it just puts them into the
 >> instruction stream and then happily schedules them along with
 >> everything else.)  Whereas Apple's current implementation produces
 >> one big asm string for GCC, annoated with constraints obtained by
 >> parsing the assembly code a bit.  Right?

 Stan> Right, although I make a separate asm statement for each line
 Stan> of assembly (if nothing else, a single asm statement would have
 Stan> a rather large number of inputs, outputs, and clobbers, could
 Stan> cause reload problems).

Um, so you'd end up generating code that is the user-written asm
statements interspersed with compiler generated loads/stores?

Yikes.

I think an asm statement with any semantics OTHER than "make this
block of instructions appear in the binary exactly as written" is
badly broken.  (Yes, that's why the MIPS assembler is bogus --
although there at least you can tell it ".set noreorder".)

	 paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]