[RFC v2] Towards an assembler parser for PowerPC
Roman Divacky
rdivacky at freebsd.org
Mon Mar 11 11:03:31 PDT 2013
> > diff-llvm-asm-parser:
> >
> > .word parsing should not be ppc-only, gnu as supports that on all archs
>
> Well, the other archs have .word support in their backends, too. I had
> assumed this is the case because the semantics of .word differs between
> platforms (different word size).
Ah... in that case just leave it as it is :(
> > [rdivacky at anacreon ~]$ cat parser.s
> > ld %r1,0(%r1)
> > [rdivacky at anacreon ~]$ as parser.s
> > [rdivacky at anacreon ~]$ ~/llvm/Release+Asserts/bin/clang -integrated-
> > as parser.s
> > parser.s:1:4: error: unknown operand
> > ld %r1,0(%r1)
> > ^
> > parser.s:1:4: error: unexpected token at start of statement
> > ld %r1,0(%r1)
> > ^
>
> Hmmm. Right now the parser only supports the default register naming
> "ld 1,0(1)". But I agree it would probably be better to support the %r
> register names, too. I'll have a look ...
Please do, doesnt look like something thats hard to do.
Thanks! Roman
More information about the llvm-commits
mailing list