ack/util/ego/descr
George Koehler b1b737ed6c Optimize procedures that do both a / b and a % b.
Enable this in CS for PowerPC; disable it for all other machines.
PowerPC has no remainder instruction; the back end uses division to
compute remainder.  If CS finds both a / b and a % b, then CS now
rewrites a % b as a - b * (a / b) and computes a / b only once.  This
removes an extra division in the PowerPC code, so it saves both time
and space.

I have not considered whether to enable this optimization for other
machines.  It might be less useful in machines with a remainder
instruction.  Also, if a % b occurs before a / b, the EM code gets a
DUP.  PowerPC ncg handles this DUP well; other back ends might not.
2018-03-05 13:32:06 -05:00
..
build.lua Write a powerpc.descr for ego and use it with osxppc. 2016-11-30 15:29:19 -05:00
descr.sed Added sparc description, don't put constants in regs on M68020 1990-11-01 09:37:02 +00:00
em22.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
em24.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
em44.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
i86.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
i386.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
m68k2.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
m68k4.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
m68020.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
pdp.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
powerpc.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
sparc.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
vax4.descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00