1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-19 09:28:25 +00:00

12110 Commits

Author SHA1 Message Date
Bob Andrews a545b4fc3e Merge pull request #2951 from avolkov76/anv-bug-2942
Prevent inadvertent removals of `ldaxysp` runtime calls in `OptStackOps()`
2026-04-07 13:36:12 +02:00
Alex Volkov 69c17a502b Additional synthetic, extreme register load reuse tests future-proofing issues #2942 and #2947. 2026-04-01 18:27:28 -04:00
Alex Volkov de78048319 Generalize the shared, non-removable reg load tests in RemoveRegLoads() to "instruction affects the other register" 2026-03-29 17:05:20 -04:00
Alex Volkov 321e47f0f3 Rhs X removals in coptstop.c should no longer be dangerous. 2026-03-26 18:32:04 -04:00
Alex Volkov 6027487c30 Expand bug2461 tests to other operators and Lhs/Rhs conditions 2026-03-26 18:22:39 -04:00
Alex Volkov 00a1f1d447 Clearly delineate load instruction "must remove" conditions from "may remove" with a new LI_MUST_REMOVE flag. A demand to remove a non-removable load is fatal. 2026-03-25 19:14:14 -04:00
Alex Volkov c9b885b144 Prevent the removal of a ldaxysp runtime call as a "load instruction" for only the A or the X side, when the other is non-removable. Fixes issue #2942 / #2461. 2026-03-25 19:08:18 -04:00
Alex Volkov 40a20ab973 Expand bug1374 tests to a few other conditions 2026-03-25 19:03:00 -04:00
Alex Volkov ac69017ca5 Remove redundant LoadEntry clears; DelEntry() already handles clearing them, and the redundant clears are a red herring in the code. 2026-03-25 19:01:37 -04:00
Alex Volkov 62451557f9 Revert the fix for #2461 in search of a more general solution 2026-03-25 19:00:57 -04:00
Bob Andrews 80ff9d3f4d Merge pull request #2949 from avolkov76/anv-bug-2947
[cc65] Prevent Lhs loads shared with the Rhs from being removed in `OptStackOps()`
2026-03-25 23:01:50 +01:00
Alex Volkov d711b6d6fa Prevent Lhs load insns shared with the Rhs from being inadvertently removed by Rhs optimizers. Fixes issue #2947. 2026-03-22 19:42:57 -04:00
Alex Volkov af285ba9e5 Remove red herring flag set. It is far too late to set LI_DONT_REMOVE in a subopt. 2026-03-22 18:49:12 -04:00
Alex Volkov 7988d9aefb Regression tests for #2947 expanded to other operators and conditions 2026-03-22 18:44:16 -04:00
Alex Volkov 9732bc2cb7 Correct some printed messages and remove one print in bug2395 test (c&p errors) 2026-03-22 18:42:01 -04:00
Bob Andrews b6d9fb6016 Merge pull request #2948 from avolkov76/tests-out-race
Prevent stdout/stderr redirect races in the val testbench
2026-03-22 20:36:59 +01:00
Alex Volkov 9c5916866b Prevent stdout/stderr redirect races in the testbench 2026-03-22 14:24:02 -04:00
Bob Andrews 916933f884 Merge pull request #2941 from avolkov76/anv-coptstop-refactor
[cc65] Refactor OptStackOps() subopt precondition evaluation framework, phase 1
2026-03-21 14:50:25 +01:00
Alex Volkov d036c4aaae Minimal test for issue #2947 2026-03-20 19:51:55 -04:00
Alex Volkov f464b50495 Minimal test for issue #2946 2026-03-20 19:51:37 -04:00
Alex Volkov 2fd9411f7f Expand bug2395 tests to other operators and conditions 2026-03-20 19:51:04 -04:00
Alex Volkov d427887764 Merge branch 'cc65:master' into anv-coptstop-refactor 2026-03-19 08:15:09 -04:00
Bob Andrews 4232e7acc6 Merge pull request #2945 from polluks/patch-15
Update comment for MEGA65 joystick driver
2026-03-18 21:31:55 +01:00
Stefan 0fe0337e9c Update comment for MEGA65 joystick driver 2026-03-18 19:30:40 +01:00
Alex Volkov 57cc683d91 Whitespace fix (left after var removal) 2026-03-11 19:33:36 -04:00
Alex Volkov ca98b218e8 Remove the unused (for now) predicate functions in coptstop.c to keep the compiler happy. 2026-03-11 19:17:50 -04:00
Alex Volkov 73f4149554 Refactor: remove the now unused flag variable in OptStackOps() 2026-03-11 19:09:34 -04:00
Alex Volkov 99ccd7e1a3 Refactor: Replace OptStackOps() complex (and buggy) flag-based subopt precondition evaluation system with plain language predicate functions. Any custom preconditions can now be expressed without much trouble.
Also, begin establishing parity between precondition logic and actual subopt branching logic.
2026-03-11 17:44:33 -04:00
Alex Volkov 82d672e904 Refactor: rearrange Opt_a_tosbitwise() code to follow the common if-else if-else pattern form used by other subopts. 2026-03-10 20:47:39 -04:00
Alex Volkov bf5d8c44e4 BUGFIX: Fix the "same X value" and "same A value" evaluations issue in OptStackOps(), where the values compared come from the wrong instruction when a runtime call has an asm label. 2026-03-10 20:08:35 -04:00
Alex Volkov 505698c450 Refactor: remove StackOpData side effects from IsRegVar() and PreCondOk()/RegAPreCondOk(); setting StackOpData.ZPLo/ZPHi is explicit. 2026-03-10 19:23:40 -04:00
Alex Volkov 1b778edee8 Annotations ahead of refactoring: bugs., looming bugs, and work notes. 2026-03-10 17:46:40 -04:00
Bob Andrews a29ce64fb5 Merge pull request #2940 from avolkov76/anv-coptstop-head
Compare operator test suite ahead of cc65/coptstop.c refactoring (refer #2935)
2026-03-10 01:49:31 +01:00
Alex Volkov 76d71aec92 Compare operator test suite: forward and reverse compares; edge and corner cases; literals, autos, statics, simple expressions; signed and unsigned; some special cases. 2026-03-09 20:04:59 -04:00
Bob Andrews d45fac3afe Merge pull request #2938 from kugelfuhr/kugelfuhr/fix-2811
Fix an invalid transformation by the optimizer
2026-03-05 19:51:51 +01:00
Kugel Fuhr 3d26a7e1fe Correct test name and test comment. 2026-03-05 18:44:33 +01:00
Kugel Fuhr 380c3f810e Fix an invalid transformation by the optimizer. Introduced by #2811. 2026-03-05 18:40:52 +01:00
Bob Andrews 6184e7286b Merge pull request #2936 from CubeXGames/patch-1
Fix typo in ca65 documentation
2026-03-01 14:06:41 +01:00
CubeX e41484a3a8 Fix typo in ca65 documentation 2026-02-28 20:20:59 -07:00
Bob Andrews c7e851caa3 Merge pull request #2932 from willisblackburn/bug_2930
Move AssignIds to before we print the info line…
2026-02-28 00:14:48 +01:00
Willis Blackburn 5f437e09a0 Move AssignIds to before we print the info line in order to ensure that we write the correct file count. 2026-02-12 17:54:58 -05:00
Bob Andrews 0fca83500b Merge pull request #2927 from kugelfuhr/kugelfuhr/fix-2926
Fix cc65 not detecting invalid integer and float literal suffixes
2026-02-11 19:54:44 +01:00
Bob Andrews 53dacfd18e Merge pull request #2919 from polluks/c16
Combine C16 and Plus/4 source
2026-02-11 19:47:04 +01:00
Bob Andrews f166ca8ad9 Merge pull request #2918 from polluks/patch-15
Removed unused import
2026-02-07 16:35:51 +01:00
Bob Andrews fbcae3e640 Merge pull request #2921 from willisblackburn/master
Add terminating NUL after __func__ string literal #2920
2026-02-07 16:34:01 +01:00
Kugel Fuhr 2f62b263f3 Added a test. 2026-02-06 16:36:44 +01:00
Kugel Fuhr 61799b07bf Fix unchecked integer or floating point suffixes. 2026-02-06 15:55:30 +01:00
Willis Blackburn 789416798f Add terminating NUL after __func__ string literal #2920 2026-01-24 12:32:31 -05:00
Stefan 0125d82902 Replace kbhit implementation with new include 2026-01-22 14:37:52 +01:00
Stefan 53b5f79051 Combine C16 and Plus/4 source 2026-01-22 13:49:56 +01:00