acqn
ff1eca5701
Added and used new utility type functions for bit-fields.
...
Fixed GetUnderlyingTypeCode() for bit-fields with widths > 16.
2022-07-21 03:20:44 +02:00
mrdudz
78244351b7
remove dangling spaces
2022-07-21 03:20:44 +02:00
Karri Kaksonen
e653204ffe
Add target atari7800
2022-07-21 03:20:44 +02:00
empathicqubit
2bd30afdeb
Add --debug-tables <filename> option and output struct and union fields
2022-07-21 03:20:44 +02:00
Greg King
c6c199bd59
Added a URL to the snapshot's commit history as a comment in the Windows snapshot ZIPs.
2022-07-21 03:20:44 +02:00
nyanpasu64
aebf61464d
Replace #include "inttypes.h" with <inttypes.h>
2022-07-21 03:20:44 +02:00
nyanpasu64
8afbf3f5ff
Fix format strings to properly format uintptr_t
2022-07-21 03:20:44 +02:00
nyanpasu64
190e04b0ce
Remove broken inttypes.h
...
src/common/inttypes.h is a shim to fix building cc65 on
non-C99-compliant compilers missing inttypes.h (like VS2012 and
earlier). The shim is actually incomplete and does not define the PRI...
macros supplied by the actual compiler headers. Since we're planning to
use those macros, delete this header so cc65's source files instead use
host-supplied inttypes.h containing macro definitions.
2022-07-21 03:20:44 +02:00
nyanpasu64
b9651e4b06
Fix segfault on 64-bit LLP64 Windows builds
...
There are many occurrences of unsigned long in codegen.h's function
arguments. Changing g_getimmed and g_defdata makes `make` succeed
without segfaulting. I don't know if it makes cc65 behave correctly in
all cases, or if there are more unsigned long that need to be changed.
2022-07-21 03:20:44 +02:00
acqn
43abc5b01f
Fixed signed long comparisons with smaller unsigned types.
2022-07-21 03:18:13 +02:00
acqn
f0242fb7d5
Fixed LimitExprValue() for 64-bit long env.
2022-07-21 03:18:13 +02:00
acqn
7e3aaf199a
Fixed bitwise shift with numeric constant operand(s).
2022-07-21 03:18:13 +02:00
acqn
1579d2ec41
Fixed OptCmp1 with certain code patterns with labels.
2022-07-21 03:18:13 +02:00
Jeff Tranter
ba13ba32a1
Fix some commonly made spelling errors in comments.
2022-07-21 03:18:13 +02:00
Spiro Trikaliotis
77fa71994f
ca65: .constructor after .export fails
...
The actor directives (.constructor, .destructor, .interruptor, and .condes)
can't handle a symbol that's already exported.
The relevant code does the checks in the wrong order.
For example, the following correct snippet does not assemble:
.export C
C: .constructor C, 5
The assembler outputs: test.s:2: Error: Address size mismatch for symbol 'C'
Exchanging both lines makes it work.
This fixes #1647 ; the patch is provided by 'kugelfuhr' and taken from there.
2022-07-21 03:18:13 +02:00
Spiro Trikaliotis
e35f4fb48f
Invalid flagged errors if token is missing
...
A missing factor in an expression causes an expected but missing token
to be skipped, leading to invalid flagged errors in the following line:
l = 3 +
lda #$00
An error should be output for line 1, but not for line 2. Actually, both
are flagged as errors:
test.s(1): Error: Syntax error
test.s(2): Error: Unexpected trailing garbage characters
This patch (as proposed in issue #1634 by kugelfuhr) fixes this.
2022-07-21 03:18:13 +02:00
acqn
ace0bc414b
Fixed anonymous bit-fields declared with typedef'ed type names.
2022-07-21 03:18:13 +02:00
acqn
879ed5bb95
Fixed crash with labels in non-function/block scopes.
2022-07-21 03:18:13 +02:00
Greg King
800568dd58
Added code that avoids infinite loops that were caused by circular references
...
(a symbol that was defined by referring to itself directly or indirectly). Patch by kugelfuhr.
2022-07-21 03:18:13 +02:00
Greg King
3885dd8504
Removed an obsolete command-line option from the cc65 compiler.
2022-07-21 03:13:10 +02:00
Matthew D. Steele
815e30c47f
Add space after function names
2022-07-21 03:13:10 +02:00
Matthew D. Steele
db02a89b5d
Move local variable declaration to top of block
2022-07-21 03:13:10 +02:00
Matthew D. Steele
ceca1c496d
Adjust Pop() sequencing in paravirt.c
2022-07-21 03:13:10 +02:00
Matthew D. Steele
623e951e33
Fix Pop() implementation in src/sim65/paravirt.c ( fixes #1625 )
...
The Pop() function was not handling stack pointer wrap around correctly.
Also, change the simulated RTS implementation in ParaVirtHooks() to
explicitly sequence the two Pop() calls in the correct order.
2022-07-21 03:13:10 +02:00
polluks2
7a0a0edb89
Fixed many typos
2022-07-21 03:13:09 +02:00
polluks2
5afc349199
Fixed typo
2022-07-21 03:13:09 +02:00
Greg King
81930053dd
Used (size_t), instead of (long) where converting between pointers and integers.
...
(long) still is 32 bits on 64-bit Windows!
2022-07-21 03:13:09 +02:00
Oliver Schmidt
8b0de8a931
Merge branch 'master' into master
2021-11-23 22:56:51 +01:00
acqn
eeaa111835
Fixed crash in Opt_a_toscmpbool caused by wrong order of condition checks.
2021-09-28 17:02:37 +02:00
Greg King
fcda94f258
Made a slight improvement in the ld65 expression evaluator.
2021-06-13 20:36:05 -04:00
acqn
25a35d6b59
Fixed result type of certain operations, which was broken with the bit-field fix.
2021-06-10 21:54:32 +02:00
acqn
5adb29ce31
Made "bit-field-ness" a type property instead of a SymbolEntry or ExprDesc property.
...
Fixed integer promotion and result type in certain operations.
Fixed bit-fields 'op=' and postfix inc/dec operators.
2021-06-09 08:03:12 +02:00
acqn
1d7bf7355c
Better function naming in declare.c.
...
Scalar initialization routines need only 'const Type*' as parameters.
2021-06-09 08:03:12 +02:00
acqn
004c60de39
Optional flags for the codegen to skip restoring the expression results into the primary registers.
2021-06-09 08:03:12 +02:00
acqn
dcacba472a
Moved ArithmeticConvert() from cc65/expr.c to cc65/datatype.c.
...
Reorganized a few functions in cc65/datatype.c.
Added SignedType() and UnsignedType() for future usage.
Made LimitExprValue() external so that it can be used more often.
2021-06-09 08:03:12 +02:00
Filip Golewski
09862e7ce9
Update src/msbuild.cmd script to optionally include Visual Studio 2019 Community build tools
2021-06-08 21:16:20 +02:00
polluks2
ed9f9ccbab
Fix #1536
2021-06-07 23:12:50 +02:00
Wayne Parham
69e2313a63
First round of requested code changes
2021-06-06 23:20:54 +01:00
Greg King
1c16e46f23
Improved ld65's error messages about ca65's .BANK() function.
...
* Split a message into two more specific messages.
2021-06-05 11:31:28 -04:00
Greg King
39ef63cbbc
Don't check for circular references of imports that don't have matching exports.
...
This fix will avoid referring to a struct member through a null pointer.
2021-06-04 13:35:26 -04:00
bbbradsmith
d5d9183ccf
conform to prevailing if bracket style
2021-06-04 07:09:58 -04:00
bbbradsmith
6ebe551919
return is sufficient, TooComplex flag is unnecessary to resolve this crash case
...
suggested by greg-king5 in #1409
2021-06-04 07:09:58 -04:00
bbbradsmith
3584c4c87f
fix crash when a NULL ExprNode is checked for circular references
2021-06-04 07:09:58 -04:00
acqn
4d5fe38540
Fixed OptStackOps when the stuff pushed on stack top is accessed before the op.
2021-06-03 12:03:53 +02:00
acqn
79be6dec16
More quick hack for CE_GenRegInfo.
2021-06-03 12:03:53 +02:00
acqn
0bfa13722b
More funcinfo on register usage fixes.
2021-06-03 12:03:53 +02:00
Greg King
0d3c827d80
Made the C preprocessor #if nesting stack have 256 levels.
...
Closes #1523 .
2021-05-30 03:52:32 -04:00
Greg King
d14148ab4f
Restricted commit b9a3c78888
to classic-style Assembly macros.
...
.include will work at expansion-time for .define macros.
2021-05-17 19:48:47 -04:00
acqn
1450f146a5
Fixed '[]', '()' '.' and '->' operators following a postfix increment/decrement.
2021-05-16 20:43:49 +02:00
acqn
43ca887263
Fixed 'case'/'default' labels in non-compound 'switch' body statement.
2021-05-16 20:43:49 +02:00