calls.c (precompute_register_parameters): Force non-legitimate constants into pseudos.
* calls.c (precompute_register_parameters): Force non-legitimate constants into pseudos. * gcc.dg/tls/opt-3.c: New. From-SVN: r57709
This commit is contained in:
parent
78872ad9bd
commit
fd1e5d25e3
|
@ -1,3 +1,8 @@
|
|||
2002-10-01 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* calls.c (precompute_register_parameters): Force non-legitimate
|
||||
constants into pseudos.
|
||||
|
||||
2002-10-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config/rs6000/spe.md (spe_evrlwi): Add missing third operand
|
||||
|
|
|
@ -876,6 +876,12 @@ precompute_register_parameters (num_actuals, args, reg_parm_seen)
|
|||
emit_queue ();
|
||||
}
|
||||
|
||||
/* If the value is a non-legitimate constant, force it into a
|
||||
pseudo now. TLS symbols sometimes need a call to resolve. */
|
||||
if (CONSTANT_P (args[i].value)
|
||||
&& !LEGITIMATE_CONSTANT_P (args[i].value))
|
||||
args[i].value = force_reg (args[i].mode, args[i].value);
|
||||
|
||||
/* If we are to promote the function arg to a wider mode,
|
||||
do it now. */
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fpic } */
|
||||
/* { dg-options "-O2 -fpic -mregparm=3" { target i?86-*-* } } */
|
||||
|
||||
extern __thread int i, j, k;
|
||||
extern void bar(int *, int *, int *);
|
||||
void foo(void)
|
||||
{
|
||||
bar(&i, &j, &k);
|
||||
}
|
Loading…
Reference in New Issue