[LLVMdev] making emitInlineAsm protected
rkotler at mips.com
Wed Jan 29 16:14:44 PST 2014
On 01/29/2014 10:01 AM, Eric Christopher wrote:
> On Wed, Jan 29, 2014 at 9:54 AM, Reed Kotler <rkotler at mips.com> wrote:
>> On 01/28/2014 06:29 PM, Eric Christopher wrote:
>>> On Tue, Jan 28, 2014 at 4:56 PM, reed kotler <rkotler at mips.com> wrote:
>>>> I would like to make the following member of AsmPrinter be protected
>>>> void EmitInlineAsm(StringRef Str, const MDNode *LocMDNode = 0,
>>>> InlineAsm::AsmDialect AsmDialect =
>>>> InlineAsm::AD_ATT) const;
>>>> I have some stubs that I want to emit in MipsAsmParser .
>>>> Are there any objections to doing this?
>>>> LLVM Developers mailing list
>>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> Stubs to emit in MipsAsmPrinter
>> I think you were one of the people that was against me emitting the inline
>> asm earlier as part of the IR.
>> Well, now I am starting to move that to the back end of code generation due
>> to other issues that were not apparent when I first implemented this mips16
>> hard float.
>> Also, it was agreed at that time that it would be better if possible to do
>> things this way.
> Why not just note that you need to emit the functions as you output
> and then emit them during MC?
Let me go back one step...
You are saying that instead of using EmitRawText, that I try and do this
with the higher level AsmPrinter methods.
//Here is a little snipped that does not even include instructions:
OutStreamer.EmitRawText("\t.section\t.mips16.call.fp"+Twine(Symbol)+",\"ax\", at progbits");
OutStreamer.EmitRawText("\t.ent\t__call_stub_fp_" + Twine(Symbol));
OutStreamer.EmitRawText("\t.type\t__call_stub_fp_" + Twine(Symbol)
+ ", @function");
OutStreamer.EmitRawText("\t__call_stub_fp_" + Twine(Symbol) + ":");
OutStreamer.EmitRawText("\t.size __call_stub_fp_" + Twine(Symbol) +
", .-__call_stub_fp_" + Twine(Symbol));
OutStreamer.EmitRawText("\t.end __call_stub_fp_" + Twine(Symbol));
(I have other code that generates the exact instructions).
Here is the code it wants to generate:
# Stub function to call double __floatdidf ()
.section .mips16.call.fp.__floatdidf,"ax", at progbits
.type __call_stub_fp___floatdidf, @function
.size __call_stub_fp___floatdidf, .-__call_stub_fp___floatdidf
This requires a lot of pseudo ops.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev