1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00
Commit Graph

8807 Commits

Author SHA1 Message Date
Christian Groessler
77da8d5490 vic20.cfg: add missing comma 2020-11-11 17:20:25 +01:00
Sven Michael Klose
53f055fb1d Reduce stack size to 256B for unexpanded VICs. 2020-11-11 12:42:35 +01:00
Jesse Rosenstock
93145246fd Add tests for u8 op s16_const
Test expressions like `unsigned char x = ...; ... = x / 2;`
These use `int` constants with values representable by
`unsigned int` / `unsigned char`, so using unsigned codegen should
be possible.

Additional tests for #1308.  These are things we want to generate better
code for, so add tests that the behavior doesn't change.
2020-11-09 21:20:16 +01:00
Jesse Rosenstock
5db74b4b19 Use u16 codegen for u8 x u8 ops
In g_typeadjust, before we apply the integral promotions, we check if
both types are unsigned char.  If so, we promote to unsigned int, rather
than int, which would be chosen by the standard rules.  This is only a
performance optimization and does not affect correctness, as the flags
returned by g_typeadjust are only used for code generation, and not to
determine types of other expressions containing this one.  All unsigned
char bit-patterns are valid as both int and unsigned int and represent
the same value, so either signed or unsigned int operations can be used.
This special case part is not duplicated by ArithmeticConvert.

Partial fix for #1308.
2020-11-09 21:19:22 +01:00
Greg King
81edc3f582 Updated a comment about Kernal's STATUS variable. 2020-11-08 17:45:54 -05:00
Jesse Rosenstock
b5f0c0468d Add stdint.h types for C89 compilers
Add `intN_t` and `uintN_t` for N = 8, 16, 32.
2020-11-03 21:24:52 +01:00
Jesse Rosenstock
65193c6aaf Add stdint.h constants INT32_MIN and UINT32_MAX
These were missing before
2020-11-03 09:26:26 +01:00
Jesse Rosenstock
0e482c7f92 Add test for issue #1310 2020-11-01 19:09:20 +01:00
Christian Groessler
39c0abed54 atarixl: fix compilation problem when CHARGEN_RELOC is defined 2020-10-30 15:01:47 +01:00
Greg King
aad17a6f05 Made two GEOS directory functions return NULL if they can't give a valid entry. 2020-10-29 18:06:01 -04:00
Oliver Schmidt
d8e6fa61bb Return NULL on error (or end of directory). 2020-10-29 17:44:19 +01:00
Christian Groessler
944ebbc23c atarixl configs: make size of CHARGEN configurable
If text mode is not used, its space can be reclaimed by setting __CHARGENSIZE__
to 0.
Following a suggestion from issue #1314.
2020-10-29 17:43:49 +01:00
Jesse Rosenstock
a686988d0e Add test cases for integral promotion of chars
Both signed and unsigned chars are promoted to int by C's evaluation
rules.  It is more efficient to use unsigned operations when possible,
however.  These tests will help test the correctness of optimizations
doing that.  See #1308.
2020-10-29 13:54:37 +01:00
Christian Groessler
262631039d atari.h, atari5200.h: style fixes 2020-10-28 21:12:32 +01:00
Christian Groessler
3537210674 add waitvsync() for atari and atari5200 2020-10-28 21:12:32 +01:00
Oliver Schmidt
79cf1e13a7
Adjusted to recent change in time.h 2020-10-25 21:33:08 +01:00
Oliver Schmidt
f723147f04 Streamlined clock rate handling.
* Docs say that CLK_TCK is an obsolete alias of CLOCKS_PER_SEC so there's no point in individual definitions.
* All targets determining the clock rate at runtime can use a common handling.
2020-10-25 14:06:44 +01:00
acqn
07cc6a3d20 Made optimization steps aware of long branches better. 2020-10-24 21:25:24 +02:00
Oliver Schmidt
2fcd8b934a Made HGR segment obligatory.
Requiring the HGR segment makes the configs a little less flexible, but for the intended use case the HGR segment actually is necessary. And as we learned now, making the HGR segment obligatory helps users to not shoot themselves in the foot.
2020-10-24 13:57:35 +02:00
Oliver Schmidt
8e685a0071
Mention recursion. 2020-10-23 18:35:14 +02:00
Oliver Schmidt
947dd9aca0
Adjusted ChkDkGEOS. 2020-10-22 08:54:07 +02:00
acqn
5c43d1e04f Changed codegen for postfix inc/dec operations by deferring them till sequence points.
This usually allows faster & smaller code.
Note that deferred operations must still be called at sequence points even if the whole expressions containing them had constant values.
2020-10-20 22:01:55 +02:00
acqn
bb7b69f513 Added OptShiftBack for shifting the C flag into register A and back. 2020-10-20 21:55:39 +02:00
acqn
0354322413 Added OptSignExtened for testing signness right after sign extention. 2020-10-20 21:55:39 +02:00
acqn
9c776a24e5 Use bcc instead of bne in OptNegAX2 to ease optimizations. 2020-10-20 21:55:39 +02:00
acqn
4f3a96a535 Added new opt OptPushPop2.
Also renamed OptPushPop to OptPushPop1.
2020-10-20 21:55:39 +02:00
Greg King
0f66f7569e Updated the cx16 library to the upstream project's prerelease 38. 2020-10-17 14:48:01 -04:00
mrdudz
77bfd163cd makefile cleanup 2020-10-16 15:50:18 +02:00
Greg King
a25b28a972 Added files to the pet library that support the overlay demo sample program.
cbm_load() is needed because the Pet/CBM Kernals don't have a LOAD function that can be used by machine code programs.
2020-10-15 21:22:04 -04:00
Greg King
e682f7c8c3 Protect the C stack from overlays on the c64 target. 2020-10-15 14:00:25 -04:00
mrdudz
b773bb9ded some more $(RM) vs $(DEL) fixing 2020-10-15 19:34:40 +02:00
mrdudz
6920b8be78 $(RM) abc -> @$(DEL) abc 2>$(NULLDEV) 2020-10-15 18:53:56 +02:00
mrdudz
a0dc7cd9e4 fix grc example, fix makefiles to compile grc example correctly 2020-10-15 18:41:17 +02:00
mrdudz
f60af0301a fix non working Makefiles 2020-10-15 18:35:54 +02:00
Oliver Schmidt
095de4ea52 Write o65 files as SEQ files. 2020-10-15 12:54:01 +02:00
Greg King
e72e44d14f Shortenned the VIC-20's cputc() by 17 bytes.
Changed to a modified table look-up method to convert PetSCII to screen-codes.
2020-10-13 07:55:20 -04:00
Greg King
4905329ff6 Fixed the misspelling of "height" in a GEOS header. 2020-10-12 08:33:45 -04:00
acqn
262c4235df Symbols in ZP segments will use '.exportzp' instead of '.export' if exported. 2020-10-11 23:05:20 +02:00
acqn
e58c84acf7 Support for optionally specifying address size for segments with:
#pragma ***-name([push,] "name"[, "addrsize"])
where "addrsize" is any addressing size supported in ca65.
2020-10-11 23:05:20 +02:00
acqn
f8c9dde989 The instruction parser can now recognize ZP locations and set the addressing mode for them. 2020-10-11 23:05:20 +02:00
Jesse Rosenstock
81550ca1ee CS_MergeLabels: Keep labels referenced by data
Partial fix for ICE in #1211.  This may fix enough to allow #1049 to be
fixed.

