mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-04 09:14:04 +08:00
mips.c (mips_global_pointer): Force functions with a nonlocal goto to set up $gp.
* config/mips/mips.c (mips_global_pointer): Force functions with a nonlocal goto to set up $gp. From-SVN: r74547
This commit is contained in:
parent
1ec7a83137
commit
7ac88634ad
@ -1,3 +1,8 @@
|
||||
2003-12-11 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* config/mips/mips.c (mips_global_pointer): Force functions with
|
||||
a nonlocal goto to set up $gp.
|
||||
|
||||
2003-12-11 James E Wilson <wilson@specifixinc.com>
|
||||
|
||||
PR target/13132
|
||||
|
@ -6052,6 +6052,11 @@ mips_global_pointer (void)
|
||||
if (current_function_profile)
|
||||
return GLOBAL_POINTER_REGNUM;
|
||||
|
||||
/* If the function has a nonlocal goto, $gp must hold the correct
|
||||
global pointer for the target function. */
|
||||
if (current_function_has_nonlocal_goto)
|
||||
return GLOBAL_POINTER_REGNUM;
|
||||
|
||||
/* If the gp is never referenced, there's no need to initialize it.
|
||||
Note that reload can sometimes introduce constant pool references
|
||||
into a function that otherwise didn't need them. For example,
|
||||
|
Loading…
Reference in New Issue
Block a user