carl
708c1ba1b0
ANSI C conversion
2019-05-11 01:11:26 +08:00
carl
e6ba8034f0
ANSI C conversion
2019-05-11 01:11:17 +08:00
carl
cefebdb5db
ANSI C conversion
2019-05-11 01:11:03 +08:00
carl
628dcb3cbf
ANSI C conversion
2019-05-11 01:10:47 +08:00
carl
04cb629159
ANSI C conversion
2019-05-11 01:10:12 +08:00
carl
8d6cfa7701
Fix possible buffer writer overflow
2019-03-31 01:14:49 +08:00
carl
4f2c482416
Buffer overflow memory errors.
2019-03-31 00:52:37 +08:00
carl
41fd51eeea
Revert change.
2019-03-25 01:41:04 +08:00
carl
efecff78b9
Add function prototypes.
2019-03-25 00:14:38 +08:00
carl
9979fb37d2
Add function prototypes.
2019-03-25 00:14:27 +08:00
carl
82cdc096b0
Add function prototypes.
2019-03-25 00:14:08 +08:00
carl
f161a5867d
Add function prototypes.
2019-03-25 00:13:56 +08:00
carl
a6120c220e
Fix buffer overflow issue.
2019-03-25 00:13:42 +08:00
carl
dcc2be5e8c
Add function prototypes.
2019-03-25 00:12:21 +08:00
carl
5295049b16
Add function prototypes.
2019-03-25 00:12:07 +08:00
carl
1636b9b52d
Add function prototypes.
2019-03-25 00:11:55 +08:00
carl
180d3388d6
Add function prototypes.
2019-03-25 00:11:43 +08:00
carl
98c5d1f0ee
Add function prototypes.
2019-03-25 00:11:31 +08:00
carl
ef3a6b3cc4
Add function prototypes.
2019-03-25 00:11:19 +08:00
carl
053c509fc9
Add function prototypes.
2019-03-25 00:10:58 +08:00
carl
2f84fc92cf
Add function prototypes.
2019-03-25 00:10:45 +08:00
carl
2dd0d0f81b
Add function prototypes.
2019-03-25 00:10:32 +08:00
carl
143da61d13
Add function prototypes.
2019-03-25 00:10:20 +08:00
carl
dac3d0b10c
Add function prototypes.
2019-03-25 00:10:10 +08:00
George Koehler
bec236c108
Include more headers to declare functions.
...
This causes clang to give fewer warnings of implicit declarations of
functions.
In mach/pdp/cv/cv.c, rename wr_int2() to cv_int2() because it
conflicts with wr_int2() in <object.h>.
In util/ack, rename F_OK to F_TRANSFORM because it conflicts with F_OK
for access() in <unistd.h>.
2019-03-22 15:59:35 -04:00
David Given
88fd7b3cdc
Add a 'kill' pseudoinstruction to the 8080 assembler, which marks when the code
...
generator is finished with a register; use this to create some more effective
peephole optimiser rules.
2019-03-08 23:06:34 +01:00
David Given
12a0421988
Minor improvements to the way types are expanded (should avoid embarassing ands
...
with 0xff).
2019-02-17 10:09:22 +01:00
David Given
61d623c4d6
Add a few minor top optimisations.
2019-02-16 01:18:31 +01:00
David Given
6a8b298861
Fix typo where I was confusing sbi and sui, with hilarious results.
2019-02-16 01:18:21 +01:00
David Given
4474d6433a
Loading large constants now computes the stack offset correctly.
2019-02-15 23:03:01 +01:00
David Given
34c67698ef
Generate the proper function prologues for big stack frames.
2019-02-15 23:01:33 +01:00
David Given
8ca4d6ea1e
Cleanup.
2019-02-15 22:26:14 +01:00
David Given
c9467b683a
Add rules for converting smallnconst2 and smallpconst2 to registers, to stop
...
the conversion from happening via the stack. Star Trek goes from 39450 to 39384
bytes.
2019-02-15 22:20:07 +01:00
David Given
afd45acb89
Using regpair instead of hl_or_de is not, in fact, safe until we've stopped
...
using bc.
2019-02-15 21:38:17 +01:00
David Given
d63a359a49
Fix nearly all the comparisons, a lot of which were broken. Using a rst for
...
unsigned comparisons is surprisingly not that useful due to marshalling
overhead; it's only four bytes to do inline (plus jc), or six for a constant.
Also add some useful top optimisations. Star Trek goes from 39890 to 39450
bytes.
2019-02-15 21:30:27 +01:00
David Given
91c75f81b5
Call cmps rather than cmpu for bge... make cmps and cmpu rsts. Apply various
...
other tiny optimisations.
2019-02-15 00:38:39 +01:00
David Given
2924ce8ffa
Use nicely optimised helper tools to do signed comparisons of words. Star Trek
...
goes from 40452 to 39890 bytes.
2019-02-14 23:57:55 +01:00
David Given
3c3d2a4520
Fix bad helper tool invocation for inl with faddrn.
2019-02-14 23:21:47 +01:00
David Given
8eaa11ac72
Turns out that every time the compiler tried to do a stack retraction with asp,
...
it would flush registers onto the stack. This stops it doing this. Star Trek
goes from 40779 to 40452 bytes.
2019-02-14 00:05:08 +01:00
David Given
6e3ba8e9a0
Merge from default.
2019-02-13 22:46:00 +01:00
David Given
79a38ecc08
Instead of using parameterised rsts for stack access, add a huge swathe of
...
automatically built helper tools. Star Trek goes up from 40243 to 40779 bytes,
but should be a lot faster.
2019-02-13 22:45:22 +01:00
David Given
8200f041c2
Fix issue with logical operations and small signed constants which turned out
...
to affect multiple platforms.
2019-02-13 20:56:10 +01:00
David Given
f4b45f1ed7
Fix bad code generation due to not correctly flushing the stack before
...
comparisons.
2019-02-12 22:19:07 +01:00
David Given
360e1525ae
Replace the non-working Z80 style signed comparison sign adjustment with
...
something which actually works on the 8080. Sadly, Star Trek is up to
40243 bytes again.
2019-02-12 11:57:37 +01:00
David Given
e8994afdf0
Apply Alan Cox's patch to add the 8085 extended instructions to the i80
...
assembler.
2019-02-11 21:14:35 +01:00
David Given
f1b128baeb
Signed comparisons now work correctly; sadly, Star Trek increases from 39656 to
...
39726 bytes. Note that the emulator doesn't set P/V correctly and all the tests
fail. Testing in z80ex works fine.
2019-02-11 20:46:06 +01:00
David Given
fca54ccc1b
Improve subtractions, using dad and inline constants where possible. Shrinks
...
Star Trek from 39740 to 39656 bytes.
2019-02-10 19:40:48 +01:00
David Given
7d34cd7407
Simplify simple comparisons and use inlie constants where possible. Reduces
...
Star Trek from 39771 to 39740 bytes.
2019-02-10 19:22:43 +01:00
David Given
35d1f36ca4
Use pop rather than inx;inx to retract the stack; consumes a register but
...
halves the number of calls. Reduces Star Trek from 39976 to 39771 bytes.
2019-02-10 18:57:20 +01:00
David Given
b34ff2bdec
Teach the i80 code generator how to do left shifts by using dad hl; prevents it
...
from calling out to .sli2 for simple shifts. Shrinks Star Trek from 40055 bytes
to 39976.
2019-02-10 18:44:47 +01:00