Commit Graph

206 Commits

Author SHA1 Message Date
drmortalwombat 792751e3a4 Fix error swapping global variables with negation 2022-01-25 21:45:33 +01:00
drmortalwombat 0ea87ea322 Reduce speculation of integer value range analyzer 2022-01-25 21:05:00 +01:00
drmortalwombat f25bf80a0f Fix LF line ending on windows, float and loop optimizations 2022-01-25 14:31:36 +01:00
drmortalwombat 9f41a55a18 Fix static declaration in header files 2022-01-23 21:14:30 +01:00
drmortalwombat 742866c8c2 Enable charmap inside a series of string literals 2022-01-22 13:41:24 +01:00
drmortalwombat 9dd493d20b Add sid and easyflash includes 2022-01-22 11:16:59 +01:00
drmortalwombat fad67d18aa Add auto loop unrolling and binary (verbatim) format linking 2022-01-21 21:52:16 +01:00
drmortalwombat 8b4eff3ee1 More constant folding and value propagation 2022-01-20 17:43:08 +01:00
drmortalwombat 76322c005d Fix errors introduced with strength reduction 2022-01-20 13:39:55 +01:00
drmortalwombat 1c403dfeeb Add strength reduction in trivial loops 2022-01-19 20:55:33 +01:00
drmortalwombat 9161b088ee More integer range optimizations 2022-01-16 18:30:38 +01:00
drmortalwombat 6eedb931a7 More value range optimizations 2022-01-16 09:41:59 +01:00
drmortalwombat de920f2418 Optimize global variable usage 2022-01-14 17:53:30 +01:00
drmortalwombat d9946e12b9 Optimize byte size right shift 2022-01-12 15:54:50 +01:00
drmortalwombat 1be469aa9b Optimize placement of basic blocks 2022-01-10 14:06:21 +01:00
drmortalwombat 68f8628409 Optimize size of generated byte code 2022-01-09 19:00:02 +01:00
drmortalwombat 640007546f Add __assume builtin function 2022-01-08 15:51:17 +01:00
drmortalwombat d2511b558c Reoder eight bit adds 2022-01-05 20:06:25 +01:00
drmortalwombat d4a9308627 More inter code value forwarding 2022-01-05 16:38:56 +01:00
drmortalwombat 2b7c7300d7 Integer value range optimizations 2022-01-04 22:26:44 +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 272b7b08df Optimize more short multiplies in native code 2022-01-02 12:44:37 +01:00
drmortalwombat 7e66836e07 More samples 2021-12-30 15:41:06 +01:00
drmortalwombat 1fcc39acd5 Add sprite multiplexer 2021-12-29 20:07:13 +01:00
drmortalwombat 743510b54e Add verbose option -v to compiler 2021-12-26 11:31:04 +01:00
drmortalwombat 0dd6a0655c Optimize call to 8 by16 mul 2021-12-23 20:27:45 +01:00
drmortalwombat 71c574478c More integer value range optimizations 2021-12-23 14:31:58 +01:00
drmortalwombat 183864208f More integer value range optimizations 2021-12-22 12:58:17 +01:00
drmortalwombat 05a6c71698 Value range annotation for intermediate code 2021-12-22 07:46:06 +01:00
drmortalwombat b9c477976a Strength reduction for simple native code loops with y register 2021-12-20 20:44:10 +01:00
drmortalwombat 4a9c662cc9 Optimize float native code size 2021-12-19 16:53:12 +01:00
drmortalwombat 18ab7ce079 Fix broken left shift optimization due to branch in basic block 2021-12-06 22:56:03 +01:00
drmortalwombat 0b9163afbe Optimize native code branch placement 2021-12-01 20:26:28 +01:00
drmortalwombat 4f1de9ce89 Reduce over eager code movement 2021-12-01 19:32:49 +01:00
drmortalwombat f1f3c609fd Join similar instructions on conditional paths 2021-11-30 21:32:49 +01:00
drmortalwombat d02b438a1a Optimize code size 2021-11-27 11:17:15 +01:00
drmortalwombat ccd6a50043 Optimize byte code interpreter loop 2021-11-25 21:42:06 +01:00
drmortalwombat 6007553d03 Byte code optimizations 2021-11-21 22:53:06 +01:00
drmortalwombat 2ed784ea17 Optimize signed range comparison 2021-11-13 15:05:53 +01:00
drmortalwombat cb5f5f421f Optimize single conditional path value evaluation 2021-11-09 22:24:29 +01:00
drmortalwombat 931c4d875a Reduce register copy for native code fast calls 2021-11-07 17:16:01 +01:00
drmortalwombat a8ed15d67b Optimize inline pointer parameters 2021-11-05 08:46:59 +01:00
drmortalwombat 099f3b8a26 Fixe unsigned byte signed const comparison 2021-11-02 17:18:24 +01:00
drmortalwombat f16edb1c57 Optimize signed byte comparisons 2021-11-01 22:33:02 +01:00
drmortalwombat 2cd7956736 Remove stores to global variables that are never read 2021-11-01 16:08:37 +01:00
drmortalwombat d3cba85efe Optimize global variable alias analysis 2021-11-01 12:42:03 +01:00
drmortalwombat 135d357dbc Strcpy as intrinsic 2021-10-31 19:14:07 +01:00
drmortalwombat 7e340cc816 Optimize static and global variable usage 2021-10-31 16:22:11 +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 b64079bf28 Optimize some constant shifts 2021-10-27 21:01:39 +02:00
drmortalwombat 480270f4c9 Fix array to pointer cast 2021-10-24 14:58:06 +02:00
drmortalwombat d8ecd34ac6 Add #embed preprocessor directive to import binary data 2021-10-24 12:34:44 +02:00
drmortalwombat 33433403b1 Fix optimizer errors 2021-10-23 00:33:09 +02:00
drmortalwombat 5010043fc4 Optimize struct member access 2021-10-17 11:54:15 +02:00
drmortalwombat 194c7a2af4 Fix int + pointer operation 2021-10-16 23:07:28 +02:00
drmortalwombat ed52725a01 Remove copies from struct function return 2021-10-16 18:17:54 +02:00
drmortalwombat 815f64d14c Fix infinite loop unrolling 2021-10-16 15:11:05 +02:00
drmortalwombat c2886e2532 Fix infinite for(;;) loop 2021-10-16 10:49:11 +02:00
drmortalwombat 438a926b88 Code size optimization 2021-10-15 21:52:07 +02:00
drmortalwombat e2e6f4ea01 Add command line options for optimization 2021-10-14 16:51:59 +02:00
drmortalwombat 3c891fb61e Fix 16 bit pointer offsets in native code 2021-10-13 22:19:27 +02:00
drmortalwombat 6bd3e3ae97 Remove debug code 2021-10-10 20:58:38 +02:00
drmortalwombat 11af372509 More autoinline optimizations 2021-10-10 17:14:12 +02:00
drmortalwombat 210b037dbc Remove sign extended byte loads from byte code 2021-10-08 23:04:27 +02:00
drmortalwombat 32b715382c Add fascall for byte code 2021-10-08 17:41:11 +02:00
drmortalwombat 60489bb79e Refactor inter instrction operator handling 2021-10-08 09:07:01 +02:00
drmortalwombat e7231e27e0 Prepare fastcall 2021-10-07 15:14:23 +02:00
drmortalwombat df152c2f9b Prepare more than 3 operands per inter instruction 2021-10-06 17:46:42 +02:00
drmortalwombat 15743d3115 Refactor temp handling in inter code 2021-10-06 17:30:41 +02:00
drmortalwombat 330e022a43 Exclude bss segment from prg file 2021-10-05 18:24:03 +02:00
drmortalwombat 542cb66693 Fixes to get dhrystone.c to compile and run 2021-10-03 20:35:50 +02:00
drmortalwombat 4a822facaa Optimize inline expansion 2021-10-03 11:36:26 +02:00
drmortalwombat acc87d50fe Limit inline expansion depth 2021-10-02 22:39:36 +02:00
drmortalwombat 3d9302c90c Support for long integer with byte code 2021-10-02 10:06:13 +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 4aa82d539b Optimize pointer increment dereference combos 2021-09-29 17:34:38 +02:00
drmortalwombat bc4aea064a Add missing mac include 2021-09-29 08:02:20 +02:00
drmortalwombat e713dc5940 Direct embedding of inline assembler in native code 2021-09-28 18:35:23 +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 1dd63ac708 Fix byte size inc/dec error 2021-09-25 22:50:16 +02:00
drmortalwombat f925833884 Move executable into bin folder for windows and linux 2021-09-25 18:20:32 +02:00
drmortalwombat fd10525780 Add makefile for linux 2021-09-24 16:17:20 +02:00
drmortalwombat 4ca77ba41a Byte operand sizes fixes and optimizations 2021-09-22 22:49:52 +02:00
drmortalwombat 2cd9a55880 Fix various bugs related to byte size operands 2021-09-22 15:46:20 +02:00
drmortalwombat 9ec846c506 Load/Store constant offset propagation across basic blocks 2021-09-21 22:49:04 +02:00
drmortalwombat d9c565d898 Fix local variables with linker sections 2021-09-21 08:41:49 +02:00
drmortalwombat 27d7baaac2 Using linker objects and sections 2021-09-20 22:36:16 +02:00
drmortalwombat d3d20bee26 Prepare section based linker 2021-09-19 22:22:16 +02:00
drmortalwombat 1d761886b5 Refactor intermediate instructions from value to pointer type 2021-09-15 12:01:14 +02:00
drmortalwombat 37828f2baf More byte and long preparations 2021-09-14 21:38:24 +02:00
drmortalwombat e2e20581a6 Prepare byte level optimisations 2021-09-14 16:34:48 +02:00
drmortalwombat 45360a26e7 Forward temp moves across non looping basic blocks 2021-09-13 17:19:53 +02:00
drmortalwombat 9647cdb828 Added global constant propagation 2021-09-13 09:26:58 +02:00
drmortalwombat 8de4bef436 Improved value forwarding across conditiona branches 2021-09-12 22:32:31 +02:00
drmortalwombat 3a94be4a35 Use caller saved registers for temps not overlapping calls 2021-09-12 17:28:02 +02:00
drmortalwombat bb4680845e Fix float x+x optimisation 2021-09-12 15:18:07 +02:00
drmortalwombat ebdd6f0d7d Add fixed offset to pointer base mem access 2021-09-12 14:17:21 +02:00
drmortalwombat 93b6aca8a3 More native code generator 2021-09-11 15:01:32 +02:00
drmortalwombat f08d847a64 More native code optimisations 2021-09-09 20:23:59 +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 16aa0ac315 Renamed non conforming member variables 2021-09-06 21:36:45 +02:00
drmortalwombat 7af458832b Initial commit 2021-09-06 18:34:52 +02:00