Commit graph

26 commits

Author SHA1 Message Date
George Koehler
65c2a8a0ae Remove stackadjust and stackoffset() from ncg.
This feature has never been used since its introduction, more than 3
years ago, in David Given's commit c93cb69 of May 8, 2013.  The commit
was for "PowerPC and M68K work".  I am not undoing the entire commit.
I am only removing the stackadjust and stackoffset() feature.

This commit removes the feature from my branch kernigh-linuxppc.  This
removal includes the mach/proto/ncg parts.  The default branch already
removed most of the feature, but kept the mach/proto/ncg parts.  That
removal happened in commit 81778b6 of May 13, 2013 (which was a merge;
git diff af0dede 81778b6).  The branch dtrg-experimental-powerpc
merged the default branch but without the removal.  That merge was
commit 4703db0f of Sep 15, 2016 (git diff 8c94b13 4703db0).  My branch
kernigh-linuxppc is off branch dtrg-experimental-powerpc, so I can no
longer get the removal by merging default.

David Given described the stackadjust feature in
  https://sourceforge.net/p/tack/mailman/message/30814691/

The instruction stackadjust would add a value to the offset, and the
function stackoffset() would return this offset.  One would use this
to track sp - fp, then omit the frame pointer by not keeping fp in a
register.
2016-10-07 20:52:13 -04:00
George Koehler
9db305b338 Enable the Hall check again, and get powerpc to pass it.
Upon enabling the check, mach/powerpc/ncg/table fails to build as ncgg
gives many errors of "Previous rule impossible on empty stack".  David
Given reported this problem in 2013:
  https://sourceforge.net/p/tack/mailman/message/30814694/

Commit c93cb69 commented out the error in util/ncgg/cgg.y to disable
the Hall check.  This commit enables it again.  In ncgg, the Hall
check is checking that a rule is possible with an empty fake stack.
It would be possible if ncg can coerce the values from the real stack
to the fake stack.  The powerpc table defined coercions from STACK to
{FS, %a} and {FD, %a}, but the Hall check didn't understand the
coercions and rejected each rule "with FS" or "with FD".

This commit removes the FS and FD tokens and adds a new group of FSREG
registers for single-precision floats, while keeping FREG registers
for double precision.  The registers overlap, with each FSREG
containing one FREG, because it is the same register in PowerPC
hardware.  FS tokens become FSREG registers and FD tokens become FREG
registers.  The Hall check understands the coercions from STACK to
FSREG and FREG.  The idea to define separate but overlapping registers
comes from the PDP-11 table (mach/pdp/ncg/table).

This commit also removes F0 from the FREG group.  This is my attempt
to keep F0 off the fake stack, because one of the stacking rules uses
F0 as a scratch register (FSCRATCH).
2016-09-18 15:08:55 -04:00
David Given
4703db0fff Merge from default.
--HG--
branch : dtrg-experimental-powerpc-branch
2016-09-15 22:59:01 +02:00
David Given
81778b603f Merge updates from trunk.
--HG--
branch : dtrg-buildsystem
2013-05-13 12:37:27 +01:00
David Given
c1aca7dae5 First milestone of replacing the build system.
--HG--
branch : dtrg-buildsystem
rename : lang/cem/cpp.ansi/Parameters => lang/cem/cpp.ansi/parameters.h
2013-05-12 20:45:55 +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
dtrg
f5bbc20093 Removed unnecessary commas seperating yacc tokens, to prevent warnings. 2006-07-18 17:17:14 +00:00
ceriel
5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
eck
5c85d84228 changed stackheight computation to top element size computation
changed some parameters
1990-09-04 17:19:04 +00:00
eck
4ef2c70ed3 added stackheight message handling 1990-07-18 14:53:19 +00:00
ceriel
7c4af80c0f is_rom is boolean, not integer 1990-02-12 15:15:21 +00:00
ceriel
3f950c9f17 Added a new operator for ncg: is_rom() 1990-02-09 16:34:17 +00:00
ceriel
d9d6cc127f Allow more procedure parameters 1989-11-09 11:04:18 +00:00
ceriel
3e80ca51fc generate #defines for MAXREPLLEN, MAXEMREPLLEN 1989-11-08 17:14:52 +00:00
ceriel
8f2fe1c003 token references in EM replacements do not work. Give error message 1989-05-30 12:20:54 +00:00
ceriel
18b7250736 Added a DO_TOSTACK command, and put set number of ALL in tables.c 1987-08-20 19:04:18 +00:00
ceriel
815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
ceriel
8f4a99cc24 The added ',' separator in token declarations did not work
(reported by Kees Bot, Edwin Scheffer). This is corrected (I hope).
1987-02-07 03:56:34 +00:00
ceriel
e0b23bbaea Added code to kill regvar(...) 1987-02-05 19:20:54 +00:00
ceriel
edae1fc950 Added a check that a tokenset in a stackpattern contains tokens
that all have the same size.
1987-01-26 16:14:39 +00:00
ceriel
45238eea0f Some bug fixes and minor extensions 1987-01-16 13:51:42 +00:00
ceriel
e5820bdbaa Added bitwise operators 1987-01-08 14:22:32 +00:00
sater
5c71bad6e1 Relaxed input syntax for from STACK coercions
No gen clause is necessary anymore.
1986-03-19 16:14:12 +00:00
sater
a91e33ce96 Corrected error in otime of initialisation of booleans 1985-12-02 13:55:06 +00:00
sater
a1a8fd99a0 Optional register property in stacking rules must be -1 when absent.
Fixed this.
1985-01-10 16:30:09 +00:00
sater
72b83cca59 *** empty log message *** 1985-01-08 09:59:28 +00:00