diff options
author | Jeff Law <law@gcc.gnu.org> | 1999-06-11 20:44:18 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-06-11 20:44:18 -0600 |
commit | 1256ed02808b685d3f08b9eff26299f124c7c97b (patch) | |
tree | 606684ba30462247c6c23b9481f32b10854c40a8 /gcc/config/sparc | |
parent | 691f4e73d4eb5eb9bed0ecc62bc7c7a492e0b5b8 (diff) | |
download | gcc-1256ed02808b685d3f08b9eff26299f124c7c97b.zip gcc-1256ed02808b685d3f08b9eff26299f124c7c97b.tar.gz gcc-1256ed02808b685d3f08b9eff26299f124c7c97b.tar.bz2 |
sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Do nothing with operands that require PIC code sequences.
`
* sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Do nothing with operands
that require PIC code sequences.
From-SVN: r27495
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/sparc.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index b00a145..2c1a5b5 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -2584,8 +2584,11 @@ extern struct rtx_def *legitimize_pic_address (); For Sparc 32, we wish to handle addresses by splitting them into HIGH+LO_SUM pairs, retaining the LO_SUM in the memory reference. - This cuts the number of extra insns by one. */ - + This cuts the number of extra insns by one. + + Do nothing when generating PIC code and the address is a + symbolic operand or requires a scratch register. */ + #define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \ do { \ /* Decompose SImode constants into hi+lo_sum. We do have to \ @@ -2593,7 +2596,10 @@ do { \ if (CONSTANT_P (X) \ && (MODE != TFmode || TARGET_V9) \ && GET_MODE (X) == SImode \ - && GET_CODE (X) != LO_SUM && GET_CODE (X) != HIGH) \ + && GET_CODE (X) != LO_SUM && GET_CODE (X) != HIGH \ + && ! (flag_pic \ + && (symbolic_operand (X, Pmode)) \ + || pic_address_needs_scratch (X))) \ { \ X = gen_rtx_LO_SUM (GET_MODE (X), \ gen_rtx_HIGH (GET_MODE (X), X), X); \ |