This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
divmod, div, mod
- From: Florent DEFAY <spira dot inhabitant at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 31 Mar 2009 12:03:18 +0200
- Subject: divmod, div, mod
Hi,
I need advice.
I am working on a new backend for a 16-bit machine.
I implemented div and mov with divmodM4 patterns and included
my own functions _udivmodqi4 _divmodqi4 _udivmodhi4 _divmodhi4 in libgcc.
Now the issue is that libgcc calls __udivhi3 and __umodhi3 (which are
not defined) in __divsi3.
My question is:
should I implement umodhi3 and udivhi3 and include them in libgcc so
__divsi3 is alright,
or should I implement divmodsi4 to override __divsi3 and __modsi3?
Thank you.
Regards.
Florent