Irmen de Jong
561f31329d
support pointer assignment targets like (expr as ^^Struct).field = v and func().field = v (grammar + CodeDesugarer poke desugar, IR pointer-cast widening, tests/docs)
2026-08-24 23:00:23 +02:00
Irmen de Jong
ae55109a18
m68k: peepholes
2026-08-23 03:24:20 +02:00
Irmen de Jong
2ce7a63c1e
IR: resolve loadx index-width type conflicts in usedRegisters; add conversion-collapse peephole
2026-08-23 02:41:12 +02:00
Irmen de Jong
198cf4d722
IR: fix for loop iteration overflow for 256 iters
2026-08-20 23:20:42 +02:00
Irmen de Jong
df659d285b
optimize imports
2026-08-18 01:28:35 +02:00
Irmen de Jong
34f0bea4e8
fix pointer unit tests, consolidate pointer type selection for target
2026-08-17 03:30:17 +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
65b6280618
fix string compares on 32 bits targets
2026-08-16 15:55:30 +02:00
Irmen de Jong
69def73f3f
m68k: allow assigning string constant to long/pointer variable (to get its address)
2026-08-16 06:18:33 +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
fcc93b385d
IR: implement array in place / and %
2026-08-13 23:13:53 +02:00
Irmen de Jong
4c6d9b8f5f
even more IR peephole optimizations
2026-08-13 23:01:41 +02:00
Irmen de Jong
6a3ee52bd5
more IR peephole optimizations
2026-08-13 22:50:50 +02:00
Irmen de Jong
a7f60a571d
m68k: fix byte/word index value type mismatch
2026-08-11 20:58:13 +02:00
Irmen de Jong
208205faea
step 4 to allow for loop 'step' to be variable not only const: various correctness
2026-08-11 06:17:34 +02:00
Irmen de Jong
a5a535806b
step 2 to allow for loop 'step' to be variable not only const: step type casting done earlier
2026-08-11 04:20:00 +02:00
Irmen de Jong
d582c1edf6
step 1 to allow for loop 'step' to be variable not only const
2026-08-11 04:07:56 +02:00
Irmen de Jong
e70a1ed403
fix STOREZX.BYTE register type determination on m68k targets
...
STOREZX uses reg1 as the index register (not the value register),
so it should return indexRegType (WORD on 32-bit targets) regardless
of the instruction type. The code handled this for FLOAT/WORD/LONG
but missed the BYTE type case, causing register type conflicts
when indexing arrays with uword variables on m68k targets.
2026-08-09 23:18:46 +02:00
Irmen de Jong
c53e72c5b2
Merge branch 'master' into new-codegens
...
# Conflicts:
# compiler/test/TestCompilerOnExamples.kt
2026-08-09 23:05:04 +02:00
Irmen de Jong
5ba494c5e5
fix IR codegen needing explicit CMP instructions because of changed status bits contract (see commit #19238cc36)
2026-08-09 22:36:39 +02:00
Irmen de Jong
b353904d30
fix for loop index register type issue in IR on m68k targets
2026-08-09 21:57:22 +02:00
Irmen de Jong
a3161fa117
implemented endian-aware msb/lsb handling
2026-08-08 19:34:12 +02:00
Irmen de Jong
9c8e81b566
IR: fix m68k indexing datatype size
2026-08-08 18:14:30 +02:00
Irmen de Jong
b3b983c7ec
fix untyped pointer indexing on 32 bits targets (long vs uword)
2026-08-08 16:01:28 +02:00
Irmen de Jong
14ae579f00
amiga: add iffparse library module
2026-08-08 14:57:07 +02:00
Irmen de Jong
45f48d2e88
amiga: added %option amiga_chipram in blocks to allocate them in CHIP ram (for sound and graphics data)
2026-08-08 02:01:04 +02:00
Irmen de Jong
8d6ed7712d
fix ir block cleanup bug
2026-08-08 01:24:09 +02:00
Irmen de Jong
c2d151920d
new docs about register allocation
2026-08-07 17:43:46 +02:00
Irmen de Jong
e007d127f0
IR: smarter handling of x<<16 and x>>16 if x is a long
2026-08-05 02:01:21 +02:00
Irmen de Jong
e5d9609db1
IR: added new multi-bit shifting opcodes
2026-08-05 01:42:49 +02:00
Irmen de Jong
051f3809cd
IR: improved add/sub of small const values
2026-08-05 00:10:09 +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
4097d51514
IR: more efficient code for comparisons against constants
2026-08-04 22:28:59 +02:00
Irmen de Jong
b8cded4373
revert back to fast (but slightly inaccurate) signed bitshifting for division optimization
2026-08-04 19:41:14 +02:00
Irmen de Jong
42e8e91034
disable signed div bias-shift method because of code bloat
2026-08-04 18:38:35 +02:00
Irmen de Jong
af80ec6502
fix invalid optimization of signed division into a shift (wrong rounding result) - IR codegen
2026-08-04 17:42:12 +02:00
Irmen de Jong
16901212d4
m68k: fix divmod() and lmh() call convention
2026-08-04 13:40:30 +02:00
Irmen de Jong
49f5c30e8c
6502: better error message for missing signed divmod support
2026-08-04 13:09:06 +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
07910fc543
IR: fix register type error for power of 2 multiplies as shifts
2026-08-04 00:06:09 +02:00
Irmen de Jong
c64fdcffa8
IR: fix register type error for power of 2 multiplies as shifts
2026-08-04 00:05:13 +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
bf0733f8b3
amiga LVOs (extsub library callfars) are now represented by their familiar negative decimal offset number instead of a hex unsigned long.
...
Actual JSR to the library LVO uses the symbolic name if possible to create code that is easier to debug
2026-07-16 21:42:04 +02:00
Irmen de Jong
b0cf649c2d
register packer does't work well
2026-07-16 20:33:27 +02:00
Irmen de Jong
c43cacdc2f
added a IR RegisterPacking optimization step that reduces the number of registers through reuse of register slots
2026-07-15 22:39:19 +02:00
Irmen de Jong
4506a3cb3e
pass compilation target to more places to be able to determine correct types
2026-07-12 03:52:57 +02:00
Irmen de Jong
dafb0906c3
fix some m68k pointer/uword stuff
2026-07-11 21:13:21 +02:00
Irmen de Jong
cf6efd76f0
making sure memory() is long on m68k
2026-07-10 04:51:54 +02:00