Commit Graph

16 Commits

Author SHA1 Message Date
Eli Friedman a92db6773a Fix a small calling-convention bug for x86-32. PR14453.
llvm-svn: 168959
2012-11-29 23:21:04 +00:00
Eli Friedman 7919beaaf2 Fix a bug with va_arg and vectors on Darwin x86-32. <rdar://problem/11592208>.
llvm-svn: 158017
2012-06-05 19:40:46 +00:00
Eli Friedman f22fa9eaef Finish r144971, which was an incomplete commit.
llvm-svn: 144972
2011-11-18 04:01:36 +00:00
Eli Friedman 0b3f201b61 Fix the meaning of an "empty" record for the case of a zero-length array. Use isEmptyRecord for arguments on x86-32; there are structs of size 0 which don't count as empty.
llvm-svn: 144971
2011-11-18 03:47:20 +00:00
Eli Friedman 1d7dd3b682 A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.
llvm-svn: 144963
2011-11-18 02:12:09 +00:00
Eli Friedman e5c85622c9 Don't try to expand struct arguments containing holes on x86-32. From gcc struct layout tests.
llvm-svn: 144961
2011-11-18 01:32:26 +00:00
Eli Friedman ee94534662 Simplify code for returning a struct for Darwin x86-32 ABI. Use a better type for a function returning a struct containing only a pointer. Handle the edge case of a struct containing only a float or double plus some dead padding instead of asserting.
llvm-svn: 144960
2011-11-18 01:25:50 +00:00
Eli Friedman 9f061a37bb Ignore empty unions in argument lowering on x86-32. From gcc struct layout tests.
llvm-svn: 144944
2011-11-18 00:28:11 +00:00
Eli Friedman 95ff70021c Fix crash in calling convention code expanding an struct with a complex member.
llvm-svn: 144612
2011-11-15 02:46:03 +00:00
John McCall a5efa7386a Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots.  This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value.  It also brings us into compliance with
the x86-64 ABI.

llvm-svn: 138599
2011-08-25 23:04:34 +00:00
Chris Lattner a5f58b05e8 clang side to match the LLVM IR type system rewrite patch.
llvm-svn: 134831
2011-07-09 17:41:47 +00:00
Eli Friedman 3346582bca Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx should not imply -mno-sse.
Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__.

clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much.

<rdar://problem/9694837>

llvm-svn: 134770
2011-07-08 23:31:17 +00:00
Chris Lattner e76b95ae15 make the x86-32 backend specify a byval alignment, even when the
code generator will do it.  With this patch, clang compiles the example
in PR9794 to not have an alloca temporary.

llvm-svn: 131881
2011-05-22 23:35:00 +00:00
Bill Wendling 5cd41c4b13 Reapply r116684 with fixes. The test cases needed to be updated.
llvm-svn: 116696
2010-10-18 03:41:31 +00:00
Daniel Dunbar dd38fbc7fb IRgen/ABI/x86-32: Realign indirect arguments when the ABI requires us to pass
them with a smaller alignment than the rest of codegen expects.

llvm-svn: 114115
2010-09-16 20:42:06 +00:00
Daniel Dunbar ed23de3348 IRgen/ABI/x86_32/Darwin: On Darwin, only structures with SSE vector types get passed
with a non-default-stack-ABI-alignment (of 16).
 - This fixes the ABI convenient, but breaks codegen since we now have
   underaligned arguments. Marginal improvement overall though, and will be
   fixed in next commit.

llvm-svn: 114113
2010-09-16 20:42:00 +00:00