Commit 2c6b27c3 by Jan Hubicka Committed by Jan Hubicka

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
parent 044b3892
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> 2004-05-17 H.J. Lu <hongjiu.lu@intel.com>
PR target/15084 PR target/15084
......
...@@ -2246,6 +2246,8 @@ classify_argument (enum machine_mode mode, tree type, ...@@ -2246,6 +2246,8 @@ classify_argument (enum machine_mode mode, tree type,
mode_alignment = 128; mode_alignment = 128;
else if (mode == XCmode) else if (mode == XCmode)
mode_alignment = 256; mode_alignment = 256;
if (COMPLEX_MODE_P (mode))
mode_alignment /= 2;
/* Misaligned fields are always returned in memory. */ /* Misaligned fields are always returned in memory. */
if (bit_offset % mode_alignment) if (bit_offset % mode_alignment)
return 0; return 0;
...@@ -2423,7 +2425,8 @@ construct_container (enum machine_mode mode, tree type, int in_return, ...@@ -2423,7 +2425,8 @@ construct_container (enum machine_mode mode, tree type, int in_return,
default: default:
abort (); 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)); return gen_rtx_REG (mode, SSE_REGNO (sse_regno));
if (n == 2 if (n == 2
&& class[0] == X86_64_X87_CLASS && class[1] == X86_64_X87UP_CLASS) && 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, ...@@ -2435,7 +2438,8 @@ construct_container (enum machine_mode mode, tree type, int in_return,
return gen_rtx_REG (mode, intreg[0]); return gen_rtx_REG (mode, intreg[0]);
if (n == 4 if (n == 4
&& class[0] == X86_64_X87_CLASS && class[1] == X86_64_X87UP_CLASS && 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); return gen_rtx_REG (XCmode, FIRST_STACK_REG);
/* Otherwise figure out the entries of the PARALLEL. */ /* Otherwise figure out the entries of the PARALLEL. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment