ack/mach/m68020/libem
George Koehler e867861f6d Add 8-byte long long for linux68k.
Add rules for 8-byte integers to m68020 ncg.  Add 8-byte long long to
ACK C on linux68k.  Enable long-long tests for linux68k.  The tests
pass in our emulator using musahi; I don't have a real 68k processor
and haven't tried other emulators.

Still missing are conversions between 8-byte integers and any size of
floats.  The long-long tests don't cover these conversions, and our
emulator can't do floating-point.

Our build always enables TBL68020 and uses word size 4.  Without
TBL68020, 8-byte multiply and divide are missing.  With word size 2,
some conversions between 2-byte and 8-byte integers are missing.

Fix .cii in libem, which didn't work when converting from 1-byte or
2-byte integers.  Now .cii and .cuu work, but also add some rules to
skip .cii and .cuu when converting 8-byte integers.  The new rule for
loc 4 loc 8 cii `with test_set4` exposes a bug: the table may believe
that the condition codes test a 4-byte register when they only test a
word or byte, and this incorrect test may describe an unsigned word or
byte as negative.  Another rule `with exact test_set1+test_set2` works
around the bug by ignoring the negative flag, because a zero-extended
word or byte is never negative.

The old rules for comparison and logic do work with 8-byte integers
and bitsets, but add some specific 8-byte rules to skip libem calls or
loops.  There were no rules for 8-byte arithmetic, shift, or rotate;
so add some.  There is a register shortage, because the table requires
preserving d3 to d7, leaving only 3 data registers (d0, d1, d2) for
8-byte operations.  Because of the shortage, the code may move data to
an address register, or read a memory location more than once.

The multiplication and division code are translations of the i386
code.  They pass the tests, but might not give the best performance on
a real 68k processor.
2019-09-24 13:32:17 -04:00
..
aar.s many minor changes 1988-10-03 10:53:47 +00:00
build.lua Add 8-byte long long for linux68k. 2019-09-24 13:32:17 -04:00
cii.s Add 8-byte long long for linux68k. 2019-09-24 13:32:17 -04:00
cmi.s many minor changes 1988-10-03 10:53:47 +00:00
cms.s many minor changes 1988-10-03 10:53:47 +00:00
cmu.s many minor changes 1988-10-03 10:53:47 +00:00
csa.s keep the names .csa and .csb for backwards compatibility 1990-09-03 10:25:57 +00:00
csb.s keep the names .csa and .csb for backwards compatibility 1990-09-03 10:25:57 +00:00
cuu.s Initial revision 1987-01-29 22:10:18 +00:00
cvf.s Initial revision 1987-01-29 22:10:18 +00:00
dia.s Check in incomplete Linux PowerPC and M68K work. 2013-05-08 00:48:48 +01:00
divrem8.s Add 8-byte long long for linux68k. 2019-09-24 13:32:17 -04:00
dvi8.s Add 8-byte long long for linux68k. 2019-09-24 13:32:17 -04:00
dvu8.s Add 8-byte long long for linux68k. 2019-09-24 13:32:17 -04:00
exg.s replaced some db.. instructions; they are wrong if the count register 1989-07-07 13:53:37 +00:00
fat.s No system-calls from libem 1992-06-30 15:22:07 +00:00
fp68881.s Header --> Id 1994-06-24 14:02:31 +00:00
inn.s many minor changes 1988-10-03 10:53:47 +00:00
lar.s replaced some db.. instructions; they are wrong if the count register 1989-07-07 13:53:37 +00:00
LIST New installation mechanism 1991-09-02 17:00:19 +00:00
los.s replaced some db.. instructions; they are wrong if the count register 1989-07-07 13:53:37 +00:00
mon.s No system-calls from libem 1992-06-30 15:22:07 +00:00
nop.s Check in incomplete Linux PowerPC and M68K work. 2013-05-08 00:48:48 +01:00
rmi8.s Add 8-byte long long for linux68k. 2019-09-24 13:32:17 -04:00
rmu8.s Add 8-byte long long for linux68k. 2019-09-24 13:32:17 -04:00
sar.s replaced some db.. instructions; they are wrong if the count register 1989-07-07 13:53:37 +00:00
set.s replaced some db.. instructions; they are wrong if the count register 1989-07-07 13:53:37 +00:00
shp.s No system-calls from libem 1992-06-30 15:22:07 +00:00
sts.s replaced some db.. instructions; they are wrong if the count register 1989-07-07 13:53:37 +00:00
trp.s Check in incomplete Linux PowerPC and M68K work. 2013-05-08 00:48:48 +01:00
trpstr.c Check in incomplete Linux PowerPC and M68K work. 2013-05-08 00:48:48 +01:00