summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/x86_32-arguments-linux.c
Commit message (Collapse)AuthorAgeFilesLines
* IR: print value numbers for unnamed function argumentsTim Northover2019-08-031-6/+6
| | | | | | | | | | For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
* Revert r363116 "[X86] [ABI] Fix i386 ABI "__m64" type bug"Hans Wennborg2019-06-191-2/+2
| | | | | | | | | | | | | | | | | | | | | This introduced MMX instructions in code that wasn't previously using them, breaking programs using 64-bit vectors and x87 floating-point in the same application. See discussion on the code review for more details. > According to System V i386 ABI: the __m64 type paramater and return > value are passed by MMX registers. But current implementation treats > __m64 as i64 which results in parameter passing by stack and returning > by EDX and EAX. > > This patch fixes the bug (https://bugs.llvm.org/show_bug.cgi?id=41029) > for Linux and NetBSD. > > Patch by Wei Xiao (wxiao3) > > Differential Revision: https://reviews.llvm.org/D59744 llvm-svn: 363790
* [X86] [ABI] Fix i386 ABI "__m64" type bugPengfei Wang2019-06-121-2/+2
| | | | | | | | | | | | | | | | According to System V i386 ABI: the __m64 type paramater and return value are passed by MMX registers. But current implementation treats __m64 as i64 which results in parameter passing by stack and returning by EDX and EAX. This patch fixes the bug (https://bugs.llvm.org/show_bug.cgi?id=41029) for Linux and NetBSD. Patch by Wei Xiao (wxiao3) Differential Revision: https://reviews.llvm.org/D59744 llvm-svn: 363116
* LLVM IR: Generate new-style byval-with-Type from ClangTim Northover2019-06-051-14/+14
| | | | | | | | | | | LLVM IR recently added a Type parameter to the byval Attribute, so that when pointers become opaque and no longer have an element type the information will still be present in IR. For now the Type parameter is optional (which is why Clang didn't need this change at the time), but it will become mandatory soon. llvm-svn: 362652
* Revert "[X86] Fix i386 struct and union parameter alignment"Pengfei Wang2019-05-311-12/+12
| | | | | | | | | | This reverts commit d61cb749f4ac2c90244906d756e80a5c4a7ffa89 (SVN: 361934). According to James suggestion, revert this change. Please ref: https://reviews.llvm.org/D60748 llvm-svn: 362186
* [X86] Fix i386 struct and union parameter alignmentPengfei Wang2019-05-291-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to i386 System V ABI 2.1: Structures and unions assume the alignment of their most strictly aligned component. But current implementation always takes them as 4-byte aligned which will result in incorrect code, e.g: 1 #include <immintrin.h> 2 typedef union { 3 int d[4]; 4 __m128 m; 5 } M128; 6 extern void foo(int, ...); 7 void test(void) 8 { 9 M128 a; 10 foo(1, a); 11 foo(1, a.m); 12 } The first call (line 10) takes the second arg as 4-byte aligned while the second call (line 11) takes the second arg as 16-byte aligned. There is oxymoron for the alignment of the 2 calls because they should be the same. This patch fixes the bug by following i386 System V ABI and apply it to Linux only since other System V OS (e.g Darwin, PS4 and FreeBSD) don't want to spend any effort dealing with the ramifications of ABI breaks at present. Patch by Wei Xiao (wxiao3) Differential Revision: https://reviews.llvm.org/D60748 llvm-svn: 361934
* [opaque pointer types] Explicit non-pointer type for call expressionsDavid Blaikie2015-04-161-1/+1
| | | | | | (migration for recent LLVM change to textual IR for calls) llvm-svn: 235147
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-1/+1
| | | | | | tests fail. llvm-svn: 188447
* IR-gen should not generate an MMX types unless the code is explicitly using MMXChad Rosier2013-03-251-2/+2
| | | | | | | intrinsics. rdar://13213542 llvm-svn: 177911
* Update testcases due to Attribute sorting improvements.Bill Wendling2013-02-151-14/+14
| | | | llvm-svn: 175253
* Update the tests.Bill Wendling2013-01-311-14/+14
| | | | | | | This update coincides with r174110. That change ordered the attributes alphabetically. llvm-svn: 174111
* Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx ↵Eli Friedman2011-07-081-1/+1
| | | | | | | | | | | | 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
* make the x86-32 backend specify a byval alignment, even when theChris Lattner2011-05-221-2/+2
| | | | | | | code generator will do it. With this patch, clang compiles the example in PR9794 to not have an alloca temporary. llvm-svn: 131881
* Reapply r116684 with fixes. The test cases needed to be updated.Bill Wendling2010-10-181-2/+2
| | | | llvm-svn: 116696
* IRgen/ABI/x86-32: Realign indirect arguments when the ABI requires us to passDaniel Dunbar2010-09-161-12/+12
| | | | | | them with a smaller alignment than the rest of codegen expects. llvm-svn: 114115
* IRgen/x86_32/Linux: Linux seems to align all stack objects to 4 bytes, unlikeDaniel Dunbar2010-09-161-0/+51
Darwin. Checked vs the handiest Linux llvm-gcc I had around, someone on Linux is welcome to investigate more. llvm-svn: 114112
OpenPOWER on IntegriCloud