[PATCH] Darwin vararg parameters support in assembler macros

Janne Grunau j at jannau.net
Mon Jul 28 06:45:03 PDT 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-MC-enable-gas-vararg-style-macro-arguments-on-darwin.patch
Type: text/x-diff
Size: 3034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140728/9e795c1b/attachment.patch>


More information about the llvm-commits mailing list