mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-06 13:07:26 +08:00
sh.c (fp_arith_reg_operand): Actually test if reg is suitable for FP arithmetic.
* 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. From-SVN: r25670
This commit is contained in:
parent
0c7f225984
commit
66c0b347bc
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -4192,8 +4192,8 @@ fp_arith_reg_operand (op, mode)
|
||||
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;
|
||||
}
|
||||
@ -4208,7 +4208,21 @@ fp_extended_operand (op, mode)
|
||||
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. */
|
||||
|
@ -3870,16 +3870,16 @@
|
||||
[(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"
|
||||
|
Loading…
Reference in New Issue
Block a user