[PATCH] Support -fpcc-struct-return for x86-32

Arthur O'Dwyer arthur.j.odwyer at gmail.com
Wed Jun 5 13:23:49 PDT 2013


Hello all,

  This is my first post to cfe-commits, so my apologies if I get
something wrong.
A while back I filed an issue on Bugzilla requesting support for
-fpcc-struct-return:
http://llvm.org/bugs/show_bug.cgi?id=13012

Recently I wrote a real patch for the issue and verified that Clang's
test suite still passes (at least on a 64-bit OSX host, which is
probably meaningless in this context). I don't know how to test the
option properly, and I believe I don't have the necessary credentials
to commit the patch anyway, so basically I'm looking for a patron to
adopt this patch. :)

To observe what the patch does:
  echo "struct S {int i;} foo() {return (struct S){42};}" >foo.c
  clang -m32 -O3 -fomit-frame-pointer foo.c -S -o reg.s
  clang -m32 -O3 -fomit-frame-pointer foo.c -S -o pcc.s -fpcc-struct-return
  diff reg.s pcc.s

The .diff is attached to this email. What should be my next step? Help!

Thanks,
-Arthur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpcc-struct-return-v2.diff
Type: application/octet-stream
Size: 7298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130605/e24661df/attachment.obj>


More information about the cfe-commits mailing list