diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2001-10-20 15:10:11 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2001-10-20 15:10:11 +0000 |
commit | 129c089988b855514665829f645965729099a15b (patch) | |
tree | f0126c8d4117026bfc91529a8068ae073ec8a404 | |
parent | 38ca929b576c3122771f5832c49fd6022e6303ea (diff) | |
download | gcc-129c089988b855514665829f645965729099a15b.zip gcc-129c089988b855514665829f645965729099a15b.tar.gz gcc-129c089988b855514665829f645965729099a15b.tar.bz2 |
reload1.c (reload): Check CONSTANT_P before calling LEGITIMATE_PIC_OPERAND_P.
* reload1.c (reload): Check CONSTANT_P before calling
LEGITIMATE_PIC_OPERAND_P.
* config/cris/cris.c (cris_legitimate_pic_operand): Revert
workaround of 2001-10-13.
From-SVN: r46381
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/cris/cris.c | 6 | ||||
-rw-r--r-- | gcc/reload1.c | 6 |
3 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 04f1414..984104d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-10-20 Hans-Peter Nilsson <hp@axis.com> + + * reload1.c (reload): Check CONSTANT_P before calling + LEGITIMATE_PIC_OPERAND_P. + * config/cris/cris.c (cris_legitimate_pic_operand): Revert + workaround of 2001-10-13. + Sat Oct 20 15:16:10 CEST 2001 Jan Hubicka <jh@suse.cz> * i386.c (split_di): Handle splitting of DFmode. diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 4a9e08d..668811e 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -2239,12 +2239,6 @@ int cris_legitimate_pic_operand (x) rtx x; { - /* This test is due to a bug in the core of GCC. See - <URL:http://gcc.gnu.org/ml/gcc-patches/2001-09/msg01038.html> for the - real fix; we shouldn't need to test CONSTANT_P here. */ - if (! CONSTANT_P (x)) - return 0; - /* The PIC representation of a symbol with a GOT entry will be (for example; relocations differ): sym => [rPIC+sym:GOT] diff --git a/gcc/reload1.c b/gcc/reload1.c index 2be0983..0b53ac9 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -778,7 +778,11 @@ reload (first, global) #ifdef LEGITIMATE_PIC_OPERAND_P && (! function_invariant_p (XEXP (note, 0)) || ! flag_pic - || LEGITIMATE_PIC_OPERAND_P (XEXP (note, 0))) + /* A function invariant is often CONSTANT_P but may + include a register. We promise to only pass + CONSTANT_P objects to LEGITIMATE_PIC_OPERAND_P. */ + || (CONSTANT_P (XEXP (note, 0)) + && LEGITIMATE_PIC_OPERAND_P (XEXP (note, 0)))) #endif ) { |