aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2003-05-05 11:25:01 -0400
committerDJ Delorie <dj@gcc.gnu.org>2003-05-05 11:25:01 -0400
commit9be132116ffa940ced88cd60f5833a96af263937 (patch)
tree5d76d6689e2343d7cd7bd4baf6411eed836615c1 /gcc
parent517f33152b70ac5d86d4dbc6e75f6bfabe6b49b7 (diff)
downloadgcc-9be132116ffa940ced88cd60f5833a96af263937.zip
gcc-9be132116ffa940ced88cd60f5833a96af263937.tar.gz
gcc-9be132116ffa940ced88cd60f5833a96af263937.tar.bz2
stormy16.md (negsi2): Allocate the pseudos before reload, but defer the split until after.
* config/stormy16/stormy16.md (negsi2): Allocate the pseudos before reload, but defer the split until after. * config/stormy16/stormy16.c (xstormy16_expand_arith): Modify to match. From-SVN: r66485
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/stormy16/stormy16.c13
-rw-r--r--gcc/config/stormy16/stormy16.md20
3 files changed, 26 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90ae04a..5ea7593 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-05 DJ Delorie <dj@redhat.com>
+
+ * config/stormy16/stormy16.md (negsi2): Allocate the pseudos
+ before reload, but defer the split until after.
+ * config/stormy16/stormy16.c (xstormy16_expand_arith): Modify
+ to match.
+
2003-05-05 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.h (ASM_CPU_SPEC): Add 440 support.
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index b70a8c5..d819981 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -1873,22 +1873,15 @@ xstormy16_expand_arith (mode, code, dest, src0, src1, carry)
int firstloop = 1;
if (code == NEG)
- {
- rtx zero_reg = gen_reg_rtx (word_mode);
- emit_move_insn (zero_reg, src0);
- src0 = zero_reg;
- }
+ emit_move_insn (src0, const0_rtx);
for (i = 0; i < num_words; i++)
{
rtx w_src0, w_src1, w_dest;
rtx insn;
- if (code == NEG)
- w_src0 = src0;
- else
- w_src0 = simplify_gen_subreg (word_mode, src0, mode,
- i * UNITS_PER_WORD);
+ w_src0 = simplify_gen_subreg (word_mode, src0, mode,
+ i * UNITS_PER_WORD);
w_src1 = simplify_gen_subreg (word_mode, src1, mode, i * UNITS_PER_WORD);
w_dest = simplify_gen_subreg (word_mode, dest, mode, i * UNITS_PER_WORD);
diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md
index 1e48f8b..0e52b53 100644
--- a/gcc/config/stormy16/stormy16.md
+++ b/gcc/config/stormy16/stormy16.md
@@ -603,11 +603,23 @@
[(set_attr "length" "4")])
(define_expand "negsi2"
- [(set (match_operand:SI 0 "register_operand" "")
- (neg:SI (match_operand:SI 1 "register_operand" "")))]
+ [(parallel [(set (match_operand:SI 0 "register_operand" "")
+ (neg:SI (match_operand:SI 1 "register_operand" "")))
+ (clobber (match_scratch:BI 2 ""))])]
+ ""
+ "{ operands[2] = gen_reg_rtx (HImode);
+ operands[3] = gen_reg_rtx (BImode); }")
+
+(define_insn_and_split "*negsi2_internal"
+ [(set (match_operand:SI 0 "register_operand" "=&r")
+ (neg:SI (match_operand:SI 1 "register_operand" "r")))
+ (clobber (match_scratch:BI 2 "=y"))]
""
- "{ xstormy16_expand_arith (SImode, NEG, operands[0], const0_rtx,
- operands[1], gen_reg_rtx (BImode)); DONE; }")
+ "#"
+ "reload_completed"
+ [(pc)]
+ "{ xstormy16_expand_arith (SImode, NEG, operands[0], operands[0],
+ operands[1], operands[2]); DONE; }")
;; ::::::::::::::::::::
;; ::