fix udivmodhi4 on stormy16
Geoffrey Keating
geoffk@thief.cygnus.com
Thu Aug 30 18:55:00 GMT 2001
A copy-and-paste error of my own, I think :-).
Tested on stormy16-elf.
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/gcc-stormyudiv.patch======================
2001-08-30 Geoffrey Keating <geoffk@redhat.com>
* config/stormy16/stormy16.md (udivmodhi4): Express using UDIV/UMOD,
not DIV/MOD, of course.
Index: config/stormy16/stormy16.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16.md,v
retrieving revision 1.1
diff -p -u -p -r1.1 stormy16.md
--- stormy16.md 2001/08/25 17:14:36 1.1
+++ stormy16.md 2001/08/31 01:54:22
@@ -379,11 +379,11 @@
;; Unsigned division giving both quotient and remainder
(define_insn "udivmodhi4"
[(set (match_operand:HI 0 "register_operand" "=a")
- (div:HI (match_operand:HI 1 "register_operand" "a")
- (match_operand:HI 2 "register_operand" "c")))
+ (udiv:HI (match_operand:HI 1 "register_operand" "a")
+ (match_operand:HI 2 "register_operand" "c")))
(set (match_operand:HI 3 "register_operand" "=b")
- (mod:HI (match_dup 1)
- (match_dup 2)))]
+ (umod:HI (match_dup 1)
+ (match_dup 2)))]
""
"div"
[(set_attr "psw_operand" "nop")])
============================================================
More information about the Gcc-patches
mailing list