Irmen de Jong
b820d32507
m68k: fix spill-slot alignment after vreg reuse and complete clobber audit
...
appendSpillSlotsToFrame() now builds a per-subroutine type map because
renumberVregsPerSubroutine() reuses vreg numbers across subroutines with
different types. Using the global virtualRegisterTypes map caused spilled
pointer vregs to be sized as byte/word, producing unaligned stack slots
like -9(a5) and crashing 68000 / corrupting saved registers on 68020.
2026-10-22 19:43:24 +02:00
Irmen de Jong
468850bc47
structured IR
2026-09-11 20:20:40 +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
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
8a7922ffcc
fix split words arrays on m68k to be not split
2026-07-10 01:47:18 +02:00
Irmen de Jong
52fe2f2c0d
adjust compilation options etc for the newCodegen flag
2026-07-02 01:21:18 +02:00
Irmen de Jong
4bf0eba2f8
Merge branch 'master' into new-codegens
...
# Conflicts:
# .idea/compiler.xml
# codeCore/src/prog8/code/core/CompilationOptions.kt
# codeGenIntermediate/test/TestVmCodeGen.kt
# codeGenNew6502/src/prog8/codegen/new6502/New6502CodeGenerator.kt
# compiler/src/prog8/CompilerMain.kt
# compiler/src/prog8/compiler/Compiler.kt
# compiler/src/prog8/compiler/CompilerDaemon.kt
# compiler/test/TestCompilerOnExamples.kt
# compiler/test/helpers/compileXyz.kt
# scripts/clean.sh
# settings.gradle
2026-07-02 01:14:55 +02:00
Irmen de Jong
5130a74754
removed expericodegen
2026-07-02 01:07:21 +02:00
Irmen de Jong
15756a8977
rename -expericodegen into -newcodegen that should switch all existing 6502 codegens to using the new one based on IR
2026-07-02 00:51:45 +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
930697dad5
using builder to improve massive lists of constructor params
2026-04-19 01:39:50 +02:00
Irmen de Jong
c794d2a50b
fix invalid IR opcode used for inplace assignments to memory targets
2026-04-14 15:32:12 +02:00
Irmen de Jong
9ae0623ad0
making MemoryAddress an Unsigned Int
2026-04-09 02:40:24 +02:00
Irmen de Jong
33b34b990e
making RegisterNum type safe
2026-04-08 02:57:45 +02:00
Irmen de Jong
6dc96bb8f0
making IRInstruction parameters type safe
2026-04-07 20:15:55 +02:00
Irmen de Jong
15bf4c7692
unit test helpers refactoring
2026-03-31 05:50:30 +02:00
Irmen de Jong
9736ac19d1
implementing multiple return values for builtin functions
2026-02-22 19:54:21 +01:00
Irmen de Jong
2c2de8bfb3
fix IR peephole optimizer index off by 1 error and make SSA blocks configurable (still defaults to yes in this version)
2025-12-30 18:58:42 +01:00
Irmen de Jong
9d3b2f12fd
IR code blocks now better SSA basic blocks (ending with single branch instruction)
2025-10-01 19:08:44 +02:00
Irmen de Jong
a611406020
IR: add compilerversion attribute to p8ir file
2025-09-30 22:07:04 +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
cd63a58ad9
IR: get rid of problematic PREPARECALL pseudo instruction
2025-04-24 22:32:40 +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
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
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
8f6b5676d7
working on codegen for multi-value returns
2025-01-07 20:35:49 +01:00
Irmen de Jong
512ddd1694
cleanups
2024-12-20 22:59:20 +01:00
Irmen de Jong
7c79cdbd2f
fix symbol prefixing on goto with expression
...
added coroutines example
2024-12-17 16:16:38 +01:00
Irmen de Jong
cc59069876
allow goto to take any expression, not only an integer or an identifier (part 1)
2024-12-14 01:01:32 +01:00
Irmen de Jong
1a1ab0dac6
changed the data type system to composite types
2024-12-05 21:48:51 +01:00
Irmen de Jong
9864abd393
romsub keyword is now extsub
2024-11-06 22:14:53 +01:00
Irmen de Jong
c702c4a6df
internal rename of romsub to extsub
2024-11-06 21:42:16 +01:00
Irmen de Jong
77e376f6bf
romsub @bank now also accepts a variable so the bank can be dynamic
2024-11-06 00:02:36 +01:00
Irmen de Jong
85e87dfe2e
consolidate @rombank and @rambank into just @bank
2024-11-03 21:15:11 +01:00
Irmen de Jong
155896c4c7
added @rombank and @rambank bank number tags on romsubs
...
on cx16 and c128 targets the compiler then automatically inserts a CALLFAR instead of a regular JSR to automatically do the bank switching.
2024-11-03 18:19:31 +01:00
Irmen de Jong
3b798097b9
added memtop to machine definition and asm source code check
...
added %memtop directive
2024-11-02 00:59:07 +01:00
Irmen de Jong
c9535049c8
%align directive and @align64
2024-10-26 20:58:35 +02:00
Irmen de Jong
1cd754f05d
adding @alignword/page on individual variables
2024-10-26 17:00:38 +02:00
Irmen de Jong
641f6c05d8
allow 'void' as dummy assign target in multi-assignment statements
2024-03-31 23:43:26 +02:00
Irmen de Jong
f40b7b62bb
updated unit tests and some basic changes for them
2024-03-02 23:19:20 +01:00
Irmen de Jong
2eb137618e
refactor block options
2023-12-26 22:13:08 +01:00
Irmen de Jong
01c2112881
remove PtJump label, just use identifier with dummy
2023-12-13 04:16:49 +01:00
Irmen de Jong
f68b46fc60
add a %zpallowed option to specify the range of zeropage register that can be used
2023-11-03 00:19:25 +01:00
Irmen de Jong
a48ce35f0b
added %option verafxmuls
2023-10-05 22:06:33 +02:00
Irmen de Jong
c319233ddc
ir: added preparecall 'meta' instruction for functioncalls
2023-09-18 23:22:03 +02:00
Irmen de Jong
bb95484c8a
uniform symbol prefixing with p8_
2023-07-02 06:15:09 +02:00
Irmen de Jong
905921a684
IR: new (sys)call instructions that encapsulate the full subroutine call
...
to fix the bugs resulting from nesting subroutine calls (as param to another call etc)
2023-05-14 15:20:25 +02:00
Irmen de Jong
ccdf05e922
tweaking IR instruction formats
2023-04-09 16:12:16 +02:00