acqn
c45a6b3685
Utility function ParseOpcArgStr().
2020-09-27 12:22:05 +02:00
Jesse Rosenstock
d0089aef95
Fix bit-field truncation warning message
...
Fix copy & paste bug with warning message.
struct X {
signed int a : 3;
};
struct X g = { 5 };
Before:
s.c(4): Warning: Implicit truncation from 'int' to 'int : 3' in bit-field
initializer changes value from 5 to 5
After:
s.c(4): Warning: Implicit truncation from 'int' to 'int : 3' in bit-field
initializer changes value from 5 to -3
Fixes #1268
2020-09-26 17:41:45 -04:00
mrdudz
34177d9edd
test related to issue #1094
2020-09-25 20:08:32 +02:00
mrdudz
7ff08c85cf
Merge branch 'master' of https://github.com/cc65/cc65
2020-09-25 16:25:53 +02:00
mrdudz
61d934fd7b
test related to issue #1265
2020-09-25 16:25:32 +02:00
Greg King
47ee179273
Fixed a copy & paste error in the test/misc/ makefile.
...
Fixed a warning that's changed to an error in Travis CI tests.
2020-09-25 00:31:07 -04:00
Fabrizio Caruso
61ebe2c34b
Indentation in vga.s for gamate
2020-09-24 19:42:34 +02:00
Fabrizio Caruso
6fdb356db7
Simplify Gamate tile redefinition (as already done for PCE)
2020-09-24 19:42:34 +02:00
mrdudz
5ba9d28488
test related to pr #1189
2020-09-24 16:16:16 +02:00
mrdudz
97a1093ee0
test related to issue #1222
2020-09-24 12:23:18 +02:00
mrdudz
fb8b45e479
added note on how to manage the sample programs
2020-09-24 00:18:28 +02:00
mrdudz
a86644eff1
test related to issue #1221
2020-09-24 00:08:36 +02:00
mrdudz
b3491e3d9a
test related to issue #1244
2020-09-23 23:57:36 +02:00
mrdudz
46ebb15c76
test related to issue #1245
2020-09-23 23:57:25 +02:00
mrdudz
6fdd90fa63
fix typo
2020-09-23 23:51:37 +02:00
mrdudz
99121688f8
added test related to issue #1263
2020-09-23 23:51:24 +02:00
Greg King
81ac28ff71
Used TAY/TYA instead of PHA/PLA when extracting a bit-field.
...
Without optimization, it saves a few CPU cycles. With optimization, it saves more cycles and a few bytes.
2020-09-22 12:47:09 -04:00
Greg King
ea95728330
Avoided an avalanche of messages from bad bit-field declarations.
...
Made cc65 replace a bad bit-field type with a good one, and always parse the field width.
Shortenned a parameter name to a spelling that's consistent with other function headers.
2020-09-22 12:47:09 -04:00
Greg King
07ea5259ac
Changed a cc65 error message to say that the sizes of bit-field types (not bit-fields) are limited.
2020-09-22 12:47:08 -04:00
Greg King
d906204e84
Allowed UPDCRAMPTR to be exported as a constuctor in the VIC-20 library.
2020-09-22 12:31:27 -04:00
Greg King
dc14751954
Exported the direct Kernal entries that were moved from target headers to "cbm_kernal.inc".
2020-09-22 00:04:24 -04:00
Greg King
41bd8d909b
Added ld65's bank attribute to the cx16 library's bank (overlay) configuration file.
...
That attribute makes it easier for Assembly code to know which bank holds a label.
2020-09-20 19:55:25 -04:00
Greg King
0b64ca0d7d
Fixed the ld65 cx16 Assembly configuration file.
...
The CODE segment immediately follows the EXEHDR segment. Added a segment for the zero-page area that's free when the BASIC ROM isn't used.
2020-09-20 16:09:58 -04:00
Greg King
bf4b195016
Added some comments that explain where the g_branch() code generator can and can't be used.
2020-09-18 15:50:26 -04:00
acqn
de630a1245
Fixed quick hack for known registers after calling certain runtime functions,
...
and new quick hack for tosshrax.
2020-09-18 09:04:15 +02:00
acqn
079f4a99dd
Added processor state info to the OPCDesc table. However, since some opcodes are affected by the addressing mode, this info is unused in codegen/optimizer but just as quick in-code documentation/hints.
2020-09-18 09:04:15 +02:00
acqn
a7d6eb9190
Added processor flag usage/change-tracking for non-JSR/RTS code entries.
...
Some existing optimizations are impacted and need fixes in order to work correctly again.
Fixed and improved OptPrecalc. Now it respects the C/V/Z/N flags.
Fixed optimizations impacted by added support of tracking processor flags.
2020-09-18 09:04:15 +02:00
acqn
d02b12fa6c
Made local code/data labels really local to the functions where they live in.
2020-09-18 09:02:16 +02:00
acqn
86ced2bd4c
Avoided unnecessarily boosting the code label numbers with boolean AND.
2020-09-18 08:59:56 +02:00
Jesse Rosenstock
0482e4d6e4
Fix CRLFs introduced by fe3f267
2020-09-18 08:57:28 +02:00
acqn
b8ae5c28fe
Added debug output support for processor flags.
2020-09-13 13:50:35 +02:00
acqn
810e17edfe
Fixed processor states tracking for the BIT/TRB/TSB opcode.
...
Added new opcode descriptions about whether and how the opcode accesses memory.
2020-09-13 13:50:35 +02:00
acqn
66c5faeb9a
Added processor flags usage tracking.
...
Added ZNRegs for tracking what register(s) Z/N flags currently reflect.
Added utility functions to check if the specified processor state is known to be a certain value.
2020-09-13 13:50:35 +02:00
acqn
fe3f267233
Added new runtime sub bcasta/bcastax/bcasteax opposing to bnega/bnegax/bnegeax.
2020-09-11 13:33:54 +02:00
acqn
142b0bf9b3
Added utility functions to get names of comparison function/transformer subroutines.
2020-09-11 13:33:54 +02:00
Greg King
ae6696fcb9
Removed some ambiguity from a statement.
...
A limited number of bit-field types are required by the C standard, not by cc65.
2020-09-08 10:55:07 -04:00
acqn
ab7e9f8424
Hotfix for Issue #1250 .
2020-09-08 16:28:21 +02:00
Jesse Rosenstock
4e4e4c2d21
Allow char bit-fields
...
These are not required to be supported (only int, signed int, and
unsigned int are required), but most compilers support it.
https://port70.net/~nsz/c/c89/c89-draft.html#3.5.2.1
https://port70.net/~nsz/c/c89/c89-draft.html#A.6.5.8
For consistency with other integral types, plain `char` bit-fields
are unsigned, regardless of the `--signed-chars` option.
Fixes #1047
2020-09-08 14:24:04 +02:00
acqn
41cee0eb44
Extended support for more addressing modes in tos* optimizations.
2020-09-08 14:19:48 +02:00
acqn
7553b60ef0
Improved OptStackOps for optimizating further when operands have equal hi-bytes.
2020-09-08 14:19:48 +02:00
acqn
57117fa687
Utility functions about compare conditions.
2020-09-08 14:19:48 +02:00
acqn
64ef562fa7
Moved all optimization steps from codeopt.c and some optimization steps from coptind.c into new separate files.
2020-09-08 14:18:22 +02:00
Jesse Rosenstock
9a0e4a35e1
Fix enum bit-field ICE #1244
...
This previously resulted in an ICE:
cc65: Check failed: (Entry->Type->C & T_MASK_SIGN) == T_SIGN_SIGNED,
file 'cc65/symtab.c', line 874
This CHECK is in the code that deals with changing `int` bitfields to
`unsigned int`.
Work around this by treating enum bit-fields as having their signedness
specified, so this type change code does not get called.
Fixes #1244 .
2020-09-07 11:21:23 +02:00
Tevo
1e7a9e44af
Update comment to reflect addition of integer boundary constants
2020-09-06 23:32:00 +02:00
Tevo
23a8b2c303
Define integer size macros for lacking systems
...
Define integer size macros for lacking systems
2020-09-06 23:32:00 +02:00
acqn
6bb2d1d5d1
Fixed a comment on struct/union types in DoCompare().
2020-09-06 22:47:11 +02:00
acqn
1cde952cf5
Fixed comparing an enum type with a non-enum type in DoCompare().
2020-09-06 22:47:11 +02:00
acqn
6e0fb630d7
Fixed check for processor flags usage in case of PHP.
2020-09-06 13:32:38 +02:00
acqn
e2f950b15e
Avoided referencing string literals with sizeof so that they are not output if unused elsewhere.
2020-09-05 13:21:21 +02:00
acqn
903e84c24c
Std-functions are no longer inlined if they are unevaluated.
2020-09-05 13:21:21 +02:00