diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-11-30 18:22:07 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-11-30 18:22:07 -0500 |
commit | a7a813f79fc27645df138a85effb09bcddcfbb3a (patch) | |
tree | 32429f276536eeb70ceccba99d1d2a694c674b59 | |
parent | 287f13ffddd880630093402bb388011df5a9acb6 (diff) | |
download | gcc-a7a813f79fc27645df138a85effb09bcddcfbb3a.zip gcc-a7a813f79fc27645df138a85effb09bcddcfbb3a.tar.gz gcc-a7a813f79fc27645df138a85effb09bcddcfbb3a.tar.bz2 |
(lwa_operand): New predicate.
From-SVN: r8588
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5d6f9c9..d02a475 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -468,6 +468,26 @@ reg_or_mem_operand (op, mode) return gpc_reg_operand (op, mode) || memory_operand (op, mode); } +/* Return 1 if the operand is a general register or memory operand without + pre-inc or pre_dec which produces invalid form of PowerPC lwa + instruction. */ + +int +lwa_operand (op, mode) + register rtx op; + register enum machine_mode mode; +{ + rtx inner = op; + + if (reload_completed && GET_CODE (inner) == SUBREG) + inner = SUBREG_REG (inner); + + return gpc_reg_operand (inner, mode) + || (memory_operand (inner, mode) + && GET_CODE (XEXP (inner, 0)) != PRE_INC + && GET_CODE (XEXP (inner, 0)) != PRE_DEC); +} + /* Return 1 if the operand, used inside a MEM, is a valid first argument to CALL. This is a SYMBOL_REF or a pseudo-register, which will be forced to lr. */ |