diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-01 20:49:39 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-01 20:49:39 +0000 |
commit | e80b44630607ead2a1a21df43fc1e0492888aeb1 (patch) | |
tree | 7de45aa9675d34d2ce1aa783dc84b827c618e43d /gcc/calls.c | |
parent | aa2b72ba0be84e7289c5804e840710410187029b (diff) |
* calls.c (precompute_register_parameters): Force non-legitimate
constants into pseudos.
* gcc.dg/tls/opt-3.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57709 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index ffedacabbb0..d706751c162 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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. */ |