i386.c (ix86_function_regparm): Added checking of ix86_force_align_arg_pointer to determine the number of...

* config/i386/i386.c (ix86_function_regparm): Added checking of 
	ix86_force_align_arg_pointer to determine the number of
	register parameters.
	* gcc.target/i386/stack-realign.c: New.

From-SVN: r125173
This commit is contained in:
Hui-May Chang 2007-05-29 22:49:42 +00:00 committed by Hui-May Chang
parent 5417e0224b
commit f2f0a9602a
4 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-05-29 Hui-May Chang <hm.chang@apple.com>
* config/i386/i386.c (ix86_function_regparm): Added checking of
ix86_force_align_arg_pointer to determine the number of
register parameters.
2007-05-29 Zdenek Dvorak <dvorakz@suse.cz>
* tree-vectorizer.h (DR_MISALIGNMENT): Cast aux to integer.

View File

@ -2837,7 +2837,8 @@ ix86_function_regparm (tree type, tree decl)
/* We can't use regparm(3) for nested functions as these use
static chain pointer in third argument. */
if (local_regparm == 3
&& decl_function_context (decl)
&& (decl_function_context (decl)
|| ix86_force_align_arg_pointer)
&& !DECL_NO_STATIC_CHAIN (decl))
local_regparm = 2;

View File

@ -1,3 +1,7 @@
2007-05-29 Hui-May Chang <hm.chang@apple.com>
* gcc.target/i386/stack-realign.c: New.
2007-05-29 Zdenek Dvorak <dvorakz@suse.cz>
* gcc.dg/tree-ssa/prefetch-6.c: New test.

View File

@ -0,0 +1,16 @@
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-options "-mstackrealign -O2" } */
extern void abort (void);
__attribute__((noinline)) static void foo (int i1, int i2, int i3)
{
if (i3 != 3)
abort ();
}
int main (int argc, char **argv)
{
foo (1, 2, 3);
return 0;
}