Commit graph

92 commits

Author SHA1 Message Date
George Koehler 7ab4794a05 Reduce clang warnings from ncg
If a .c file included "types.h" before "mach.h", then it missed the
declaration of mach_option().  Fix by adding "xmach.h".

Fix mach/powerpc/ncg/mach.h and mach/vc4/ncg/mach.h to use the correct
type in their printf() format strings.
2019-10-30 18:36:55 -04:00
George Koehler 1faff418ec Teach some ncg machines to use .data8
This turns EM `con 5000000000I8` into assembly `.data8 5000000000` for
machines i386, i80, i86, m68020, powerpc, vc4.  These are the only ncg
machines in our build.

i80 and i86 get con_mult(sz) for sz == 4 and sz == 8.  The other
machines only get sz == 8, because they have 4-byte words, and ncg
only calls con_mult(sz) when sz is greater than the word size.  The
tab "\t" after .data4 or .data8 is like the tabs in the con_*() macros
of mach/*/ncg/mach.h.

i86 now uses .data4, like i80.  Also, i86 and i386 now use the numeric
string without converting it to an integer and back to a string.
2019-08-13 15:37:05 -04:00
George Koehler a1d1f38691 Add test for EM rol, ror. Fix i80, i86, powerpc.
EM instructions _rol_ and _ror_ do rotate an integer left or right.
Our compilers and optimizers never emit _rol_ nor _ror_, but I might
want to use them in the future.

Add _rol_ and _ror_ to powerpc.  Fix `rol 4` and `ror 4` in both i80
and i86, where the rules for `rol 4` and `ror 4` seem to have never
been tested until now.
2017-12-07 17:16:21 -05:00
George Koehler 760da1f421 Fix build with gcc.
gcc gave an error because the `char *` parameter doesn't match the
`const char *` in the prototype of regsave().  clang didn't give an
error.  I added the prototype in commit 5301cce.
2017-11-17 17:52:37 -05:00
George Koehler 5301cceee3 Declare machine-dependent functions in mach/proto/ncg
This breaks all machines because the declared return type void
disagrees with the implicit return type int (when I compile mach.c
with clang).  Unbreak i386, i80, i86, m68020, powerpc, vc4 by adding
the return types to mach.c.  We don't build any other machines; they
are broken since commit a46ee91 (May 19, 2013) declared void prolog()
and commit fd91851 (Nov 10, 2016) declared void mes(), with both
declarations in mach/proto/ncg/fillem.c.

Also fix mach/vc4/ncg/mach.c where type full is long, so fprintf()
must use "%ld" not "%d" to print full nlocals.
2017-11-13 14:23:44 -05:00
David Given 73922f1d16 Ensure that procedure labels are word-aligned. 2017-01-06 22:29:52 +01:00
David Given fd91851005 Add enough return types to the K&R C that the ACK builds (on Linux) using clang
now.
2016-11-10 22:04:18 +01: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
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 5e03b1bebb Fixes: some conditionals were evaluated wrong due to the overflow bit 1995-07-21 12:05:26 +00:00
ceriel fdc0e2efdb minor improvement 1995-03-29 11:57:27 +00:00
ceriel 34f7036b87 Reordered patterns 1995-03-28 11:22:34 +00:00
ceriel 06b0d3775f Added some patterns 1995-03-28 10:01:02 +00:00
ceriel 1db6a3029b Header --> Id 1994-06-24 14:02:31 +00:00
ceriel e09aac1b4a shifts do NOT set condition codes properly 1992-12-14 16:40:22 +00:00
ceriel d18493b0ac Some minor modifications reflecting some changes in the peephole optimizer 1992-09-01 10:19:21 +00:00
ceriel 46f084d660 Fix: sometimes did not reserve space for local on a mes ms_gto 1992-06-12 09:46:43 +00:00
ceriel 813ca898a7 Bug fix: generated a 'push dl', which does not exist 1992-01-13 10:31:23 +00:00
ceriel 53c4951b29 Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:05:43 +00:00
ceriel 9cfb64d5c2 Bug fix in LOC LOC CII ZEQ/ZNE pattern 1991-11-14 13:20:55 +00:00
ceriel 564cbc6eba Only call NOP routine when debugging table 1991-09-04 10:55:52 +00:00
ceriel c7edcc34d6 New installation mechanism 1991-08-27 10:47:25 +00:00
ceriel 003382e13f Fix in 'LDC CMS TNE' pattern 1991-07-22 09:23:25 +00:00
ceriel c0d92bbc76 Added some patterns 1991-04-10 10:23:34 +00:00
ceriel e5b52ce56f Added some more patterns 1991-04-05 13:27:49 +00:00
ceriel 86151519db Some small changes to reduce local variable count 1991-04-04 16:48:18 +00:00
ceriel 5b2b02ae1e Added patterns 1991-04-04 13:21:46 +00:00
ceriel cafd4a0497 Added patterns to improve code for getc() and putc() 1991-03-27 15:47:50 +00:00
ceriel f9f8f93115 Fixed typo 1991-03-26 14:43:06 +00:00
ceriel 9565b3bd24 Added some patterns 1991-03-26 10:11:23 +00:00
ceriel 95967a04e4 newlbss takes size as unsigned 1991-03-18 14:19:27 +00:00
ceriel f48f0efe60 Added some more patterns 1991-03-13 15:56:43 +00:00
ceriel 0d65b92220 removed -i flag 1991-02-19 16:57:39 +00:00
ceriel f78e573b69 fixed labeldefs so that registers are killed 1990-10-29 16:39:39 +00:00
eck ee652e6908 changed stacheight to topeltsize 1990-09-04 17:13:37 +00:00
eck b23125354b added patterns for stackheight mechanism 1990-07-19 17:22:56 +00:00
eck 4ef2c70ed3 added stackheight message handling 1990-07-18 14:53:19 +00:00
ceriel b972fea237 produce commons for bss 1990-06-25 13:42:02 +00:00
ceriel ddd97f9328 Added new patterns 1990-06-14 16:45:33 +00:00
ceriel f0c0b894f2 corrected SDF patterns 1990-04-04 15:06:32 +00:00
ceriel f99d67e76e minor improvement: LDC CMS T?? does not need STACK in stack pattern 1990-03-20 15:49:04 +00:00
ceriel 353d22ea90 LDC CMS TNE was wrong 1990-03-20 15:01:25 +00:00
ceriel 2236ff6d6a Fix: some patterns were never found due to wrong condition 1990-02-28 12:10:49 +00:00
ceriel 972d39139d Added some patterns for shifts with constant shift count 1990-02-19 16:38:35 +00:00
ceriel 541279bd1e Changed an #ifdef NOTDEF to #if 0 1990-02-09 15:03:17 +00:00
ceriel 8a8bb6cf10 removed wrong pattern 1990-02-09 10:41:58 +00:00
ceriel a022b9490c LOE INE used address register; it is probably better to use a general register 1989-11-30 10:07:49 +00:00
ceriel 295c8d2515 a fix to ZER ? and simplified ZRL, ZRE 1989-11-21 11:38:08 +00:00
ceriel c5ee3b6735 Added patterns 1989-11-09 18:43:02 +00:00
ceriel 1158018fdf Added some patterns 1989-11-03 13:28:37 +00:00