+Wed Mar 10 19:04:31 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.c (fp_arith_reg_operand): Actually test if reg is suitable
+ for FP arithmetic. Changed caller.
+ * sh.md (subsf3, subsf_i): Use fp_arith_reg_operand.
+
Wed Mar 10 18:56:31 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* reload1.c (choose_reload_regs): When inheriting from the frame
else
return 1;
- return (regno != T_REG && regno != PR_REG && regno > 15
- && regno != MACH_REG && regno != MACL_REG);
+ return (regno >= FIRST_PSEUDO_REGISTER
+ || (regno >= FIRST_FP_REG && regno <= LAST_FP_REG));
}
return 0;
}
op = XEXP (op, 0);
mode = GET_MODE (op);
}
- return fp_arith_reg_operand (op, mode);
+ if (register_operand (op, mode))
+ {
+ int regno;
+
+ if (GET_CODE (op) == REG)
+ 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 > 15
+ && regno != MACH_REG && regno != MACL_REG);
+ }
+ return 0;
}
/* Returns 1 if OP is a valid source operand for an arithmetic insn. */
[(set_attr "type" "fp")])
(define_expand "subsf3"
- [(match_operand:SF 0 "arith_reg_operand" "")
- (match_operand:SF 1 "arith_reg_operand" "")
- (match_operand:SF 2 "arith_reg_operand" "")]
+ [(match_operand:SF 0 "fp_arith_reg_operand" "")
+ (match_operand:SF 1 "fp_arith_reg_operand" "")
+ (match_operand:SF 2 "fp_arith_reg_operand" "")]
"TARGET_SH3E"
"{ expand_sf_binop (&gen_subsf3_i, operands); DONE; }")
(define_insn "subsf3_i"
- [(set (match_operand:SF 0 "arith_reg_operand" "=f")
- (minus:SF (match_operand:SF 1 "arith_reg_operand" "0")
- (match_operand:SF 2 "arith_reg_operand" "f")))
+ [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
+ (minus:SF (match_operand:SF 1 "fp_arith_reg_operand" "0")
+ (match_operand:SF 2 "fp_arith_reg_operand" "f")))
(use (match_operand:PSI 3 "fpscr_operand" "c"))]
"TARGET_SH3E"
"fsub %2,%0"