Irmen de Jong
05d8acc4bb
optimized VM initialization and update Mordant library to fix a FFM crash
2026-10-13 22:48:29 +02:00
Irmen de Jong
6cac707fd1
code cleanups
2026-10-13 22:40:19 +02:00
Irmen de Jong
0b902f06b5
m68k: word-packed stack argument slots
2026-10-13 21:37:43 +02:00
Irmen de Jong
eda21a6ebf
Fix in operator on arrays larger than 255 elements
2026-10-11 02:05:21 +02:00
Irmen de Jong
3d78415088
better vm error for %asm
2026-10-08 04:37:19 +02:00
Irmen de Jong
bbff472457
doc cleanup
2026-10-07 19:06:16 +02:00
Irmen de Jong
fe90ca572d
slice 2 for m68k stack mememory model
2026-10-07 19:06:16 +02:00
Irmen de Jong
26bbd6c1fe
vertical slice prototype for m68k stack mememory model
2026-10-07 19:06:16 +02:00
Irmen de Jong
1f8b42fae5
make user docs and some code comments less convoluted
2026-10-05 20:00:32 +02:00
Irmen de Jong
d703d678b4
fix VM label-valued initializers
2026-09-25 02:22:19 +02:00
Irmen de Jong
b1a9ba929d
remove ARRAY_POINTER and make pointer arrays target-independent
2026-09-25 01:18:32 +02:00
Irmen de Jong
f086918e6f
add union types: structs where every field is at offset 0, thus saving memory
2026-09-23 00:07:44 +02:00
Irmen de Jong
468850bc47
structured IR
2026-09-11 20:20:40 +02:00
Irmen de Jong
ce2b298d6f
code cleanups
2026-09-08 22:36:54 +02:00
Irmen de Jong
58f544fe14
Implement counted-loop IR (IRLoopChunk)
...
Replace the early lowering of constant repeat/for loops into p8_regfile
counter sequences with a first-class IRLoopChunk that carries the trip
count and body. This removes the fragile REGFILE-DEPENDENT m68k dbra
peephole and gives each backend explicit control.
2026-09-04 00:01:00 +02:00
Irmen de Jong
59c41ad129
ir: add scaled indexing (S=) to LOADX/STOREX/STOREZX
...
Remove byte-offset pre-scaling from IR generation and encode
element index + explicit scale in the IR. Effective address is
base + index*scale + disp (disp = symbolOffset).
2026-09-02 00:34:23 +02:00
Irmen de Jong
94822b8662
Add arrays of struct instances (StructType[N] vars)
...
Parser: accept `Type[N] name` between type and identifier
(Prog8ANTLR.g4, Antlr2KotlinVisitor) via elementToArray()
for STRUCT_INSTANCE; CodeDesugarer: handle struct-instance
bases, addressOfStructInstance(), whole-struct memcopy
(points[a]=points[b]), and fix variable-index 16-bit scaling
in 6502 AssignmentAsmGen.computeStructArrayElementAddress();
IR: preserve STRUCTDEFS round-trip, VM loader support;
m68k/new6502/intermediate backends; docs + todo updated.
Limitations: not as struct fields (AstChecker/
AstIdentifiersChecker error) nor as sub params.
2026-08-30 14:14:49 +02:00
Irmen de Jong
250ddda11b
ir,m68k: add LOADP_INC/STOREP_INC for pointer post-inc (a0)+
2026-08-27 02:57:54 +02:00
Irmen de Jong
79dd8d6b92
vm: rnd() is now identical to the xorshift algorithm of the other compilation targets
...
m68k: implemented clamp IR syscalls
new6502: implement EXTL
2026-08-22 22:29:41 +02:00
Irmen de Jong
df659d285b
optimize imports
2026-08-18 01:28:35 +02:00
Irmen de Jong
2cb753caf8
fix floating point issue for IR syscalls and m68k codegen
2026-08-17 04:03:09 +02:00
Irmen de Jong
4fdd12929a
vm: switched to m68k like 32 bits registers
2026-08-16 21:14:15 +02:00
Irmen de Jong
cc4f27d121
vm: making VM 32 bit
...
work in progress: see vm32.md there are failing tests still
2026-08-16 19:49:28 +02:00
Irmen de Jong
a68cdd13a6
IR: added EXTL and EXTLS opcodes to help with pointer math
2026-08-15 22:58:15 +02:00
Irmen de Jong
8dec449a1c
get rid of Either
2026-08-13 22:40:51 +02:00
Irmen de Jong
da8c3eda92
new language feature: implicit for loop variable declaration
2026-08-09 14:49:19 +02:00
Irmen de Jong
41c2b9c039
fix bit shift code for shifts by 16/32 bits or more
2026-08-09 14:26:45 +02:00
Irmen de Jong
e5d9609db1
IR: added new multi-bit shifting opcodes
2026-08-05 01:42:49 +02:00
Irmen de Jong
b5fd07bb91
IR: added STOREIM instruction for immediate store constant to memory
2026-08-04 23:11:07 +02:00
Irmen de Jong
bef1678c2a
IR: divmod no longer uses stack to return the quotient and remainer
2026-08-04 12:46:36 +02:00
Irmen de Jong
93b953cf60
implement IR ADDIM and SUBIM in the new codegens
2026-08-03 21:53:54 +02:00
Irmen de Jong
01c82f92eb
Merge branch 'refs/heads/master' into new-codegens
...
# Conflicts:
# examples/test.p8
# intermediate/src/prog8/intermediate/IRInstructions.kt
2026-08-03 19:36:25 +02:00
Irmen de Jong
13e032e1a3
add new IR instructions ADDIM and SUBIM
2026-08-03 19:31:57 +02:00
Irmen de Jong
247559858f
fix bitwise instructions on m68k
2026-07-11 23:40:46 +02:00
Irmen de Jong
7f51bbd777
working on encoding support for variable sized pointers in the IR
2026-07-07 00:06:28 +02:00
Irmen de Jong
5c36e21948
working on fixing pointer arithmethic
...
but see transformWithPointerArithmetic() still unfinished
2026-07-06 02:20:32 +02:00
Irmen de Jong
57055b3b55
map m68k cpu registers to and from slots
2026-07-05 16:25:20 +02:00
Irmen de Jong
11e3b39486
m68k (incomplete) attempt to fix 32 bits pointers
2026-07-05 06:31:24 +02:00
Irmen de Jong
19238cc366
IR: introduce strict and broad status flags contract for cpu targets
...
fix cmpi for words and longs
2026-07-01 01:38:35 +02:00
Irmen de Jong
c0c44156f1
new codegen: implement roxl/roxr longs, float casting, callfar
2026-06-30 22:18:41 +02:00
Irmen de Jong
8645833319
new codegen: float support and CALLI
2026-06-30 20:40:34 +02:00
Irmen de Jong
6a867d98eb
new codegen: syscall support started
2026-06-30 05:57:19 +02:00
Irmen de Jong
55ea599fca
Remove hardcoded external KERNAL entry points in codegen
2026-06-29 04:43:24 +02:00
Irmen de Jong
71583a5b93
Move symbol prefixing logic from 6502 codegen to IR generation.
2026-06-28 21:33:10 +02:00
Irmen de Jong
fc4782a35b
Support &blockname in IR generation
2026-06-27 12:54:36 +02:00
Irmen de Jong
78d43c3cb6
Merge branch 'refs/heads/bugfix12.2.1'
...
# Conflicts:
# examples/test.p8
2026-06-20 19:50:42 +02:00
Irmen de Jong
86f9b6aa69
fixed cmp() sign/flags errors
2026-06-20 19:49:45 +02:00
Irmen de Jong
69261c51b3
IR: Add single-bit manipulation opcodes (BITTST, BITSET, BITCLR, BITTOG)
2026-06-16 21:52:31 +02:00
Irmen de Jong
63d7ef7105
IR: Replace 6502-specific hardware register LOAD/STORE opcodes with generic, parameterized LOADHR/STOREHR opcodes
2026-06-16 20:59:51 +02:00
Irmen de Jong
628bd41740
update kotest
2026-06-08 20:43:54 +02:00