Commit Graph

419 Commits

Author SHA1 Message Date
Irmen de Jong
67fb45a55b don't produce invalid boolean initalization error. Fixes #173 2025-07-26 12:35:23 +02:00
Irmen de Jong
866313209b fixed zp vars 0 initialization 2025-07-24 00:17:31 +02:00
Irmen de Jong
8dc2e47507 fix partial unused code removal in vm target 2025-06-11 23:31:29 +02:00
Irmen de Jong
9da430ffeb vm: more complete V-flag handling. somd doc and todo updates. 2025-05-23 18:58:14 +02:00
Irmen de Jong
25d7f8808f IR: added signed multiplication opcodes 2025-05-20 21:36:05 +02:00
Irmen de Jong
6a33be3fd8 IR: allow returning boolean in Pc/Pv cpu status register (Pz and Pn are not yet possible) 2025-05-15 22:56:45 +02:00
Irmen de Jong
e31ef6f06f IR: fix temp register type in for x in array 2025-05-13 22:23:04 +02:00
Irmen de Jong
ba93966474 optimize codegen: shortcut redundant jumps in when statement 2025-05-13 00:35:22 +02:00
Irmen de Jong
31c1bf8bc5 added on..goto/call statement 2025-05-11 21:37:44 +02:00
Irmen de Jong
99b9370178 fix various bugs around word-indexing combined with address-of: &buffer[2000] 2025-05-10 16:22:05 +02:00
Irmen de Jong
522958e0e9 @dirty variables now actually end up in the uninitialized BSS_NOCLEAR section 2025-05-06 01:41:34 +02:00
Irmen de Jong
98505d27b1 IR: fix invalid removal of label chunks and include asmsubs when looking for labels 2025-04-24 23:30:51 +02:00
Irmen de Jong
cd63a58ad9 IR: get rid of problematic PREPARECALL pseudo instruction 2025-04-24 22:32:40 +02:00
Irmen de Jong
170f8dd092 IR: new CALLFAR instructions to support callfar into another bank 2025-04-24 21:17:48 +02:00
Irmen de Jong
619dcb6a84 fix error in IR register typing 2025-04-24 20:50:19 +02:00
Irmen de Jong
99ae8ea52e code cleanup 2025-04-24 18:51:03 +02:00
Irmen de Jong
d2cc7ccdfa remove redundant variable=0 initializations (BSS clear takes care of them) 2025-04-23 14:45:38 +02:00
Irmen de Jong
a4d0589f10 fix errors like parse error still printed in color when -plaintext is set 2025-04-22 19:26:11 +02:00
Irmen de Jong
bd1894580e allow floating point value as part of a multi-value return 2025-04-18 22:45:05 +02:00
Irmen de Jong
dd2d466350 code cleanups 2025-04-17 22:58:02 +02:00
Irmen de Jong
3770a4fe0c easier datatype notation by just using the type objects directly 2025-03-18 23:33:04 +01:00
Irmen de Jong
582a70b046 fix calling label as subroutine (JSR label) 2025-03-04 21:53:53 +01:00
Irmen de Jong
3e2b2a698d Separate simple Ast and Symboltable from codeCore into new simpleAst module. VirtualMachine and Intermediate do not need them, just codeCore. 2025-02-24 22:06:52 +01:00
Irmen de Jong
e55ce5504e added %option romable to enable romable mode, but only generate a bunch of warnings for problematic codegeneration atm 2025-02-20 23:40:44 +01:00
Irmen de Jong
fb1e89d9ef update docs about call convention for multi-value results (first is in A or AY, then R15...R0)
added sprites+coroutines+defer part to benchmark program
2025-02-19 22:10:12 +01:00
Irmen de Jong
bc550a4549 fix optimized multi-value call result assignment 2025-02-19 20:19:20 +01:00
Irmen de Jong
ebdea9cf76 optimized call convention for multi-value return and assign on regular asmsubs (6502) 2025-02-19 20:19:20 +01:00
Irmen de Jong
efd41260f2 added %jmptable 2025-02-09 15:02:59 +01:00
Irmen de Jong
0191acb2b3 fix IR codegen for the RETURN 4,5,6,7
added cx16.EXTAPI_memory_decompress_from_func for cx16
2025-01-22 23:31:51 +01:00
Irmen de Jong
7a13f57ab0 enforce variable init values are only strings or arrays 2025-01-20 01:25:17 +01:00
Irmen de Jong
09a17743ad merge IMachineDefinition into ICompilationTarget 2025-01-13 21:45:38 +01:00
Irmen de Jong
66558f7638 IR support for multi-value returns in normal subroutines, documentation. 2025-01-09 22:39:08 +01:00
Irmen de Jong
8f6b5676d7 working on codegen for multi-value returns 2025-01-07 20:35:49 +01:00
Irmen de Jong
ca9422bbe9 be able to parse multiple return values (sub + return) 2025-01-07 01:51:54 +01:00
Irmen de Jong
407773bda2 IR: don't lose inline asm chunks, fix carry behavior for multi-shifts 2025-01-04 22:12:54 +01:00
Irmen de Jong
b7f47d354f IR: implemented << and >> for split word arrays 2025-01-03 22:18:02 +01:00
Irmen de Jong
5d33c93af9 IR: implemented rol(), rol2(), ror(), ror2() for split word arrays 2025-01-03 20:01:50 +01:00
Irmen de Jong
4db6859f3f IR: strict register pool type assignment, 1 unique type per register + verification during IR writing 2025-01-03 04:18:16 +01:00
Irmen de Jong
10b9162dc5 improving fileselector 2024-12-30 21:34:03 +01:00
Irmen de Jong
37c2c1bf0b support &, &< and &> on array elements from split word arrays, not just on the array as a whole 2024-12-30 00:00:31 +01:00
Irmen de Jong
c8996418da ir: tweak register pool, prepare to register the types there uniquely 2024-12-30 00:00:31 +01:00
Irmen de Jong
76b29aa629 fixed register reuse and types on syscall interface 2024-12-30 00:00:31 +01:00
Irmen de Jong
f42e12bc13 ir: fix more register typing errors 2024-12-30 00:00:31 +01:00
Irmen de Jong
427451a23f ir: remove remaining SL* opcodes 2024-12-30 00:00:31 +01:00
Irmen de Jong
af7930d494 ir: remove SL* opcodes 2024-12-30 00:00:31 +01:00
Irmen de Jong
e2882d37bf ir: remove a bunch of strange in-place assignment operators, and problematic opcodes 2024-12-30 00:00:31 +01:00
Irmen de Jong
942d3ee640 ir: improve register type detection 2024-12-30 00:00:31 +01:00
Irmen de Jong
056c0a24d9 better way of doing BIT instructions 2024-12-30 00:00:31 +01:00
Irmen de Jong
827df04b32 IR: BIT instruction added 2024-12-30 00:00:31 +01:00
Irmen de Jong
e174b31344 IR: fix up missing indirect goto codegen 2024-12-30 00:00:31 +01:00