--- gcc/config/m88k/m88k.c 2018/04/24 18:20:37 1.1.1.3 +++ gcc/config/m88k/m88k.c 2018/04/24 18:27:44 1.1.1.4 @@ -1,8 +1,7 @@ /* Subroutines for insn-output.c for Motorola 88000. - Copyright (C) 1988, 1989, 1990, 1991, 1994 Free Software Foundation, Inc. + Copyright (C) 1988, 92, 93, 94, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) - Enhanced by Michael Meissner (meissner@osf.org) - Version 2 port by Tom Wood (twood@pets.sps.mot.com) + Currently maintained by (gcc@dg-rtp.dg.com) This file is part of GNU CC. @@ -18,7 +17,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ #include #include @@ -1350,7 +1350,7 @@ real_or_0_operand (op, mode) && op == CONST0_RTX (mode))); } -/* Return true if OP is valid to use in the context of logic aritmethic +/* Return true if OP is valid to use in the context of logic arithmetic on condition codes. */ int @@ -2030,7 +2030,7 @@ m88k_end_epilogue (stream, size) PUT_OCS_FUNCTION_END (stream); /* If the last insn isn't a BARRIER, we must write a return insn. This - should only happen if the function has no prologe and no body. */ + should only happen if the function has no prologue and no body. */ if (GET_CODE (insn) == NOTE) insn = prev_nonnote_insn (insn); if (insn == 0 || GET_CODE (insn) != BARRIER) @@ -3094,3 +3094,32 @@ pic_address_needs_scratch (x) return 0; } + +/* Returns 1 if OP is either a symbol reference or a sum of a symbol + reference and a constant. */ + +int +symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode; +{ + switch (GET_CODE (op)) + { + case SYMBOL_REF: + case LABEL_REF: + return 1; + + case CONST: + op = XEXP (op, 0); + return ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF + || GET_CODE (XEXP (op, 0)) == LABEL_REF) + && GET_CODE (XEXP (op, 1)) == CONST_INT); + + /* ??? This clause seems to be irrelevant. */ + case CONST_DOUBLE: + return GET_MODE (op) == mode; + + default: + return 0; + } +}