This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

division in myproc.md vs libgcc


Hi 
I got a problem catching div rtl, it 's always trying
to call libgcc function __udivsi3

here is a program test that do not work :
int main()
{ 
unsigned char val1 = 3; 
unsigned char val2 = 15; 
unsigned char val3 = val2/val1; 
return 1;
}

Here is the rtl I try to catch in my proc.md

define_insn "divqi3"  [(set (match_operand:QI 0
"register_operand" "=r")        (udiv:QI
(match_operand:QI 1 "register_operand" "r")           
    (match_operand:QI 2 "register_operand"
"r")))](define_insn "divhi3"  [(set (match_operand:HI
0 "register_operand" "=r")        (udiv:HI
(match_operand:HI 1 "register_operand" "r")           
    (match_operand:HI 2 "register_operand" "r")))] 
(define_insn "divsi3"  [(set (match_operand:SI 0
"register_operand" "=r")        (udiv:SI
(match_operand:SI 1 "register_operand" "r")           
    (match_operand:SI 2 "register_operand" "r")))]  

Thanks for your help 
ps : Is there a way to get the rtl code generated
without having it bugged with the libgcc call ... i.e.
before it's matched with libgcc function.?
Pierre

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]