This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
divmod , signed division problem in rtl
- From: Pierre Mallard <pierremallard at yahoo dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 9 Oct 2002 15:41:51 +0200 (CEST)
- Subject: divmod , signed division problem in rtl
Hi,
My Proc got a divss op I'd like to put in gcc.
For me it's relative to QI regs so I thought first
It's fine if I define :
(define_insn "divmodqi4"
[(set (match_operand:QI 0 "register_operand" "=r")
(div:QI (match_operand:QI 1 "register_operand"
"r")
(match_operand:QI 2 "register_operand"
"r")))
(set (match_operand:QI 3 "register_operand" "=r")
(mod:QI (match_dup 1) (match_dup 2)))]
""
"nop
divss __tmp_l__,%1,%2
mov %0,__tmp_l__
mov %3,__tmp_h__"
[(set_attr "length" "4")
(set_attr "cc" "none")])
Unfortunately, this doesn't seem to work.
For a signed division in QImode, the rtl gen passes
will automaticly looks for the divmodhi4 pattern and
will want to sign_extend the result in HI where it's
only needed in QI..
Can someone tell me why ?
Regards
Pierre Mallard
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com