This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/6526] [SH4] sdivsi3_i4 can clobber xd0/xd2
- From: "marcus at mc dot pp dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jun 2003 19:19:44 -0000
- Subject: [Bug target/6526] [SH4] sdivsi3_i4 can clobber xd0/xd2
- References: <20020430191600.6526.marcus@mc.pp.se>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6526
------- Additional Comments From marcus@mc.pp.se 2003-06-03 19:19 -------
Subject: Re: [SH4] sdivsi3_i4 can clobber xd0/xd2
"joern.rennecke@superh.com" <gcc-bugzilla@gcc.gnu.org> writes:
> > > The patch you provided does not make integer division slower,
> >
> > Well, that's a good thing isn't it?
>
> Oops, scratch that 'not'.
Ah. I did some quick measurememts and the slowdown seems to be around
3.5% for signed and 8% for unsigned division. A little higher than I
expected actually.
> So, are you using integer division somewhere in this loop?
Not in the inner loop, which is 100% assembler code.
> Or are you doing an uneven number of iterations, so you end up
> with a switched register set at the end?
Yup. And the "end" can be followed by more iterations later, after I
have done some integer operations (modulus). An outer loop, if you
will. I did some attempts with adding extra switches to "balance" the
thing, but it all turned out far to messy.
// Marcus
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.