1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-03 06:29:36 +00:00
Commit Graph

3698 Commits

Author SHA1 Message Date
Bob Andrews
70bf4d492b
Merge pull request #2105 from bbbradsmith/sim65-64bit-cycle-count
Sim65 64bit cycle count
2023-05-16 15:53:23 +02:00
bbbradsmith
3b7be09a7f extern redeclared as static = error (C spec: undefined)
static redeclared as extern = warning (C spec: ignore extern)
See: #2111
2023-05-11 19:50:58 -04:00
bbbradsmith
f15e9c4159 Linux build rejects %llu in ErrorCode 2023-05-07 17:41:54 -04:00
bbbradsmith
2cb457b85f sim65 use error codes outside the simulated program's range for non-sim errors 2023-05-07 16:51:12 -04:00
bbbradsmith
0081fe548c sim64 universal 64-bit cycle count support:
MaxCycleCount is accounted by countdown, eliminating the 1-instruction-overhead issue, and removing the need to compare against a growing TotalCycles.
Makes main.c responsible for counting total cycles, instead of 6502.c, so the size of MaxCycleCount etc. is fully determined in one location.
Makes error.c responsible for PrintCycles instead of paravirt.c, so that it can be treated globally instead of
Return value of main() should be SIM65_ERROR because it is unreachable by design.
2023-05-07 16:26:42 -04:00
Bob Andrews
9c70235173
Merge pull request #2096 from Movax12/BugFix-for-ismnemonic-function
Bugfix for the .ISMNEMONIC, .ISMNEM builtin function
2023-05-06 21:42:59 +02:00
Bob Andrews
9c27084fa5
Merge pull request #2084 from bbbradsmith/numerical_constant_errors-int
Numerical constant errors and improvements (integer)
2023-05-06 21:36:59 +02:00
Bob Andrews
7b40515506
Merge pull request #2099 from bbbradsmith/split2092-sim65-fix
sim65 fix platform-dependent issues
2023-05-06 20:36:59 +02:00
bbbradsmith
84f0ab322d sim65: cycles does not increment 1 at a time, so some small overhead is needed in range check 2023-05-06 13:54:28 -04:00
bbbradsmith
532681c961 braces were requested
combining the two a = ' ' cases was requested
2023-05-06 12:06:06 -04:00
bbbradsmith
1df7ab0352 opening brace on same line as while
other AbEnd messages don't end in .
2023-05-06 11:55:21 -04:00
bbbradsmith
c03d00bc80 sim65 suppress uninitialized variable warning
the EOF check was protecting uninitialized Val2 but the compiler can't figure that out
2023-05-05 21:46:42 -04:00
bbbradsmith
773716c32a sim65 close(-1) crash fix
test/val/constexpr.c relies on close(-1) to return -1 for some reason (comment says "abuse"), but on MSVC close(-1) is treated as a security issue and terminates the program instead of returning -1
simulating this desire for sim65, though constexpr.c may also warrant a review
2023-05-05 21:46:11 -04:00
bbbradsmith
f2e7609046 sim65 cycles 32-bit range fix
long is 64-bit on some platforms, making this inconsistent, added range check to catch overflow.
reduced tests requesting 5 billion cycles to 2^32-1 so they can fun on 32-bit long sim65.
2023-05-05 21:45:57 -04:00
bbbradsmith
8d048699ee grc65 fix flawed text parsing
Was using fseek(F,-1,SEEK_CUR) which is invalid for text files, behaviour unreliable across platforms.
Added check for internal buffer overflow.
2023-05-05 21:32:34 -04:00
mvax
1c58b302d8 Bugfix for the .ISMNEMONIC, .ISMNEM builtin function 2023-05-05 12:31:19 -04:00
Bob Andrews
a7676bdff5
Merge pull request #2075 from bbbradsmith/struct-duplicate-member-error
Error for struct/union with a duplicate member
2023-05-04 22:43:17 +02:00
bbbradsmith
69f4cd1847 limits.h was apparently already included somewhere on windows but not linux 2023-05-04 05:48:48 -04:00
bbbradsmith
ca8201a314 Overflow test optimization suggested by kugelfuhr
User CHAR_BIT instead of 8
2023-05-04 05:44:20 -04:00
bbbradsmith
8e75e5b51a Suppress overflow warning when conversion is an explicit cast 2023-05-03 19:42:05 -04:00
bbbradsmith
e3cb8dfb9b Numerical constant scanner requires explicitly 32-bit sized type for cross-platform consistency 2023-05-03 19:27:37 -04:00
Bob Andrews
b743b1a8c2
Merge pull request #2081 from bbbradsmith/suppress-size-error
ca65: Suppress '.size' error for multiply-defined symbols
2023-05-04 00:36:48 +02:00
Bob Andrews
45bdeb62ad
Merge pull request #2070 from bbbradsmith/fix2060
RHS primary integer promotion must happen after loading the primary, not before
2023-05-03 23:57:19 +02:00
bbbradsmith
9a502c69dc fix tab, braces for 1-line if, Expr->Ival is signed 2023-05-03 16:46:59 -04:00
Bob Andrews
83ff62d5e2
Merge pull request #2078 from bbbradsmith/line-endings
ca65 support for three line ending types: \r, \r\n, \n
2023-05-03 21:19:03 +02:00
Bob Andrews
f4676e11b4
Merge pull request #2083 from bbbradsmith/struct-passing
Improve struct size error message to include the detected size
2023-05-03 21:00:25 +02:00
bbbradsmith
440c91fad9 braces for 1-line if 2023-05-03 14:11:30 -04:00
Bob Andrews
ae7a1416fe
Revert "Revert "Forbid 3-byte struct pass/return by value, document struct value pass/return"" 2023-05-03 20:02:12 +02:00
bbbradsmith
1f18ab218e Improve struct size error message to include the detected size 2023-05-03 13:35:51 -04:00
Brad Smith
4e6b94de5c
braces 2023-05-03 12:19:05 -04:00
bbbradsmith
016008b6df ca65: Suppress '.size' error for multiply-defined symbols 2023-05-03 11:57:50 -04:00
Bob Andrews
6ffc4004d7
Revert "Forbid 3-byte struct pass/return by value, document struct value pass/return" 2023-05-03 14:24:13 +02:00
Bob Andrews
f3c0f7c6ce
Merge pull request #2074 from bbbradsmith/zp_override_not_suspicious
Explicit z: should suppress "Suspicious address expression" warning
2023-05-03 14:09:23 +02:00
bbbradsmith
86e3a640d5 Support for three line ending types: \r, \r\n, \n.
#1894
2023-05-03 05:03:11 -04:00
bbbradsmith
56c715af40 Error for struct/union with a duplicate member #2015 2023-05-03 01:14:27 -04:00
bbbradsmith
65f773f5ee Explicit z: should suppress "Suspicious address expression" warning #194 2023-05-03 01:01:21 -04:00
bbbradsmith
409235aee6 Optional warning for implicit constant conversion overflow 2023-05-02 22:27:28 -04:00
bbbradsmith
bf5b37a3b2 Error check for internal overflow of numerical constant
See bug #2026
2023-05-02 21:27:02 -04:00
bbbradsmith
e7046a02ff Disallow pass/return of 3-byte struct (#2022), document capability added in #1102. 2023-05-02 19:00:34 -04:00
bbbradsmith
1c26b1cf1b RHS primary integer promotion must happen after loading the primary, not before. See: #2060 2023-05-02 14:42:00 -04:00
Bob Andrews
805e98a7aa
Merge pull request #2027 from bbbradsmith/ca65_jmp_abs_wrap_cpu_filter
ca65 jmp (abs) wrap warning only applies to 6502, later CPUs do not have this bug
2023-05-02 12:52:03 +02:00
Bob Andrews
08223360d5
Update instr.c 2023-05-02 12:43:50 +02:00
Janne Johansson
1f9594560e
Update lynxsprite.c
Remove compiler warning about (signed) char wrapping around to -1 when set to 255.
2023-04-19 09:15:03 +02:00
Ola Söder
2a7533268c Don't use hardcoded paths on Amiga
Hardcoded paths don't make sense on AmigaOS, AROS and MorphOS.
2023-04-07 23:44:30 +02:00
bbbradsmith
8b818aac67 remove trailing space on segment "bytes" warning plural 2023-03-07 18:42:20 -05:00
bbbradsmith
016b03e356 ca65 jmp (abs) wrap warning only applies to 6502, later CPUs do not have this bug 2023-03-07 17:00:38 -05:00
Bob Andrews
b9cf6266e7
Merge pull request #2010 from bbbradsmith/ca65_brk_optional_signature
optional BRK signature on all 6502 CPUs, not just 65816
2023-03-04 13:21:28 +01:00
Bob Andrews
c0559dd931
Merge pull request #2009 from bbbradsmith/ca65_feature_disable
ca65: allow .feature to both enable and disable
2023-03-04 13:08:18 +01:00
Bob Andrews
34189b85ab
Merge pull request #2013 from Movax12/fix-endmacro-not-at-start-of-line
Fix endmacro not at start of line
2023-03-03 12:29:30 +01:00
mvax
c092f57b73 Consistent case for .endmacro in comments, remove trailing spaces 2023-03-02 17:31:55 -05:00