[LLVMdev] making emitInlineAsm protected

Eric Christopher echristo at gmail.com
Wed Jan 29 14:32:29 PST 2014


On Wed, Jan 29, 2014 at 2:27 PM, reed kotler <rkotler at mips.com> wrote:
> On 01/29/2014 02:18 PM, Rafael EspĂ­ndola wrote:
>>>
>>> I'd like to just check my code in and then you can look at it in it's
>>> totality and see if you have
>>> a better solution .
>>
>> No!
>>
>> If it is the compiler creating instructions, it is not inline
>> assembly. If you need to print mips16 and mips32 and they are two
>> independent instruction sets, my guess is that you need to figure out
>> how to swap between two AsmPrinters.
>>
>> Cheers,
>> Rafael
>
> We do switch them already.
>
> We create different functions for the stubs and assign them the mips32
> attribute.
>
> Then they get assembled.
>
> The need for these particular stubs cannot be recognized until isel
> lowering.
>
> Why do I need to make a complex mechanism here when all I need to do is emit
> some
> some inline assembly code at the end of asm printer?
>
> What purpose will this serve?
>

Because we're not an assembly emitting compiler. We're an object file
emitting compiler and it's breaking abstractions. The correct way to
do the work here is to emit the functions and lower them
appropriately.

-eric




More information about the llvm-dev mailing list