[RFC v2] Towards an assembler parser for PowerPC

Roman Divacky rdivacky at freebsd.org
Sat Mar 9 03:37:37 PST 2013


Ulrich,

So I looked at the asm parser patches and did some testing etc. Few issues :)

diff-llvm-asm-address:

dont remove the mayLoad

-let mayLoad = 1 in
-def LHAU8 : DForm_1a<43, (outs G8RC:$rD, ptr_rc:$ea_result), (ins symbolLo:$disp,
-                            ptr_rc:$rA),
-                    "lhau $rD, $disp($rA)", LdStLHAU,
-                    []>, RegConstraint<"$rA = $ea_result">,
+def LHAU8 : DForm_1<43, (outs G8RC:$rD, ptr_rc:$ea_result),
+                    (ins memri:$addr),
+                    "lhau $rD, $addr", LdStLHAU,
+                    []>, RegConstraint<"$addr.reg = $ea_result">,



diff-llvm-asm-parser:

.word parsing should not be ppc-only, gnu as supports that on all archs


[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)
   ^

Would be lovely to fix those issues. Thanks!

Roman


On Mon, Feb 25, 2013 at 08:03:34PM +0100, Ulrich Weigand wrote:
> David Fang <fang at csl.cornell.edu> wrote on 21.02.2013 22:30:25:
> 
> > I am very much looking forward to seeing/testing this on svn-trunk.
> > How close is this effort to making it to trunk?
> > Is there a public branch I can preview in the mean time?
> > Will there be 32b support as well?
> > I'm particularly interested in being able to use PowerPC's AsmParser in
> > testing PPCMachObjectWriter (doesn't exist yet).
> 
> Sorry, I had gotten side-tracked into another project over the past
> couple of weeks ...  But I'm definitely still working on AsmParser.
> How long this is still going to take depends a bit on reviewers,
> but if everything goes well, I hope it can get in within the next
> 2-3 weeks or so.
> 
> I don't have a public branch, but I'm attaching a quilt stack of
> the current patch set against current SVN head.
> 
> I haven't really done anything for 32 bit support yet, but I guess
> this ought to be handled somehow for the version that makes it
> into trunk.  If you're interested in helping test 32 bit support,
> I'd certainly appreciate that :-)
> 
> Bye,
> Ulrich
> 
> (See attached file: patches-parser.tar.gz)


> _______________________________________________
> 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