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:
parent
5417e0224b
commit
f2f0a9602a
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
|
16
gcc/testsuite/gcc.target/i386/stack-realign.c
Normal file
16
gcc/testsuite/gcc.target/i386/stack-realign.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user