divmod , signed division problem in rtl
Pierre Mallard
pierremallard@yahoo.fr
Wed Oct 9 09:58:00 GMT 2002
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
More information about the Gcc
mailing list