Commit Graph

292 Commits

Author SHA1 Message Date
drmortalwombat 078007c9fe Fix infinite loop during size reduction 2022-06-10 16:36:52 +02:00
drmortalwombat a81f810a63 Size optimizations 2022-06-10 15:56:08 +02:00
drmortalwombat e73c40ba55 Fixed build issue with hscrollshmup on linux 2022-06-06 08:38:08 +02:00
drmortalwombat 36a5eaae00 Propagate independent instructions across diamond shaped basic blocks 2022-06-04 20:56:28 +02:00
drmortalwombat f9eb91e980 Optimize X and Y usage 2022-06-03 19:04:05 +02:00
drmortalwombat 0ba2ddf195 Propagate x and y across block boundaries 2022-06-02 22:19:10 +02:00
drmortalwombat 1b8e1f4048 Optimize cmp#0 always has carry set 2022-05-30 22:28:36 +02:00
drmortalwombat a86f5b877a Upstream variant constant propagation 2022-05-29 21:02:57 +02:00
drmortalwombat d833ca6834 Use array of struct assignments for index range validation 2022-05-26 13:55:00 +02:00
drmortalwombat 3dc35c5fff Fix invalid bypassing of JSR with X register 2022-05-22 16:41:40 +02:00
drmortalwombat 3351ee81cc Extend static stack allocation to zero page spilling 2022-05-22 13:22:36 +02:00
drmortalwombat b356f726a4 More local xy register usage 2022-05-21 17:17:16 +02:00
drmortalwombat e0f87c676c Eliminate non existing data dependencies 2022-05-21 13:39:12 +02:00
drmortalwombat b42c992a58 Fix buffer overflow in sprintf 2022-05-19 08:30:00 +02:00
drmortalwombat 9d18aef634 Optimize interval comparison cascades 2022-05-15 22:18:42 +02:00
drmortalwombat 46fe117f1f add alias _Bool for bool 2022-05-15 10:53:58 +02:00
drmortalwombat 728e707024 Optimize single page 2D array access 2022-05-14 17:57:32 +02:00
drmortalwombat e70162b2cc Forward native code instruction if only used on single outgoing path 2022-05-12 17:55:24 +02:00
drmortalwombat 75e5471dd1 Add support for d64 image creation 2022-05-08 15:37:30 +02:00
drmortalwombat c7de44b015 Optimize signed int with unsigned char comparison 2022-05-08 10:36:02 +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 f619c5e0ab More verbose debug output 2022-04-25 07:57:31 +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 253be26335 Constant pointer arithmetic for pointer initializers 2022-04-18 22:23:13 +02:00
drmortalwombat ecb9bbee8a Bump version number 2022-04-17 21:12:54 +02:00
drmortalwombat 41a4db4402 Prepare compressed embedded data 2022-04-17 18:41:53 +02:00
drmortalwombat 72d2fc1fac Reverse integer range limit calculation 2022-04-15 11:06:49 +02:00
drmortalwombat 417574b4bb Fix volatile copy 2022-04-12 22:08:40 +02:00
drmortalwombat 07afbc4714 Bump version number 2022-04-12 20:25:41 +02:00
drmortalwombat 1ee7845bb4 Fix disassembler choking on long names 2022-04-12 18:22:38 +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 546dbfc45a Some add/sub optimizations for global variables 2022-04-07 22:45:40 +02:00
drmortalwombat 72264109e9 Add experimental zero page allocation for global variables 2022-04-06 19:16:44 +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 6b3c5249cf Add \y00 for non adapted characters in s" or p" string literals 2022-04-04 16:35:37 +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 358def836d Fix optimization for absolute addressing and two indices 2022-04-01 20:35:55 +02:00
drmortalwombat 48f97b6e60 Optimize compare to boolean variable 2022-03-31 18:16:31 +02:00
drmortalwombat 5a1ff68926 Fix binary and/or with boolean values, now raising a warning 2022-03-30 14:58:41 +02:00
drmortalwombat a60f5a783f Optimize X and Y register livespan 2022-03-28 19:03:43 +02:00
drmortalwombat 7bd3622bbd Instructions bypassing small if branches 2022-03-27 22:41:29 +02:00
drmortalwombat d2503aaf1f Constant folding address of global and static variables 2022-03-27 17:18:44 +02:00
drmortalwombat f50613704c Fix moving of abs store across function call 2022-03-26 21:39:30 +01:00
drmortalwombat 68e048b945 Fix volatile loads with unused result 2022-03-26 12:30:48 +01:00
drmortalwombat fc5c9f137a Add indexed const array initializer 2022-03-26 10:29:48 +01:00
drmortalwombat 5f0e0225e1 Loop MSB optimizations 2022-03-22 22:21:59 +01:00
drmortalwombat 8c77a5d256 Add "16bit * 8bit / 8bit" to fixed point math library 2022-03-20 22:53:51 +01:00
drmortalwombat 4538f0295d Fix byte to long conversion 2022-03-20 21:33:58 +01:00
drmortalwombat 91cb2fda15 Documenting compiler optimizations 2022-03-19 14:35:49 +01:00
drmortalwombat d37ecc44da More documentation 2022-03-18 22:29:12 +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 a65c802485 Address promotion into struct copy inter instructions 2022-03-14 08:35:59 +01:00
drmortalwombat ea09c2aa7b Static stack allocations for complex locals in non recursive calls 2022-03-13 15:46:03 +01:00
drmortalwombat 736298238e Pointer and float loop optimizations 2022-03-12 12:52:43 +01:00
drmortalwombat 3cb4bd0fba Fix == instead of = for assignment 2022-03-11 13:07:38 +01:00
drmortalwombat 6f52a7beed Loop optimizing index register usage 2022-03-10 22:18:09 +01:00
drmortalwombat 6fe9a4f167 Fastcall optimization for 2nd and 3rd level calls 2022-03-10 16:35:35 +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 2719b1156b Fix over eager livetime reduction of X and Y registers 2022-02-26 12:35:59 +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 2fd8d8673a Oprtimize right shift multiply combination 2022-02-23 15:00:08 +01:00
drmortalwombat ed609f124b Improve loop invariant hoisting 2022-02-20 20:51:05 +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 6ac606c91b Fix compile order based on dependency graph 2022-02-19 12:58:51 +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 fdb112a037 Add constant address calculation for struct members 2022-02-14 20:13:30 +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 d4352ef043 Add __hwinterrupt function decoration 2022-02-06 10:28:09 +01:00
drmortalwombat 5147ec6bc9 Fix function pointers in struct consts 2022-02-05 16:52:54 +01:00
drmortalwombat 4831950e61 Optimizing right shifts greater 5 bits by left shifts 2022-02-05 11:37:03 +01:00
drmortalwombat 05d6b3d223 Fix table based multiplication for 16bit results 2022-02-03 22:10:17 +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 995e39a57d Add missile command sample game 2022-01-31 21:17:14 +01:00
drmortalwombat 94efcaeca6 Circle drawing in multicolor bitmap 2022-01-31 08:08:18 +01:00
drmortalwombat 18be0dfc0b Optimize dynamic code generation 2022-01-29 21:55:52 +01:00
drmortalwombat 08d6358932 Fix local variable array member forwarding 2022-01-29 16:06:47 +01:00
drmortalwombat 60165a7fc3 Add "*" symbol for current address in inline assembler 2022-01-29 13:33:57 +01:00
drmortalwombat 5ca651bc36 Add games to samples 2022-01-28 22:49:15 +01:00
drmortalwombat 2d41edfc97 Fix byte limit in #embed 2022-01-28 14:13:49 +01:00
drmortalwombat 79a841a422 Mark vic registers as volatile 2022-01-27 16:38:47 +01:00
drmortalwombat 5c8b1c6daf Add __export, __native and __interrupt storage class specifiers 2022-01-26 21:48:19 +01:00
drmortalwombat 792751e3a4 Fix error swapping global variables with negation 2022-01-25 21:45:33 +01:00