[PATCH] Darwin vararg parameters support in assembler macros

llvm at dyatkovskiy.com llvm at dyatkovskiy.com
Mon Jul 28 11:26:51 PDT 2014


Hi Kevin, Janne.
Thanks! Sorry I had activity on another project and didn't answer.
I also like this patch. Perhaps I missed something, but could you explain this string:
+.make_macro .macro,.endmacro,.mybyte,.byte $0, $2, $1

-Stepan

28.07.2014, 22:17, "Kevin Enderby" <enderby at apple.com>:
> Hi Janne & Stepan.
>
> I spent some time Friday looking at this coming up to speed and found the reference you cited below.  I was a bit lost with the first set of diffs and what it was trying to do but your one line change looks fine to me.  I agree this shouldn’t have any interaction with the darwin style macros and no need for an option or additional tests past what is in your patch with the one line source change.
>
> So “Looks good to me”,
>
> Kev
>
> On Jul 28, 2014, at 6:45 AM, Janne Grunau <j at jannau.net> wrote:
>>  Hi Kevin, Stepan,
>>
>>  On 2014-07-25 10:53:52 -0700, Kevin Enderby wrote:
>>>  Jim, Tim and I just spoke about this at the end of our staff meeting.
>>>  One of us will take a look at this soon.
>>  Thanks
>>>  But please be aware none of us are familiar with GAS’s vararg
>>>  parameters support in assembler macros.
>>  The last parameter can be modified with 'vararg' and then takes all
>>  remaining arguments from the macro instantiation. See
>>  https://sourceware.org/binutils/docs/as/Macro.html#Macro in the gnu as
>>  manual for reference.
>>>  Also pretty sure I did not do the implementation of the assembler
>>>  macro support in llvm-mc.  So it make take us some time to come up to
>>>  speed on this.
>>>
>>>  We did agree that there is no need to mix this into the existing
>>>  darwin positional parameters.  And keeping it simple by making sure it
>>>  works with GAS style assembler macros only is fine.  So if you want to
>>>  simplify the patch in that direction that would be OK.
>>  A single line change in AsmParser is enough. see attached patch.
>>>  At the end of the day we want to make sure that the existing darwin
>>>  assembler style macros works as we do have a fair bit of code here
>>>  that uses them.
>>  I can't think of anything which should be added to the existing darwin
>>  style assembler macro tests as there should be no interaction.
>>>  So if you can enable uses of GAS style vararg parameters support as an
>>>  option that would be fine.
>>  I don't think it needs an option unless you want to reject assembly with
>>  ':vararg' as invalid on darwin.
>>
>>  Janne
>>  <0001-MC-enable-gas-vararg-style-macro-arguments-on-darwin.patch>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list