This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix udivmodhi4 on stormy16
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix udivmodhi4 on stormy16
- From: Geoffrey Keating <geoffk at thief dot cygnus dot com>
- Date: Thu, 30 Aug 2001 18:55:23 -0700
- Reply-to: geoffk at redhat dot com
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")])
============================================================