Use .los4 in lar 4 and .sts4 in sar 4.
authorGeorge Koehler <xkernigh@netscape.net>
Mon, 13 Feb 2017 20:22:00 +0000 (15:22 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Mon, 13 Feb 2017 20:22:00 +0000 (15:22 -0500)
commitba9b021253488207fb38defe36cc60b564135661
tree117a5cd3604eedf3e74a42066feac2cb886a8473
parent54949f713f4d01a60654353a7b28eceb54393b56
Use .los4 in lar 4 and .sts4 in sar 4.

Our libem had two implementations of loading a block from a stack, one
for lar 4 and one for los 4.  Now lar 4 and los 4 share the code in
.los4.  Likewise, sar 4 and sts 4 share the code in .sts4.

Rename .los to .los4 and .sts to .sts4, because they implement los 4
and sts 4.  Remove the special case for loading or storing 4 bytes,
because we can do it with 1 iteration of the loop.  Remove the lines
to "align size" where the size must already be a multiple of 4.

Fix the upper bound check in .aar4.

Change .aar4, .lar4, .los4, .sar4, .sts4 to pass all operands on the
real stack, except that .los4 and .sts4 take the size in register r3.
Have .aar4 set r3 to the size of the array element.  So lar 4 is just
.aar4 then .los4, and sar 4 is just .aar4 then .sts4.

ncg no longer calls .lar4 and .sar4 in libem, because it inlines the
code; but I keep .lar4 and .sar4 in libem, because mcg references
them.  They might or might not work in mcg.
mach/powerpc/libem/aar4.s
mach/powerpc/libem/build.lua
mach/powerpc/libem/lar4.s
mach/powerpc/libem/los.s [deleted file]
mach/powerpc/libem/los4.s [new file with mode: 0644]
mach/powerpc/libem/sar4.s
mach/powerpc/libem/sts.s [deleted file]
mach/powerpc/libem/sts4.s [new file with mode: 0644]
mach/powerpc/ncg/table