aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-05-17 17:23:12 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-05-17 15:23:12 +0000
commit2c6b27c369a9d2ab7f7116add931089b9e8f7b69 (patch)
tree01b157cced5ed33a1a7baaf1724c5b88164500ba
parent044b389201cf912c8b94e7e228cb136493d967ca (diff)
downloadgcc-2c6b27c369a9d2ab7f7116add931089b9e8f7b69.zip
gcc-2c6b27c369a9d2ab7f7116add931089b9e8f7b69.tar.gz
gcc-2c6b27c369a9d2ab7f7116add931089b9e8f7b69.tar.bz2
i386.c (construct_container): Do not produce BLKmode registers.
* i386.c (construct_container): Do not produce BLKmode registers. (classify_argument): Properly compute alignment of complex types. From-SVN: r81937
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 694bb5c..906b4d5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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-05-17 H.J. Lu <hongjiu.lu@intel.com>
PR target/15084
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 9e8fdf4..ad0407d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2246,6 +2246,8 @@ classify_argument (enum machine_mode mode, tree type,
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;
@@ -2423,7 +2425,8 @@ construct_container (enum machine_mode mode, tree type, int in_return,
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)
@@ -2435,7 +2438,8 @@ construct_container (enum machine_mode mode, tree type, int in_return,
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 (XCmode, FIRST_STACK_REG);
/* Otherwise figure out the entries of the PARALLEL. */