Use subfic (val - reg) and mulli (reg * val).
authorGeorge Koehler <xkernigh@netscape.net>
Sat, 27 Jan 2018 20:33:43 +0000 (15:33 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Sat, 27 Jan 2018 20:53:05 +0000 (15:53 -0500)
commit3dae9e49ccd6b753f412995d873a6760c38fea1a
tree40465012e36f13cdcbcad0fea982a3f514e36820
parent7c9c4f82fdda6dc02ce0ff24da958060d6a8f75a
Use subfic (val - reg) and mulli (reg * val).

In the instruction list, put /* kills xer */ for sraw, srawi, subfic;
and correct the (now unused) "addi." and "lfdu".

Change MACHOPT_F from -m3 to -m2.  This changes the code for 15 * i
from

    slwi r3,r4,4
    subfic r5,r4,0
    add r3,r3,r5

to

    mulli r3,r4,15

If the sequence "slwi subfic addi" takes 3 cycles and 12 bytes, and
mulli takes 3 cycles and 4 bytes, then mulli is better.
mach/powerpc/ncg/table
plat/linuxppc/descr
plat/osxppc/descr