Christian Groessler
b4e66ea886
libsrc/atari/system_check.s: fix MEMLO check
...
Old check forced the program's load address to be one more than
MEMLO. But MEMLO points to the first byte of usable RAM, not the last
byte of unusable RAM.
Problem found by Flashjazzcat, see https://github.com/cc65/cc65/issues/2964 .
2026-05-17 14:16:33 +02:00
Bob Andrews
7ff3dfdabf
Merge pull request #2960 from polluks/status
...
Fix sp65 PCX reader: 1bpp monochrome path wrote past bitmap allocation
2026-05-10 16:45:37 +02:00
Bob Andrews
48be9a55f3
Merge pull request #2959 from avolkov76/anv-coptstop-refactor-1
...
Optimizer maintenance: reformat definitions providing more space for names
2026-05-10 15:44:23 +02:00
Stefan A. Haubenthal
c81aaa05af
fix sp65 PCX reader: 1bpp monochrome path wrote past bitmap allocation
...
ReadPlane() already expands packed bits to one byte per pixel for
case 1 (1bpp), but the loop in ReadPCXFile treated the buffer as
still-packed bits using a mask-and-shift pattern. The for-loop also
failed to increment X, causing an infinite loop that wrote past the
allocated bitmap and triggered SIGBUS.
Fix: use the same direct L[X] indexing as the 8bpp path, matching
ReadPlane's pre-expanded output.
2026-05-08 18:00:14 +02:00
Colin Leroy-Mira
d20d99b32b
Fix reverse lowercase on Apple][
...
Fixes #2831 .
Thanks to Alex Volkov for the patch
2026-04-30 19:41:39 +02:00
Alex Volkov
36ec2c2f6f
Update sorted check script for reformatted optimizer step definitions (macro). Also a tweak rejecting commented out lines.
2026-04-19 14:21:37 -04:00
Alex Volkov
8943ef8c13
Reformat the optimizer step definitions with OPTFUNCDEF() macro and provide additional space for step names.
2026-04-19 14:15:55 -04:00
Bob Andrews
8fcee1b552
Merge pull request #2958 from geon/master
...
Fixed typos. marcos -> macros
2026-04-19 17:52:36 +02:00
Victor Widell
c31565cd5b
Fixed typos. marco -> macro
2026-04-19 17:20:54 +02:00
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