Commit Graph
690 Commits
Author SHA1 Message Date
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
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 cb57bea862 fix inline asmsub handling, more optimized strings and sys routines 2026-07-09 03:25:30 +02:00
Irmen de Jong bd4184252f add sys.MAX_LONG and sys.MIN_LONG for m68k 2026-07-07 05:02:47 +02:00
Irmen de Jong e6a267bd3f fix 32 bits address-of 2026-07-07 04:27:47 +02:00
Irmen de Jong 1f4ffdffc1 fix IR constant prefixing/no prefixing 2026-07-07 01:45:55 +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 1c50e397de m68k registers 2026-07-05 03:41:59 +02:00
Irmen de Jong 99ead2c74c m68k 2026-07-04 23:18:03 +02:00
Irmen de Jong 36238267d0 reuse AssemblyProgram6502 in newcodegen for 6502 2026-07-02 01:36:25 +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