Irmen de Jong
1829191db8
fix docs
2026-11-19 01:26:49 +01:00
Irmen de Jong
e954d8b705
Add real struct instance variables on IR/m68k and virtual targets
...
Allow `Point p` declarations with direct field access, initialization and
whole-struct copy (`q = p` lowers to sys.memcopy) on 32-bit and virtual
targets. 6502 targets reject with a clear error and keep using pointers or
arrays of struct instances.
Direct variables are represented as StStructInstance nodes with static
storage; field access resolves via PtrDereference and address-of/field
addresses use the struct-instances symbol labels. Adds array-literal-to-
struct-initializer lowering and avoids false frame-address-escape warnings.
2026-11-19 00:32:50 +01:00
Irmen de Jong
0d0b565d28
m68k: fix multi-return value corruption; optimize lineclip
...
- m68k codegen: multi-value returns were corrupted because the caller's
capture moves and the callee's epilogue both clobbered the return
registers d2-d4. Record the hardware return slots on the call site,
force-spill the transfer temporaries on both sides, and exclude a
subroutine's own return registers from its save set.
2026-11-14 14:37:46 +01:00
Irmen de Jong
5bfeb173d7
m68k/Amiga: fix float docs and the single-precision EPSILON constant
...
Docs and messages corrected for the m68k targets, plus the shared m68k float
library EPSILON fixed for single precision.
2026-11-13 19:41:29 +01:00
Irmen de Jong
c1bedc6176
m68k: faster codegen, faster horizontal blitter lines, added math.mul32
2026-11-05 04:48:48 +01:00
Irmen de Jong
5f3239d811
default no longer include all IR debug lines into the m68k asm file
2026-11-03 15:30:30 +01:00
Irmen de Jong
bcc9ba5ee5
fix tests on windows hopefully
2026-11-02 02:50:27 +01:00
Irmen de Jong
9967394da0
fix tests
2026-11-02 02:46:35 +01:00
Irmen de Jong
eae012fd82
fix compiler crash on field write to a memory-mapped array of struct instances
2026-10-29 21:45:58 +01:00
Irmen de Jong
1845be0b2e
add missing files
2026-10-29 00:25:47 +01:00
Irmen de Jong
b6aa726dbc
adding compiler git sha and timestamp into asm
2026-10-28 22:22:29 +01:00
Irmen de Jong
1da37e4119
skill
2026-10-17 23:45:22 +02:00
Irmen de Jong
16f7d588a7
add '-emu2' for amiga targets, -emu now launches the actual 'copperline' emulator, -emu2 still launches vamos.
2026-10-17 14:01:03 +02:00
Irmen de Jong
6cac707fd1
code cleanups
2026-10-13 22:40:19 +02:00
Irmen de Jong
29254e892b
m68k: no longer print recursion warnings
2026-10-07 19:06:16 +02:00
Irmen de Jong
0807d07ee5
cleanups
2026-10-07 02:00:31 +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
9d023c9568
fix .p8ir file system case (in)sensitivity fragility
2026-10-02 23:41:42 +02:00
Irmen de Jong
38db571f20
implemented -o / --output to specify specific output file
2026-10-02 22:33:43 +02:00
Irmen de Jong
ec4b47ac0d
support custom m68k targets: select the codegen by CpuType and allow a per-target link.ld
2026-09-27 11:50:33 +02:00
Irmen de Jong
b8c975704a
6502 byte shift optimization for const multiplications
2026-09-26 03:25:25 +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
75ab3ccfbd
amiga1200: added ahi library and demo programs
2026-09-25 00:03:50 +02:00
Irmen de Jong
6de6a81d4b
amiga: added asyncio.library support
2026-09-20 05:12:10 +02:00
Irmen de Jong
ce2b298d6f
code cleanups
2026-09-08 22:36:54 +02:00
Irmen de Jong
687d86d36e
added amiga1200 target (68020 + FPU)
2026-09-06 18:25:15 +02:00
Irmen de Jong
9d537ab3c0
warn when %zpreserve/%zpallowed excludes fixed zeropage scratch locations
2026-09-01 04:21:49 +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
deae2e6422
Unify variable and memory slab relocation with vars address configuration
2026-08-29 01:17:44 +02:00
Irmen de Jong
27070f31e8
Merge branch 'master' into new-codegens
...
# Conflicts:
# codeCore/src/prog8/code/core/DataTypes.kt
# docs/source/todo.rst
2026-08-28 05:23:30 +02:00
Irmen de Jong
937b520838
core: fix POINTER equalsSize target-aware for 32-bit
2026-08-27 03:15:57 +02:00
Irmen de Jong
2bbbacc46e
normal error message instead of crash when typed pointer arrays are used as struct field (currently not supported by the compiler)
2026-08-24 19:21:30 +02:00
Irmen de Jong
5857382242
add %bssaddress and %slabsaddress directives to directly control the addresses of those segments
2026-08-23 14:16:06 +02:00
Irmen de Jong
f3de26bf6c
for-loop support for list/node iteration, and reverse str/array iteration using step -1
2026-08-21 07:28:39 +02:00
Irmen de Jong
df659d285b
optimize imports
2026-08-18 01:28:35 +02:00
Irmen de Jong
02667e9916
fix str/long type comparison
2026-08-17 20:36:39 +02:00
Irmen de Jong
9d57cbe263
m68k: fix float sgn instruction format
2026-08-17 20:06:52 +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
673ed91ee3
pointer and float size moved to memsizer, fix memory size of pass-by-ref to properly be size of pointer
2026-08-16 16:13:42 +02:00
Irmen de Jong
d702ace09f
add support for pointer sizes >2 to configurable targets
2026-08-13 22:23:47 +02:00
Irmen de Jong
f011d3f100
new language feature: %option private_symbols, and public keyword - to manage visibility
2026-08-13 22:05:58 +02:00
Irmen de Jong
7547fb7747
array and string size limit raised to 32K on m68k targets
2026-08-07 20:47:06 +02:00
Irmen de Jong
a5978a913b
m68k: added coroutines module
2026-08-06 22:08:59 +02:00
Irmen de Jong
a5782c300a
fix compiler crash on out of range pointer address values
2026-08-04 20:24:50 +02:00
Irmen de Jong
8405e6f2a3
fix endianness issue with msw/lsw on m68k
2026-08-03 15:49:39 +02:00
Irmen de Jong
3e03980478
tweaking ast optimizations for m68k
2026-08-03 12:45:48 +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
4c1f193d53
amiga custom chip registers
2026-07-14 22:20:12 +02:00