Commit graph

44 commits

Author SHA1 Message Date
George Koehler 0b0c3d5b60 Add csa 8, csb 8 for i386, m68020.
This allows `long long x; switch (x) {...}` in C.  Add test in C.

This adapts the code for csa 8 and csb 8 from the existing code for
csa 4 and csb 4, for both i386 and m68020.
2019-09-27 12:15:10 -04:00
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
David Given f67c98e239 Distributions are a pain --- let's not bother any more. Instead, we just tag
the repository and download a complete snapshot, old and ancient stuff and all.
2016-09-02 23:00:38 +02:00
David Given 856eb120b3 Add files which got missed in the initial build pass. 2016-08-20 14:04:17 +02:00
David Given 38fa6941d5 linux68k builds now. 2016-08-14 11:34:18 +02:00
David Given 88bd7ce126 Remove defunct pmfiles.
--HG--
branch : default-branch
2016-06-03 13:56:50 +02:00
David Given 24ef1627ec A few last build tweaks.
--HG--
branch : dtrg-buildsystem
2013-05-16 14:20:58 +01:00
David Given 11377070fd Update distribution files.
--HG--
branch : dtrg-buildsystem
2013-05-15 23:46:15 +01:00
David Given 8e2d027c49 Add pmfile for m68020 libem.
--HG--
branch : dtrg-experimental-powerpc
2013-05-09 00:57:47 +01:00
David Given c93cb69959 Check in incomplete Linux PowerPC and M68K work.
--HG--
branch : dtrg-experimental-powerpc
2013-05-08 00:48:48 +01:00
George Koehler 0131ca4d46 Delete 689 undead files.
These files "magically reappeared" after the conversion from CVS to
Mercurial.  The old CVS repository deleted these files but did not
record *when* it deleted these files.  The conversion resurrected these
files because they have no history of deletion.  These files were
probably deleted before year 1995.  The CVS repository begins to record
deletions around 1995.

These files may still appear in older revisions of this Mercurial
repository, when they should already be deleted.  There is no way to fix
this, because the CVS repository provides no dates of deletion.

See http://sourceforge.net/mailarchive/message.php?msg_id=29823032
2012-09-20 22:26:32 -04:00
ceriel 1db6a3029b Header --> Id 1994-06-24 14:02:31 +00:00
ceriel ab38665421 No system-calls from libem 1992-06-30 15:22:07 +00:00
ceriel ce87955d7b New installation mechanism 1991-09-02 17:00:19 +00:00
ceriel 0c137374ae fixed 1991-04-25 10:54:44 +00:00
eck cd8e8e5aef completed Makefile entries 1990-09-28 09:47:40 +00:00
eck a50ec18466 some minor fixes 1990-09-28 09:29:51 +00:00
eck 56502994f4 changed end_em to library to avoid namespace pollution 1990-09-27 14:29:09 +00:00
ceriel b2ca3783c4 keep the names .csa and .csb for backwards compatibility 1990-09-03 10:25:57 +00:00
eck c615803fa6 changed names of csa and csb to csa4 and csb4 1990-07-25 11:46:27 +00:00
ceriel 863824de01 fixed bug in conversion from float/double to unsigned 1990-03-26 14:16:59 +00:00
ceriel 36dbf24131 adapted so that _brk routine may update .limhp 1990-01-22 15:38:46 +00:00
ceriel 636c151d51 fix: printed wrong message; now dumps core at end 1989-11-08 14:42:09 +00:00
ceriel 650c178631 fix: did not handle 0.0 right 1989-08-15 09:02:38 +00:00
ceriel f755d6683d fix to fix: did not handle negative arguments right 1989-08-09 16:29:15 +00:00
ceriel 5785bb133b fixed problem with fef on Infinity 1989-08-09 14:37:37 +00:00
ceriel 2b2698c44c Added fp68881.s 1989-08-01 16:32:34 +00:00
ceriel 01a95e3b08 replaced some db.. instructions; they are wrong if the count register
contains a count > 65535
1989-07-07 13:53:37 +00:00
ceriel 133ecee90d fixed typo 1989-06-09 09:53:29 +00:00
ceriel 2b8ee048c8 Added saving of registers 1989-06-09 09:32:40 +00:00
ceriel 3d7da616bf Added files 1989-05-29 14:45:56 +00:00
ceriel 013ccf9149 changed printf name: removed underscore 1989-05-29 14:42:18 +00:00
ceriel 75c18ef56c changed entry points csa and csb; strscript should call m68020
instead of acc
1989-02-21 10:09:01 +00:00
ceriel f8a3f67ddb Added new line after trap message 1988-11-04 09:55:50 +00:00
ceriel 668b4ca6e7 many minor changes 1988-10-03 10:53:47 +00:00
ceriel 155a1ba5c8 adapted to new semantics of the EHEAP error: no longer fatal 1988-04-11 11:37:54 +00:00
ceriel f7c479d40b fixed typo 1987-10-30 10:49:35 +00:00
ceriel e0c73d5195 Added fake floating point routines 1987-10-30 10:42:36 +00:00
ceriel 81b1d21c35 Initial revision 1987-04-13 10:32:47 +00:00
ceriel 73818f1a53 bug fix 1987-03-19 11:21:54 +00:00
ceriel 4539fd3e09 bug fix 1987-03-05 19:27:53 +00:00
ceriel a39c668bab *** empty log message *** 1987-03-05 19:24:35 +00:00
ceriel 0452b7c326 *** empty log message *** 1987-01-29 23:30:46 +00:00
ceriel 945d6a0188 Initial revision 1987-01-29 22:10:18 +00:00