1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-27 04:54:54 +00:00
Commit Graph

3008 Commits

Author SHA1 Message Date
acqn
539924249b More complete fix for Issue #1071. 2020-07-07 18:28:56 +02:00
acqn
286da30a26 Quick fix for Issue #1071. 2020-07-07 18:28:56 +02:00
Daniel Serpell
17c5504129 In Atari XEX output format, join memory areas if possible.
This makes executables shorter if two memory areas are consecutive.
2020-07-04 23:28:10 +02:00
Jesse Rosenstock
d31171164e Fix formatting 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
fae25bc459 CHECK we have at most a partial byte 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
f4a6d08847 Fix full bytes vs full word in comment 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
a00611798d Output bit-field data as chars instead of ints
This prepares for #1058, which will pad bit-fields only to
the next byte, instead of the next sizeof(int) (two bytes).

OutputBitFieldData now outputs chars instead of ints, and
calls to this function loop until there is less than one byte
to output.  A final partial byte is written out with zero padding
as a final partial int was previously.
2020-06-29 14:49:36 -04:00
Jesse Rosenstock
90d1c89bff
Allow overlap of bit-field storage units (#1055)
* Allow overlap of bit-field storage units

Previously,
struct s {
    unsigned int x : 10;
    unsigned int y : 10;
};
had sizeof(struct s) == 4.

With this change, allow the storage units of x and y to overlap,
so sizeof(struct s) == 3, with y stored immediately after x,
with no padding between them.

An int bit-field (the only type currently supported) will still
never occupy more than two bytes.

* ParseStructInit: Fix typo and expand comment

Explain why there are at most 30, not 32 bits.

* ParseStructDecl: Rewrite AddBitFieldCall

No behavior change.

Co-authored-by: Jesse Rosenstock <jmr@users.noreply.github.com>
2020-06-27 15:02:11 +02:00
acqn
8a166ac82f Fixed register usage tracking interfered by CE_SetArg. 2020-06-22 23:23:39 +02:00
acqn
2220c58f51 If the previous insn may be skipped, we cannot simply predict the output values of the registers. 2020-06-22 23:23:39 +02:00
acqn
53eb6a948d No more duplicated stores by Opt_tosshift which could result in worse optimizations. 2020-06-22 23:23:39 +02:00
acqn
49c5cfd65b Improved fix for Issues #167 and #784 and somehow #781. 2020-06-22 23:23:39 +02:00
acqn
48d3578c24 Fixed Issue #784. 2020-06-22 23:23:39 +02:00
acqn
a7a8426a90 Just keep Lhs loads in OptStackOps and leave them to OptUnusedLoads,
whilst Rhs loads must be removed for OptStackOps to work right.
Fixed Issue #167 as well as similar issues with tosshift.
2020-06-22 23:23:39 +02:00
Jesse Rosenstock
1c2edc5434 AddBitField: Rename Width arg to BitWidth
This makes the arg consistent with the SymEntry field name.
2020-06-21 01:08:44 +02:00
Jesse Rosenstock
4afc552e17 ParseStructDecl: Make BitOffs unsigned
This makes it consistent with SymEntry and removes the need for
some casts that were added to avoid warnings about signed vs
unsigned comparison.
2020-06-21 01:07:45 +02:00
mrdudz
baa5d051e4 use same description as in the docs 2020-06-16 00:11:07 +02:00
mrdudz
349a84d972 remove superfluous TAB 2020-06-16 00:08:55 +02:00
mrdudz
98c7186221 Add description for --debug-opt-output to the --help output 2020-06-15 23:39:50 +02:00
acqn
f9204e5b6f Fixed g_addlocal codegen with long types. 2020-06-01 22:37:40 +02:00
acqn
8066cd9ace Fixed wrong case in PreDec codegen, which never seems to be in use though. 2020-06-01 22:37:40 +02:00
acqn
07a5324a81 Fixed Issue #1028 by outputing local literals when exiting the function scope. 2020-06-01 22:37:40 +02:00
acqn
68f53e69f1 Fixed Issues #420 and #919 by always outputing the code segment before the three data segments for functions. 2020-06-01 22:37:40 +02:00
acqn
33e103fdc6 Fixed Issue #1040: non-byte pointer +=/-= byte codegen bug. 2020-06-01 22:37:40 +02:00
Oliver Schmidt
555282497c Removed --lib option from cl65.
The general approach of cl65 when generating the command lines to be executed is to first put options and the put files. However, this doesn't work well with the --lib option which would rather need to be put when libraries in general are put. I opted to not add this special behavior to cl65 as
* the use case for the --lib option is _VERY_ specific
* cl65 is after all a wrapper for ordinary use cases
2020-05-30 21:03:15 +02:00
laubzega
dc4142e1a9 Minor formatting changes after review. 2020-05-29 10:00:33 +02:00
laubzega
083f3ae26b Fix for #928. 2020-05-29 10:00:33 +02:00
Greg King
f8be35b41e Fixed some typos in the "large alignment" support. 2020-05-15 21:09:02 -04:00
Chris Cacciatore
ad1eadd60d Added support for --large-alignment in ld65.
Implemented the same way as in ca65.
2020-05-15 17:54:41 -04:00
greg-king5
4ea2bfef0a Aligned comment. 2020-03-26 23:08:49 -04:00
marko.lauke
3e12840933 +code style 2020-03-26 23:08:49 -04:00
marko.lauke
68ff89ba0a +cc65 inline asm stp mnemonic support 2020-03-26 23:08:49 -04:00
bbbradsmith
e0cb33d9d4 SEGMENT start of 0 should be valid 2020-03-22 21:03:07 +01:00
Greg King
2fc24847ac Fixed an error message printer.
The disassembler can be built and won't crash if it sees duplicate labels, and one of them is an unnamed label.
2020-03-11 18:07:08 -04:00
Greg King
e2c6648607 Fixed a typo in commit 2e5fbe89cd.
Changed a && to ||.
2020-02-21 08:12:05 -05:00
acqn
dc5114b071 Just disable OptPushPop if N/Z is used after the PLA.
This is a more conservative way to fix Issue #971.
2020-02-01 18:04:32 +01:00
acqn
6d530931bf Quick fix for the OptPushPop bug reported in Issue #337. 2020-02-01 18:04:32 +01:00
acqn
9559625ee8 Always insert a LDA after the removed PLA during the optimization in OptPushPop.
Fixed Issue 971.
2020-02-01 18:04:32 +01:00
acqn
5b11eb4bb9 Corrected check in OptTransfers2 for register usage. Fixed Issue 992. 2020-02-01 18:04:32 +01:00
Greg King
90a2edcfa2 Made cc65 detect a possibly missing argument at the end of a function argument list.
(It could be a stray comma at the end of the list.)
2020-01-25 04:14:58 -05:00
Greg King
5109c0b68f Made ca65 give error messages when it sees duplicate .define commands. 2020-01-02 04:26:02 -05:00
Greg King
3fa253d31f Updated the cx16 library to the Commander X16 Kernal's prerelease 35. 2019-12-25 10:56:32 -05:00
Greg King
fb0d09a277 Changed sim65's internal error codes from 9-bit values to 7-bit values.
Some shells truncate process return codes to 8 bits.  And, the eigth bit often is used to show that a signal stopped the process.
2019-12-06 14:47:47 -05:00
bbbradsmith
c9355734f5 make linker generated export warning conistent with the import warning 2019-11-18 21:50:44 +01:00
bbbradsmith
788fbcc9c8 Fix silent crash failure on warning from linker command line define import size mismatch 2019-11-18 21:50:44 +01:00
Greg King
4f24a06f0e Fixed error handling for missing names in ld65 configure files. 2019-10-12 07:59:49 -04:00
Greg King
2e5fbe89cd Made the "none" CPU allow all address sizes. 2019-10-02 10:09:48 -04:00
Greg King
18afc7c703 Created a target and a library for the Commander X16 prototype computer. 2019-09-27 03:38:51 -04:00
Greg King
0896deedef Added a .ORG keyword to ca65 structs/unions.
Allow 24-bit numbers as operands in ca65 structs/unions.
2019-09-11 19:00:08 -04:00
Greg King
a0db846a97 Allowed old-style (K and R) function declarations to be fastcall.
That lets them match old-style definitions.  It avoids "Type conflict" error messages.  It allows shorter function calls.

Fixed the types of some variables in "test/ref/otccex.c".  It avoids crashes on 64-bit Windows (32-bit Windows with 64-bit pointers).
2019-07-22 09:26:23 -04:00