From: Jim Wilson Date: Mon, 5 Aug 1996 21:27:22 +0000 (-0700) Subject: (arith_reg_operand): Reject SUBREG of an invalid hard reg. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=519164a9ede028adf015270894441fb30433d969;p=gcc.git (arith_reg_operand): Reject SUBREG of an invalid hard reg. From-SVN: r12594 --- diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 6b8cc724a99..834e60bf382 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -2198,13 +2198,17 @@ arith_reg_operand (op, mode) { if (register_operand (op, mode)) { + int regno; + if (GET_CODE (op) == REG) - return (REGNO (op) != T_REG - && REGNO (op) != PR_REG - && REGNO (op) != FPUL_REG - && REGNO (op) != MACH_REG - && REGNO (op) != MACL_REG); - return 1; + regno = REGNO (op); + else if (GET_CODE (op) == SUBREG && GET_CODE (SUBREG_REG (op)) == REG) + regno = REGNO (SUBREG_REG (op)); + else + return 1; + + return (regno != T_REG && regno != PR_REG && regno != FPUL_REG + && regno != MACH_REG && regno != MACL_REG); } return 0; }