[PATCH] Inserting directives directly after inline asm blocks

Jack Carter Jack.Carter at imgtec.com
Thu Apr 25 15:03:47 PDT 2013


I think I see the confusion.

The code I am adding really codegen producing something to the .s file just like the .set noreorder we do at the beginning of a function and .set reorder we do at the end of a function. It has nothing to do with the MC layer.

The only reason I needed to expose AsmPrinter::EmitInlineAsm() and make a Mips derived class of it was to alert when to generate the directives. Maybe there is another way to detect this, but this seemed the most obvious.

Can I check it in ;-) 

Jack
________________________________________
From: Rafael EspĂ­ndola [rafael.espindola at gmail.com]
Sent: Thursday, April 25, 2013 1:04 PM
To: Jack Carter
Cc: Richard Sandiford; llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Inserting directives directly after inline asm blocks

On 25 April 2013 16:00, Jack Carter <Jack.Carter at imgtec.com> wrote:
> I guess I am missing something here.
>
> I do not expect the code generator to ever to support .set reorder. It is due to ancient compilers not handling delay slots in Mips and leaving that to the assembler. The assembler handles the state of reorder/noreorder on its own just as it will handle pushed and popped states in the future. This emission of the set reorder/noreorder is just to feed the assembler what it expects.
>
> I don't see the need to create the new methods, but I do want to know why I am wrong ;-)

MC is not a code generator, it is an assembler. If user inline
assembly requires ".set reorder", you will need to implement this in
MC. It is better to get an error now than to silently drop it by
checking hasRawTextSupport.


> Jack

Cheers,
Rafael





More information about the llvm-commits mailing list