When merging labels, keep the first label with a ref that has no JumpTo;
this is a data segment label, used by computed gotos.

The real fix is to track and rewrite labels in data, but this is more
involved.
2020-10-08 12:11:03 +02:00
mrdudz
037a806036 also rename README to readme.txt in the Makefile :) 2020-10-04 17:20:40 +02:00
acqn
dbba5f3fc9 Fixed handling of %v in inline asm parser. 2020-10-04 12:25:24 +02:00
acqn
a85d5330fa Fixed StrBuf initialization in PreparseArg(). 2020-10-04 12:17:14 +02:00
Oliver Schmidt
fd208fdf0b - Added support for calling subdir Makefiles for the make targets 'samples' and 'clean'.
- Adjusted the 'tutorial' Makefile to actually work as expected.

Note: The 'disasm' and 'geos' Makefiles don't seem to work so they are not called as of now.
2020-10-03 19:35:23 +02:00
Jesse Rosenstock
b931e65811 Fix ICE for bit-fields with typedef
Fixes #1267

Avoid ICE, but treat plain int bit-fields declared via typedef as
signed rather than unsigned.  It is more efficient to treat them
as unsigned, but this requires distinguishing int from signed int,
and this is curently not done.
2020-10-03 15:04:31 +02:00
Oliver Schmidt
4acdc9ced9 Fixed paramcount build. 2020-10-03 14:55:30 +02:00
Greg King
c05a750f47 Fixed some copy-&-paste typo mistakes about HuC6280's TMA mnemonic. 2020-10-01 07:25:08 -04:00
mrdudz
4777e98f57 rename testcode/ to targettest/ 2020-09-29 19:14:46 +02:00
mrdudz
dcee493e94 move remaining stuff from testcode/lib/ one level up to testcode/ 2020-09-29 19:12:34 +02:00