Commit Graph

211 Commits

Author SHA1 Message Date
drmortalwombat e70162b2cc Forward native code instruction if only used on single outgoing path 2022-05-12 17:55:24 +02:00
drmortalwombat 29bd0c8d2d Optimizations for global variables 2022-05-07 14:03:56 +02:00
drmortalwombat ea1fa189b2 Add lz compression for embedded assets 2022-05-01 12:55:13 +02:00
drmortalwombat 62d08e139b Optimize pointer arithmetic in loops 2022-04-28 15:52:27 +02:00
drmortalwombat 3a689cc7a1 Validate register livetime during peephole optimization 2022-04-23 22:11:25 +02:00
drmortalwombat 4cdc501a34 Bit shift optimizations 2022-04-21 08:26:04 +02:00
drmortalwombat 41a4db4402 Prepare compressed embedded data 2022-04-17 18:41:53 +02:00
drmortalwombat 07afbc4714 Bump version number 2022-04-12 20:25:41 +02:00
drmortalwombat 7ed7134b53 Remove superfluous temporary move 2022-04-10 21:54:12 +02:00
drmortalwombat 6a40fdc75d Opetimize sequence of ADC/SBC in native code 2022-04-10 15:29:07 +02:00
drmortalwombat 27dee0223c Cross block value forwarding 2022-04-05 16:56:02 +02:00
drmortalwombat c9e1775469 Optimize data forwarding on loop exit 2022-04-04 20:25:05 +02:00
drmortalwombat 2435797bd1 Optimize x and y index order 2022-04-03 20:39:56 +02:00
drmortalwombat aafb4adfa2 Optimize linker placement, avoiding array crossing page boundaries 2022-04-03 11:40:23 +02:00
drmortalwombat 48f97b6e60 Optimize compare to boolean variable 2022-03-31 18:16:31 +02:00
drmortalwombat a60f5a783f Optimize X and Y register livespan 2022-03-28 19:03:43 +02:00
drmortalwombat d2503aaf1f Constant folding address of global and static variables 2022-03-27 17:18:44 +02:00
drmortalwombat 5f0e0225e1 Loop MSB optimizations 2022-03-22 22:21:59 +01:00
drmortalwombat 91cb2fda15 Documenting compiler optimizations 2022-03-19 14:35:49 +01:00
drmortalwombat dc0951ee9f Order inter instructions into eval trains and sequences, optimize copyloops for size 2022-03-15 18:45:34 +01:00
drmortalwombat 736298238e Pointer and float loop optimizations 2022-03-12 12:52:43 +01:00
drmortalwombat b43edb2b4c Avoid inlining of native functions into byte code 2022-03-09 20:27:11 +01:00
drmortalwombat c5fc186336 Add horizontal scroll shmup sample game 2022-03-06 21:49:10 +01:00
drmortalwombat d1104e1eb3 Optimize y index progression 2022-03-05 11:25:56 +01:00
drmortalwombat 7e458d1eda More promotion of abs and abs indexed when only single use 2022-03-03 19:23:47 +01:00
drmortalwombat 9ec2b4fdef Replace JMP with branch when possible 2022-03-02 21:18:06 +01:00
drmortalwombat 2a815a9709 More forward 8 bit index optimizations 2022-03-01 08:53:54 +01:00
drmortalwombat fbdb513697 Optimize single use of global variables in function 2022-02-27 17:19:51 +01:00
drmortalwombat 756245694f Optimize indexed static variable access 2022-02-26 18:10:23 +01:00
drmortalwombat f4f9ae1a6a Some xy optimizations 2022-02-25 18:43:11 +01:00
drmortalwombat a2293a0ed1 Native code size reduction 2022-02-23 18:48:31 +01:00
drmortalwombat 8b63d5bb34 Shortcut zero page register moves 2022-02-20 14:12:01 +01:00
drmortalwombat 46e1caaa4a Some pointer index optimizations 2022-02-19 17:14:52 +01:00
drmortalwombat 6bd3ecb689 Fix over eager const expression inliner 2022-02-19 12:16:33 +01:00
drmortalwombat 3aa142957c Fix pointer comparison and interrupt warning 2022-02-16 16:31:03 +01:00
drmortalwombat 1221649a3d Add check for __interrupt attribute on function pointers call from interrupt code 2022-02-15 09:49:46 +01:00
drmortalwombat a52fb469b6 Eliminate some redundant instructions during peephole optimization 2022-02-09 22:20:44 +01:00
drmortalwombat 3a7ea0837b Fix logic or inversion 2022-02-06 17:29:07 +01:00
drmortalwombat 34220b96e3 Add auto generation of multiplier tables if variable factor is known to be small 2022-02-02 22:05:55 +01:00
drmortalwombat 60165a7fc3 Add "*" symbol for current address in inline assembler 2022-01-29 13:33:57 +01:00
drmortalwombat 5c8b1c6daf Add __export, __native and __interrupt storage class specifiers 2022-01-26 21:48:19 +01:00
drmortalwombat 5a8dbfea60 Fix placement of sections in cartridges at other locations than start 2022-01-23 12:03:54 +01:00
drmortalwombat d9946e12b9 Optimize byte size right shift 2022-01-12 15:54:50 +01:00
drmortalwombat ed37f360eb New multicolor bitmap library 2022-01-11 18:27:13 +01:00
drmortalwombat 55affa4de9 Add auto inline of functions that trivially compute to a constat with constant arguments 2022-01-10 20:05:51 +01:00
drmortalwombat 640007546f Add __assume builtin function 2022-01-08 15:51:17 +01:00
drmortalwombat 2b7c7300d7 Integer value range optimizations 2022-01-04 22:26:44 +01:00
drmortalwombat 639a33f9eb Simple loop invariant optimization for native code 2022-01-04 14:07:56 +01:00
drmortalwombat 78615c0725 Optimize cross block single evaluation 2022-01-04 11:44:01 +01:00
drmortalwombat 60ca42e759 Inner loop invariant optimization for non single block intermediate loops 2022-01-03 14:36:31 +01:00
drmortalwombat 1fcc39acd5 Add sprite multiplexer 2021-12-29 20:07:13 +01:00
drmortalwombat 80fea25916 More samples 2021-12-28 13:13:05 +01:00
drmortalwombat 57c72b1788 Reduce y register pressure if x available 2021-12-27 10:49:18 +01:00
drmortalwombat 71c574478c More integer value range optimizations 2021-12-23 14:31:58 +01:00
drmortalwombat 6b7dc15d30 Optimize short float arrays 2021-12-22 15:36:12 +01:00
drmortalwombat 05a6c71698 Value range annotation for intermediate code 2021-12-22 07:46:06 +01:00
drmortalwombat 4a9c662cc9 Optimize float native code size 2021-12-19 16:53:12 +01:00
drmortalwombat 6d716b9478 Optimize 32bit shifts 2021-12-18 22:21:39 +01:00
drmortalwombat 4cf62a67ff Optimize jmp to rts 2021-12-12 20:34:33 +01:00
drmortalwombat fefa2e7d9a Optimize jump to rts and simple loop invariants in native code generator 2021-12-11 23:04:38 +01:00
drmortalwombat 0b9163afbe Optimize native code branch placement 2021-12-01 20:26:28 +01:00
drmortalwombat 2003f2f4fd Fixed N flag thrashing due to cross block value forwarding 2021-11-27 23:33:03 +01:00
drmortalwombat 4017cc386b Add charwin library and matching code generator optimizations 2021-11-18 14:57:43 +01:00
drmortalwombat 2ed784ea17 Optimize signed range comparison 2021-11-13 15:05:53 +01:00
drmortalwombat 5cce611659 Fix native code inner loop detection 2021-11-08 08:45:43 +01:00
drmortalwombat 931c4d875a Reduce register copy for native code fast calls 2021-11-07 17:16:01 +01:00
drmortalwombat d99940a98e Update to version 1.1.45 2021-11-06 20:12:28 +01:00
drmortalwombat f50eb7cd19 Optimizing byte code generator 2021-11-06 17:57:24 +01:00
drmortalwombat a8ed15d67b Optimize inline pointer parameters 2021-11-05 08:46:59 +01:00
drmortalwombat f862f4e084 Constant folding of pointer plus integer 2021-11-03 07:52:12 +01:00
drmortalwombat 214ebd93f2 Bump version to 1.1.44 2021-10-31 20:39:28 +01:00
drmortalwombat 135d357dbc Strcpy as intrinsic 2021-10-31 19:14:07 +01:00
drmortalwombat b9cbf525e9 Optimize native code XY index register usage 2021-10-30 22:29:32 +02:00
drmortalwombat 640477f88d Add peephole size optimizations 2021-10-30 10:42:41 +02:00
drmortalwombat 42e4f483c1 Reduce register spilling on function entry/exit 2021-10-23 22:22:49 +02:00
drmortalwombat e057e24918 Added stddef.h 2021-10-23 16:51:27 +02:00
drmortalwombat 55b79ecfce Fix struct scoping 2021-10-23 11:56:30 +02:00
drmortalwombat 33433403b1 Fix optimizer errors 2021-10-23 00:33:09 +02:00
drmortalwombat 3520d2a2bd Fix bugs found by llvm lint 2021-10-17 10:40:33 +02:00
drmortalwombat 1a30d044c8 Some peephole optimizations for native code 2021-10-14 21:22:03 +02:00
drmortalwombat 3c891fb61e Fix 16 bit pointer offsets in native code 2021-10-13 22:19:27 +02:00
drmortalwombat 11af372509 More autoinline optimizations 2021-10-10 17:14:12 +02:00
drmortalwombat fb4ae26afb Prepare access to local variables in inline assembler 2021-10-07 10:42:18 +02:00
drmortalwombat 330e022a43 Exclude bss segment from prg file 2021-10-05 18:24:03 +02:00
drmortalwombat a0df4e7867 Optimize stack frame for simple functions 2021-10-02 20:56:01 +02:00
drmortalwombat 30becb541e Add long integer support in native and byte code 2021-10-02 17:22:18 +02:00
drmortalwombat 3d9302c90c Support for long integer with byte code 2021-10-02 10:06:13 +02:00
drmortalwombat 0c9992f549 Native code optimizations 2021-10-01 15:54:07 +02:00
drmortalwombat 02305e8bc5 Optimize global arrays and const comparisons 2021-09-30 20:00:47 +02:00
drmortalwombat 9dfbe405a5 Avoid frame pointer in native code if simple stack frame 2021-09-29 19:48:57 +02:00
drmortalwombat c4a5dafb69 More simple loop optimisations 2021-09-28 16:24:44 +02:00
drmortalwombat 9eb5412848 Merge changes for Mac build 2021-09-27 13:38:45 +02:00
drmortalwombat bffef3e9dd Basic block tail merging 2021-09-26 13:14:56 +02:00
drmortalwombat 8e9b0fe54c Add simple native loop optimisation 2021-09-25 21:57:33 +02:00
drmortalwombat 5c3ff47690 Indirect address, y optimisation for short loops 2021-09-23 17:14:02 +02:00
drmortalwombat 4ca77ba41a Byte operand sizes fixes and optimizations 2021-09-22 22:49:52 +02:00
drmortalwombat eebc39e53a Fix return type coercion, region based linker 2021-09-21 20:44:19 +02:00
drmortalwombat 27d7baaac2 Using linker objects and sections 2021-09-20 22:36:16 +02:00
drmortalwombat 78886f11f7 Native code peephole optimisation for commutative instructions 2021-09-20 13:02:38 +02:00
drmortalwombat 1d761886b5 Refactor intermediate instructions from value to pointer type 2021-09-15 12:01:14 +02:00
drmortalwombat e2e20581a6 Prepare byte level optimisations 2021-09-14 16:34:48 +02:00
drmortalwombat 97bd5aa988 Merge address calc into load 2021-09-13 17:43:31 +02:00
drmortalwombat 8de4bef436 Improved value forwarding across conditiona branches 2021-09-12 22:32:31 +02:00
drmortalwombat 82d499fdae Native code compiler is functional same level as byte code
Runs all the autotests now in byte code and native code
2021-09-11 22:21:57 +02:00
drmortalwombat 93b6aca8a3 More native code generator 2021-09-11 15:01:32 +02:00
drmortalwombat fd1626bf16 Byte level dataflow analysis of native code 2021-09-09 23:13:03 +02:00
drmortalwombat f08d847a64 More native code optimisations 2021-09-09 20:23:59 +02:00
drmortalwombat 3442ee507a Fix floating point native code generation 2021-09-09 09:42:02 +02:00
drmortalwombat fcedf69aff More native code compiler additions 2021-09-08 22:04:01 +02:00
drmortalwombat 056df56eef First shot native code generator
Implements basic load, store compare and add/sub/shift for native compiled functions
2021-09-07 22:35:11 +02:00
drmortalwombat 722347609d Fix array of array of char init with strings 2021-09-07 13:37:56 +02:00