Repository navigation
version 14.0-BETA3
Pre-release
Pre-release
Highlights
- M68K register allocator and stack frames (amiga500, amiga1200, qemu68k): ordinary subroutine locals and parameters now live in activation records on the CPU stack, making subroutines recursive and re-entrant. Hot values are kept in hardware registers (D2-D6, A2-A4, FP2-FP7) by an intraprocedural allocator, with spill slots appended to the A5 frame.
asmsubroutines must preserve those registers (noclobbers()list); use%option noframefor subroutines that manipulate the stack themselves. Clean locals are zero-initialized on every call. - M68K codegen optimizations: store/load folding, byte/word zero-extension fusion, branch-over-jump inversion, redundant frame zero-store removal, tail-call and store-reload peepholes, address-register preference for pointer call arguments, redundant LEA dropping, and signed division by powers of two.
- Extended loads fused into single IR opcodes (
loadmz/loadms/...) for all backends, reducing instruction count and register pressure. - New 6502 codegen (IR-based) peephole optimizer: tail-call conversion, redundant store-reload removal, and redundant
cmp #0removal. on .. goto/on .. calljump tables now allow arbitrary choice bodies andelseparts, handle gapped value ranges, and synthesize gap labels.pointerreserved as a datatype name;^^pointerparsing fixed and pointer-to-pointer struct field dereferences fixed.- Linked-list for-loop iteration: new
via/untilsyntax for iterating linked lists; the Exec-specific for-loop over linked lists was removed.
Language
lerp/lerpw/interpolate/interpolatewconverted to 6502 assembly.inoperator fixed for arrays larger than 255 elements.deferkeeps a static per-subroutine mask; recursion limitation documented.pointercan no longer be used as a symbol name;^^pointerparsing fixed.- Disallow pointer as a struct field name.
Libraries
- New
easygfxmodule (renamed fromamiga_gfx) with Amiga graphics routines, plusdiskfont.p8and theamiga/gfxdemoandamiga/tictactoeexamples. - New
emudbgmodule for amiga500/amiga1200 targets. listsmodule: doubly linked lists on all targets; on amiga500/amiga1200 a thin wrapper aroundexec.library.- M68K math:
log2,diff,lerp,interpolate,gcd,crc16/crc32,bcdroutines; optimizedlog2/gcd/lerp/interpolate/CRC;interpolatewadded. - Inline math trig routines.
- Math routines converted to assembly for 6502.
Targets and tooling
-emufor amiga targets now launches the Copperline emulator;-emu2still launches Vamos.- Amiga: get rid of local var address escape warnings.
- Amiga: improved variable source line positions.
- Compiler version embedded in generated assembly files.
- LSP: extract more document symbols.
- Label name hash numbers are now stable.
Bug fixes
- Various internal code-generation fixes for the new 6502 and m68k backends (asmsub save/restore checking, spill-slot alignment, const-load overhead, pointer dereference and subtraction operand handling). C64 sprite examples are more robust regarding sprite data memory addresses.
- Fix compiler crashes on
peek/poke/poppin wrong statement/expression context,'not'combined withor/and, short-circuit booleanand/oron the virtual target, indexed reads/writes through^^pointerstruct fields, and block aliases. - Fix
inoperator on arrays larger than 255 elements. - Fix mouse click offsets and aspect ratio.
- Fix undefined symbol errors and invalid parsing of
^^pointer. - Fix m68k frame teardown for intra-subroutine dispatch.
- Fix virtual target typed pop results.
Documentation
- AI-assisted development docs now mention the
m68k-coderskill. history.rst,comparing.rst,programming.rstandvariables.rstupdated to reflect m68k stack frames, recursion, and default text encodings per target.- RTD doc build fixed.