On 01/29/2014 12:14 PM, Rafael Espíndola wrote:> On 28 January 2014 19:56, 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 . > You mean Printer? There is no such a thing as inline asm in a .s file. > >> Are there any objections to doing this? > Probably. EmitInilneAsm is the only case I know that has a reasonable > use of hasRawTextSupport in order for it to work on targets without an > asm parser. Exposing it exposes a way for targets avoid the MC layer. > > Cheers, > RafaelSo how do I create stubs? I have specific function stubs that I want to create. There is no direct object emitter for mips16 at this time. Reed
> So how do I create stubs? > > I have specific function stubs that I want to create. > > There is no direct object emitter for mips16 at this time.Print it like any other instruction? Cheers, Rafael
On 01/29/2014 01:48 PM, Rafael Espíndola wrote:>> So how do I create stubs? >> >> I have specific function stubs that I want to create. >> >> There is no direct object emitter for mips16 at this time. > Print it like any other instruction? > > Cheers, > RafaelWhere am I supposed to be doing that? I have to create new functions. Reed
On 01/29/2014 01:48 PM, Rafael Espíndola wrote:>> So how do I create stubs? >> >> I have specific function stubs that I want to create. >> >> There is no direct object emitter for mips16 at this time. > Print it like any other instruction? > > Cheers, > RafaelWhy not just do this in asmprinter? It's very straightforward there.
On 01/29/2014 01:48 PM, Rafael Espíndola wrote:>> So how do I create stubs? >> >> I have specific function stubs that I want to create. >> >> There is no direct object emitter for mips16 at this time. > Print it like any other instruction? > > Cheers, > RafaelI've already written the code to this in asm printer. Where is it written that you are not supposed to do this? You should make the data structures private in that case. I'm using all public interfaces. Reed
On 01/29/2014 01:48 PM, Rafael Espíndola wrote:>> So how do I create stubs? >> >> I have specific function stubs that I want to create. >> >> There is no direct object emitter for mips16 at this time. > Print it like any other instruction? > > Cheers, > RafaelThe other problem here is that I have to emit mips32 code for these stubs and I'm in mips16 mode while I'm compiling the function that needs the stub. It's a different instruction set.
On 01/29/2014 01:48 PM, Rafael Espíndola wrote:>> So how do I create stubs? >> >> I have specific function stubs that I want to create. >> >> There is no direct object emitter for mips16 at this time. > Print it like any other instruction? > > Cheers, > RafaelI'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 . Reed