[llvm][Patch 1/3] ppc-darwin AsmParser Base implementation.

Iain Sandoe iain at codesourcery.com
Sun Dec 8 02:47:55 PST 2013


Hi David,

On 8 Dec 2013, at 07:49, David Fang wrote:
> It occurred to me that there's no real compelling reason to reject ELF syntax for darwin targets, nor darwin-syntax for ELF targets.  Though strange it seems, it was kind of novel having the hello-reloc.s test written in ELF syntax be targeted to darwin object generation. While I agree that syntax should not be mixed within a single assembly file, is it really necessary to restrict the syntax to the target?  It is *just* syntax.

Probably, one has to have a flag (GAS uses -mregnames) to control checking of validity for each register syntax.
Also the difference between pre xx16() and post @l/hx needs validation, and there's a large bunch of post @xxxxx modifiers that are not valid for darwin.

Having interchangeable syntax is a nice idea, but doesn't come for free in terms of support, testing and maintenance.  I'd say "let's get powerpc-apple-darwin{8,9} working well with default settings and syntax, and then look at possible extensions".

"Just switching" to the form used by ELF targets would mean checking the cases that are not allowed for darwin, and being prepared to convert asm in any darwin codebase that happens to use it.
Iain

>> On 5 Dec 2013, at 23:59, David Fang wrote:
>> 
>>> Attached is the change to the aforementioned test case.
>>> Consider it patch part 4.
>> 
>> LGTM
>> .. we still need to add a couple more tests to check for wrong use of .machine directives.
>> 
>> Iain
>> 
> 
> -- 
> David Fang
> http://www.csl.cornell.edu/~fang/
> 





More information about the llvm-commits mailing list