]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/15301 ([3.3/3.4 only] gcc does not pass __m128 arguments corre...
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 18 May 2004 05:07:52 +0000 (05:07 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 18 May 2004 05:07:52 +0000 (22:07 -0700)
2004-05-17  H.J. Lu  <hongjiu.lu@intel.com>

Backport from mainline

PR debug/15301
PR debug/15302
2004-05-17  Jan Hubicka  <jh@suse.cz>

* i386.c (construct_container): Do not produce BLKmode registers.
(classify_argument): Properly compute alignment of complex types.

From-SVN: r81971

gcc/ChangeLog
gcc/config/i386/i386.c

index 3e793dacb78c5201fedc4e871ff8fb5cfacc2eb0..c7399e5fd7dd83083480a5fb1fef35778c217631 100644 (file)
@@ -1,3 +1,13 @@
+2004-05-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       Backport from mainline
+
+       PR debug/15301
+       PR debug/15302
+       2004-05-17  Jan Hubicka  <jh@suse.cz>
+
+       * i386.c (construct_container): Do not produce BLKmode registers.
+       (classify_argument): Properly compute alignment of complex types.
 2004-04-17  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR optimization/11841
index 171e9b6b1b78f566ae0a32f7a8afbb08e88ffa40..74e86a3c21d5fc6b5158ef695531dedba993c654 100644 (file)
@@ -1914,6 +1914,8 @@ classify_argument (mode, type, classes, bit_offset)
        mode_alignment = 128;
       else if (mode == XCmode)
        mode_alignment = 256;
+      if (COMPLEX_MODE_P (mode))
+       mode_alignment /= 2;
       /* Misaligned fields are always returned in memory.  */
       if (bit_offset % mode_alignment)
        return 0;
@@ -2095,7 +2097,8 @@ construct_container (mode, type, in_return, nintregs, nsseregs, intreg, sse_regn
       default:
        abort ();
       }
-  if (n == 2 && class[0] == X86_64_SSE_CLASS && class[1] == X86_64_SSEUP_CLASS)
+  if (n == 2 && class[0] == X86_64_SSE_CLASS && class[1] == X86_64_SSEUP_CLASS
+      && mode != BLKmode)
     return gen_rtx_REG (mode, SSE_REGNO (sse_regno));
   if (n == 2
       && class[0] == X86_64_X87_CLASS && class[1] == X86_64_X87UP_CLASS)
@@ -2107,7 +2110,8 @@ construct_container (mode, type, in_return, nintregs, nsseregs, intreg, sse_regn
     return gen_rtx_REG (mode, intreg[0]);
   if (n == 4
       && class[0] == X86_64_X87_CLASS && class[1] == X86_64_X87UP_CLASS
-      && class[2] == X86_64_X87_CLASS && class[3] == X86_64_X87UP_CLASS)
+      && class[2] == X86_64_X87_CLASS && class[3] == X86_64_X87UP_CLASS
+      && mode != BLKmode)
     return gen_rtx_REG (TCmode, FIRST_STACK_REG);
 
   /* Otherwise figure out the entries of the PARALLEL.  */