Commit Graph

400 Commits

Author SHA1 Message Date
drmortalwombat 6e37060c24 More aggressive reverse value range limit forwarding 2022-06-12 13:39:46 +02:00
drmortalwombat a81f810a63 Size optimizations 2022-06-10 15:56:08 +02:00
drmortalwombat 36a5eaae00 Propagate independent instructions across diamond shaped basic blocks 2022-06-04 20:56:28 +02:00
drmortalwombat d833ca6834 Use array of struct assignments for index range validation 2022-05-26 13:55:00 +02:00
drmortalwombat 3351ee81cc Extend static stack allocation to zero page spilling 2022-05-22 13:22:36 +02:00
drmortalwombat b42c992a58 Fix buffer overflow in sprintf 2022-05-19 08:30:00 +02:00
drmortalwombat 46fe117f1f add alias _Bool for bool 2022-05-15 10:53:58 +02:00
drmortalwombat 2feb8b9e6d Add srand to stdlib 2022-05-09 22:18:34 +02:00
drmortalwombat 75e5471dd1 Add support for d64 image creation 2022-05-08 15:37:30 +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 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 2435797bd1 Optimize x and y index order 2022-04-03 20:39:56 +02:00
drmortalwombat 8bdf48faba add tab output in printf 2022-04-03 15:51:41 +02:00
drmortalwombat 58c99a5dca Add left alignment in padding for printf 2022-04-02 13:36:15 +02:00
drmortalwombat 358def836d Fix optimization for absolute addressing and two indices 2022-04-01 20:35:55 +02:00
drmortalwombat cb4f60b2ff Optimize muldiv8b8y 2022-03-30 20:05:09 +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 fc5c9f137a Add indexed const array initializer 2022-03-26 10:29:48 +01:00
drmortalwombat 8c77a5d256 Add "16bit * 8bit / 8bit" to fixed point math library 2022-03-20 22:53:51 +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 756245694f Optimize indexed static variable access 2022-02-26 18:10:23 +01:00
drmortalwombat 8b63d5bb34 Shortcut zero page register moves 2022-02-20 14:12:01 +01:00
drmortalwombat fdb112a037 Add constant address calculation for struct members 2022-02-14 20:13:30 +01:00
drmortalwombat d4352ef043 Add __hwinterrupt function decoration 2022-02-06 10:28:09 +01:00
drmortalwombat 49b5067619 Add keyboard scan code enum 2022-02-04 17:40:04 +01:00
drmortalwombat 90a1462ece Add raw functions for putat in charwin 2022-02-01 22:23:38 +01:00
drmortalwombat 3507b09207 Optimize PETSCII conversion in charwin 2022-02-01 22:00:33 +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 2d41edfc97 Fix byte limit in #embed 2022-01-28 14:13:49 +01:00
drmortalwombat aee284c1d6 Add irq autocrawler sample 2022-01-28 08:49:21 +01:00
drmortalwombat dfe3d71f85 Make shore memcpy calls intrinsic 2022-01-27 23:08:57 +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 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 ca93f107c3 Add relocated sections 2022-01-22 18:21:52 +01:00
drmortalwombat 5bda8a4d01 Fix scale in sid.h 2022-01-22 15:07:55 +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 cc927d778f Improve C const declaration compatibility 2022-01-21 14:42:49 +01:00
drmortalwombat de920f2418 Optimize global variable usage 2022-01-14 17:53:30 +01:00
drmortalwombat c72ca3547b Fix longjump and kernalio end of file handling 2022-01-13 10:37:44 +01:00
drmortalwombat 180e2598b8 Fix multicolor flood fill if target color is back color 2022-01-12 08:55:23 +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 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 085fba137f optimize aligned address arithmetic 2022-01-06 16:26:19 +01:00
drmortalwombat a86a19fc8c Add raw mode for charwin 2022-01-04 15:38:06 +01:00
drmortalwombat 639a33f9eb Simple loop invariant optimization for native code 2022-01-04 14:07:56 +01:00
drmortalwombat 2d0f20cadc Added comments to source samples 2022-01-01 12:39:54 +01:00
drmortalwombat b9a1689dc6 Add some library documentation 2021-12-31 18:57:54 +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 80fea25916 More samples 2021-12-28 13:13:05 +01:00
drmortalwombat a1db507816 Add sample for opening border 2021-12-25 15:24:49 +01:00
drmortalwombat 24cc6e20c8 Fix compiler getting stuck on optimizing infinite loop 2021-12-25 12:30:24 +01:00
drmortalwombat 720e532d22 Added scanf and sscanf to stdio 2021-12-24 14:39:03 +01:00
drmortalwombat 0dd6a0655c Optimize call to 8 by16 mul 2021-12-23 20:27:45 +01:00
drmortalwombat 99f674c866 Add gfx libraries 2021-12-23 14:39:04 +01:00
drmortalwombat 893b6f2294 Optimize long divide for short divisor 2021-12-19 22:18:05 +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 381a70839d Fix dynamic code generator library 2021-12-13 22:23:54 +01:00
drmortalwombat f7a5c94229 Optimize frame enter/leave code in native compiler 2021-12-11 12:52:35 +01:00
drmortalwombat 18ab7ce079 Fix broken left shift optimization due to branch in basic block 2021-12-06 22:56:03 +01:00
drmortalwombat a8acde291b Fixed charwin petscii screen code conversion 2021-12-06 09:41:25 +01:00
drmortalwombat 15c65f69aa Change runtime assembler generator use value and return instead of reference 2021-11-29 18:37:15 +01:00
drmortalwombat a6fa114a5b Add runtime assembler functions to c64 library 2021-11-29 17:43:03 +01:00
drmortalwombat ea2b59e64d Fix sprite index in vic.c 2021-11-28 15:17:39 +01:00
drmortalwombat 0ca6ef8894 Some bytecode optimizations 2021-11-26 22:59:10 +01:00
drmortalwombat ccd6a50043 Optimize byte code interpreter loop 2021-11-25 21:42:06 +01:00
drmortalwombat 93174c8e68 Add overflow and underflow checking for floats 2021-11-24 20:01:08 +01:00
drmortalwombat 12aa385e38 Optimize bytecode generator 2021-11-22 19:49:02 +01:00
drmortalwombat 6007553d03 Byte code optimizations 2021-11-21 22:53:06 +01:00
drmortalwombat 4af2bc0bb2 Add setjmp and longjmp 2021-11-20 20:25:53 +01:00
drmortalwombat f2dc0091a8 At get to charwin 2021-11-19 08:13:36 +01:00
drmortalwombat b7aaf52f6a Fix empty cwin_fill_rect 2021-11-18 22:51:00 +01:00
drmortalwombat 4017cc386b Add charwin library and matching code generator optimizations 2021-11-18 14:57:43 +01:00
drmortalwombat 5c66e11ca0 Fold iny into interpreter loop for byte code 2021-11-16 20:24:51 +01:00
drmortalwombat 92b2c34293 Byte code size optimizations 2021-11-16 12:59:16 +01:00
drmortalwombat 0c3e19741c Optimize byte code size 2021-11-16 09:10:39 +01:00
drmortalwombat a65d65d3d1 Add volatile to vic.h raster register 2021-11-08 13:41:00 +01:00
drmortalwombat a8ed15d67b Optimize inline pointer parameters 2021-11-05 08:46:59 +01:00
drmortalwombat fe155d40d4 Change word to use int as base 2021-11-04 10:55:37 +01:00
drmortalwombat a3d8c94620 Push XY register usage in shift to later optimization stage 2021-11-03 19:39:28 +01:00
drmortalwombat bfd9522349 Fix conio.c gotoxy 2021-11-03 12:39:24 +01:00
drmortalwombat dcbd51e75e Fix old asm in conio.c 2021-11-02 14:59:05 +01:00
drmortalwombat f16edb1c57 Optimize signed byte comparisons 2021-11-01 22:33:02 +01:00
drmortalwombat 40f82ba6ec Fix byte table access 2021-11-01 21:22:02 +01:00
drmortalwombat 135d357dbc Strcpy as intrinsic 2021-10-31 19:14:07 +01:00
drmortalwombat 640477f88d Add peephole size optimizations 2021-10-30 10:42:41 +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 00c59ce6a4 Fix native code function pointer 2021-10-21 10:24:21 +02:00
drmortalwombat 7927df6d41 Fix call/return 2021-10-20 23:03:37 +02:00
drmortalwombat 9833656fcf More cartridge hacking 2021-10-19 22:29:23 +02:00
drmortalwombat 6444428489 Prepare cartdridge linking 2021-10-19 09:36:30 +02:00
drmortalwombat 3520d2a2bd Fix bugs found by llvm lint 2021-10-17 10:40:33 +02:00
drmortalwombat 3c891fb61e Fix 16 bit pointer offsets in native code 2021-10-13 22:19:27 +02:00
drmortalwombat 5372d49b50 Petscii translation in stdio and conio 2021-10-12 17:54:10 +02:00
drmortalwombat da57ae00c5 Add vic include file 2021-10-11 22:14:19 +02:00
drmortalwombat 11af372509 More autoinline optimizations 2021-10-10 17:14:12 +02:00
drmortalwombat 5e02e48c5a Optimized signed byte code compare 2021-10-09 10:38:25 +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 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 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 e713dc5940 Direct embedding of inline assembler in native code 2021-09-28 18:35:23 +02:00
drmortalwombat 1dd63ac708 Fix byte size inc/dec error 2021-09-25 22:50:16 +02:00
drmortalwombat 8e9b0fe54c Add simple native loop optimisation 2021-09-25 21:57:33 +02:00
drmortalwombat f925833884 Move executable into bin folder for windows and linux 2021-09-25 18:20:32 +02:00
drmortalwombat 5c3ff47690 Indirect address, y optimisation for short loops 2021-09-23 17:14:02 +02:00
drmortalwombat 123da8c155 Add charmap pragma 2021-09-23 08:26:46 +02:00
drmortalwombat 4ca77ba41a Byte operand sizes fixes and optimizations 2021-09-22 22:49:52 +02:00
drmortalwombat 603b62b9d3 Optimize native comparison against zero 2021-09-21 22:44:00 +02:00
drmortalwombat eebc39e53a Fix return type coercion, region based linker 2021-09-21 20:44:19 +02:00
drmortalwombat 3f5f3ee7ea Filenames now full 2021-09-21 15:08:05 +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 10bb751449 Fix struct over header boundaries 2021-09-19 20:00:36 +02:00
drmortalwombat fae377132f Fix assembler label low/high byte immediate 2021-09-19 16:08:38 +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 9f8362255f add conio.h 2021-09-13 20:55:31 +02:00
drmortalwombat 913f0d4190 Change line end to 13 in prints 2021-09-13 20:09:18 +02:00
drmortalwombat 87ccd5e221 More autotest 2021-09-12 16:05:23 +02:00
drmortalwombat ebdd6f0d7d Add fixed offset to pointer base mem access 2021-09-12 14:17:21 +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 897de02adf Fix unnamed parameters in function prototype 2021-09-11 16:05:31 +02:00
drmortalwombat 93b6aca8a3 More native code generator 2021-09-11 15:01:32 +02:00
drmortalwombat 07f797e577 Formatting options in printf 2021-09-10 16:13:47 +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 7af458832b Initial commit 2021-09-06 18:34:52 +02:00