1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-04 04:51:42 +00:00
Commit Graph

2076 Commits

Author SHA1 Message Date
jespergravgaard
facd70053d Added support for address-of pointers to members of structs. 2020-04-30 22:15:59 +02:00
jespergravgaard
bf0dbfde63 Slight changes to <mos6569.h> 2020-04-29 08:09:45 +02:00
jespergravgaard
bc85b3c0d1 Improved equality of constants. Moved more VIC-II variabes into struct. 2020-04-29 07:53:45 +02:00
jespergravgaard
0a9cee999d Updated C64 header file. 2020-04-28 22:58:16 +02:00
jespergravgaard
73d737ac79 Fixed tests. Started work in VICII struct. 2020-04-28 21:21:32 +02:00
jespergravgaard
013159c16d Fixes optimization problem with post-increment/decrement of calculated pointers. Closes #428 2020-04-28 20:13:29 +02:00
jespergravgaard
eed25ff1cd Inlined sid_rnd() functions. 2020-04-28 00:32:36 +02:00
jespergravgaard
8f2b1c2134 Moved MOS 6526 and MOS 6581 to separate H-files. Removed log noise causes by structs in H-files. 2020-04-28 00:30:35 +02:00
jespergravgaard
a8384bbebe Fixed CIA problems. 2020-04-27 00:20:53 +02:00
jespergravgaard
b10c365513 Using time-of-day in both 8 queens programs. 2020-04-26 23:50:19 +02:00
jespergravgaard
b82c3f0a07 Added time-of-day utility for commodore 64 <tod.h>. Moved MOS 6526 CIA to structs. 2020-04-26 23:30:04 +02:00
jespergravgaard
d8d0cc1ff8 Added 8 queens example programs with and without recursion. 2020-04-26 13:57:53 +02:00
jespergravgaard
e960c71448 Fixed fragment test. 2020-04-26 00:01:31 +02:00
jespergravgaard
9ddcb9790a Implemented 8 queen problem recursive solution. 2020-04-25 23:28:38 +02:00
jespergravgaard
0da4300069 Fixed atoi(). 2020-04-25 21:25:27 +02:00
jespergravgaard
ad76f3a9ed Added atoi() and a test. optimized printf(). 2020-04-25 21:09:46 +02:00
jespergravgaard
7069a8c17c Added test of toupper() 2020-04-25 20:23:40 +02:00
jespergravgaard
793a776b04 Clean-up of pass 1 log to avoid modifying log-files evey time stdlib is modified. 2020-04-25 20:10:49 +02:00
jespergravgaard
031cde10e9 Fixed test data. 2020-04-25 17:57:48 +02:00
jespergravgaard
5b2e993994 Fixed stack-overflow on recursive __stackcall functions. Added <math.h> abs(). Added <stdio.h> printf(). Closes #415 2020-04-25 16:51:35 +02:00
jespergravgaard
3b6c14be7a Added support for __intrinsic only being present in .c-file while absent in .h-file. Closes #417 2020-04-25 15:46:27 +02:00
jespergravgaard
4c3b000fbd Added a few more printf() error tests. 2020-04-25 14:53:14 +02:00
jespergravgaard
986ad3b77f Added support for printf() parameter index format string (eg. %2$d). Closes #420 2020-04-25 14:48:20 +02:00
jespergravgaard
ae28cb9c67 Improved minus literal implementation. Added <ctype.h> toupper(), <string.h> strupr(). Added support for %X (upper case HEX) in printf() format. Closes #419 2020-04-25 13:15:22 +02:00
jespergravgaard
d160e45c8a changed printf() cursor to be x,y-based. 2020-04-22 00:14:30 +02:00
Jesper Gravgaard
64660c626a Updated VS.Code files for Windows & MacOs. 2020-04-21 18:27:49 +02:00
Jesper Gravgaard
bc70424634 Added automatic type identification to numeric printf handler without %l / %hh. 2020-04-21 10:39:07 +02:00
Jesper Gravgaard
839911e0a0 Fixed test data. 2020-04-21 09:50:36 +02:00
jespergravgaard
f6ee599d79 Added printf() support for newlines, %% and %c. Added tests for different formats. #410 #415 2020-04-21 08:41:52 +02:00
Jesper Gravgaard
d7143771ba Added printf() support for %d, %i, %x, %o and length specifiers %hhd %ld. 2020-04-20 19:00:16 +02:00
jespergravgaard
28c9b2ada7 Improved implementation of intrinsic printf() to support rudimentary %d / %x. #410 #415 2020-04-20 08:55:50 +02:00
jespergravgaard
9fa2e5d734 Added support for declaring var-length parameter lists in functions. Added __intrinsic directive for specifying that a function is implemented in the compiler. Added initial tiny implementation of intrinsic printf(), which only handles %s. #410 #415 2020-04-19 23:29:37 +02:00
jespergravgaard
9c6e67ddc5 Printf tests rewritten to use inline struct constructors. 2020-04-19 11:53:15 +02:00
jespergravgaard
933d23fd0a Fixed problem with negating negative number generating illegal ASM. Closes #414 2020-04-19 11:13:57 +02:00
jespergravgaard
6a2937aa29 Casts are now inlined during parse - so they can be used for struct unwinding and more. They are then de-inlined around pass 1. This fixes problem with passing struct constructor as parameter to function. Closes #413 2020-04-19 11:05:54 +02:00
jespergravgaard
7bac2776b1 Added missing ref files. 2020-04-18 21:51:42 +02:00
jespergravgaard
897cde29e4 Added printf.h which contains functions for printing formatted numbers and strings. 2020-04-18 20:54:39 +02:00
jespergravgaard
7803f6710b Added primes test C-file. 2020-04-17 01:13:41 +02:00
jespergravgaard
a84cb1a977 Updated reference manual. 2020-04-13 22:04:11 +02:00
jespergravgaard
cb07791eab Renamed print.h functions. 2020-04-13 20:06:30 +02:00
jespergravgaard
d12daf874d Updated all stdlib files to use standard C types. 2020-04-13 20:00:13 +02:00
jespergravgaard
a877da3c7d Updated ref files. 2020-04-13 15:07:23 +02:00
jespergravgaard
ba372afeb3 Improved chrout() implementation. 2020-04-13 11:09:24 +02:00
jespergravgaard
3dcec77fb7 Added proper error when returning value from void function. Closes #400 2020-04-13 10:50:57 +02:00
jespergravgaard
ab10f2184d Upgraded to KickAsm 5.14. Fixed PETSCII encoding problem. Closes #401 2020-04-13 10:33:44 +02:00
jespergravgaard
cf4d25b5f6 Added additional screensize operations to allow better optimization. 2020-04-13 08:19:39 +02:00
jespergravgaard
c604e16630 Added first conio implementation compatible with cc65 and included a conio example from cc65. 2020-04-12 23:52:23 +02:00
jespergravgaard
2de71b4cd1 Fixed problem with post-increment sometimes happening to early when evaluating conditions. Closes #388 2020-04-12 10:15:32 +02:00
jespergravgaard
b4787eb45c Updated to KickAss 5.13. Closes #389 2020-04-12 08:03:01 +02:00
jespergravgaard
9c40c2f0f2 Added initial strncat() implementation. Found error in post-increment when used in a condition. 2020-04-11 22:48:33 +02:00
jespergravgaard
9e5e8ddf3b Cleaned up release file structure moving JAR's to JAR-folder. 2020-04-11 21:24:08 +02:00
jespergravgaard
a378e831e2 Added support for header-files found in include-folders and C-files found in library-folders. The compiler auto-searches for the C-file in the defined lib search path whenever a H-file is included. Closes #387 2020-04-11 21:15:34 +02:00
jespergravgaard
c150976b2f Retired special file extension .kc. Now using .c for all examples and tests. Closes #195 2020-04-11 16:06:15 +02:00
jespergravgaard
d95fea6975 Added -E commandline option for running only the proprocessor. Closes #385 2020-04-11 13:41:10 +02:00
jespergravgaard
1c59ad61fd Added support for compiling multiple C-files using a single command line. Closes #382 2020-04-11 13:03:36 +02:00
jespergravgaard
f42a921d2b Now supports \xnn syntax for all values - even those without a proper encoding. Closes #383 2020-04-11 09:13:22 +02:00
jespergravgaard
e506732779 Improved function names and documentation. 2020-04-11 08:30:42 +02:00
jespergravgaard
56227c36b6 Moved getters to StringEncoding. 2020-04-10 22:02:30 +02:00
jespergravgaard
61c5914f73 Added support for \xnn as escape in strings. However only characters defined in the current encoding works. Refactored handling of escapes and encodings. Closes #383 2020-04-10 11:24:20 +02:00
jespergravgaard
b36a8b087c Fixed import parsing by introducing another lexer mode. 2020-04-10 01:25:08 +02:00
jespergravgaard
8c5500822c Nuw using #include<> in test files where possible. 2020-04-10 01:10:18 +02:00
jespergravgaard
5ff8fce61d Added support for #include <> syntax. Closes #381 2020-04-09 23:56:43 +02:00
jespergravgaard
8dac19aca0 Added caching of global symbols. Results in faster compilation. 2020-04-09 22:38:30 +02:00
jespergravgaard
096d7c0640 Cleaned up scope getters. Might have caused a slow-down of compilation. 2020-04-09 22:17:33 +02:00
jespergravgaard
ab10bd59b4 Added a few more c's to test. 2020-04-09 09:36:09 +02:00
jespergravgaard
23ae5cf5f5 Variable extern declarations are now supported. Closes #196 2020-04-09 09:21:43 +02:00
jespergravgaard
8bdc927694 Fixed test for missing function definition. #196 2020-04-09 08:13:44 +02:00
jespergravgaard
ebdce3b2a7 Added test for missing function definition. #196 2020-04-08 23:52:49 +02:00
jespergravgaard
273819d2a4 Added test for two error cases. #196 2020-04-08 23:44:40 +02:00
jespergravgaard
db92daf4bf Added initial support for function declarations without a body. #196 2020-04-08 23:40:27 +02:00
jespergravgaard
433fcd3dd4 Added support for macro parameters with proper pre-expansion allowing nested macro calls. Closes #169 2020-04-07 14:12:25 +02:00
jespergravgaard
682757b10c Renamed import to #include. #169 2020-04-07 12:43:31 +02:00
jespergravgaard
d8138615ac Implemented #elif. #169 2020-04-07 12:06:42 +02:00
Jesper Gravgaard
4352874305 Added support for #if reusing the expression parser. Added support for the special defined operator. Now using the base parser for the preprocessor test. #169 2020-04-06 14:34:42 +02:00
jespergravgaard
0a11eefda0 Syntax changes. 2020-04-06 08:06:00 +02:00
jespergravgaard
263987f059 Added an expression parser to use for #if. #169 2020-04-06 08:00:55 +02:00
jespergravgaard
88b2cd86c2 Added test for #define containing inline ASM/KickAsm. Fixed problem with ASM. #169 2020-04-05 22:54:00 +02:00
jespergravgaard
ba1ecac84b Added test for recursive #define. #169 2020-04-05 20:34:33 +02:00
jespergravgaard
7c9c2955b4 Added test for multi-line #define. #169 2020-04-05 20:13:40 +02:00
jespergravgaard
9fea02e7ad Added support for #ifdef #ifndef #else #endif. #169 2020-04-05 20:09:34 +02:00
jespergravgaard
524d789805 Added test for #defines inside imported file. #169 2020-04-05 18:28:32 +02:00
jespergravgaard
a01c6b5680 Added support for #undef. #169 2020-04-05 18:06:06 +02:00
jespergravgaard
c4550b5aec Added test of defines with complex body. #169 2020-04-05 14:45:32 +02:00
jespergravgaard
30e35bee41 Added simple preprocessor to the KickC compiler (only supports #define without parameters). #169 2020-04-05 14:32:07 +02:00
jespergravgaard
375578e7df Added #define to KickC lexer. #169 2020-04-05 09:32:10 +02:00
jespergravgaard
ea49dc910a Now supports multi-line #defines, nested #defines and ends recursive #defines correctly. #169 2020-04-04 17:39:41 +02:00
jespergravgaard
a2de5faf47 Added peeking iterator. 2020-04-03 08:21:27 +02:00
jespergravgaard
b2466df1e4 Moved simple macro expander to main source. 2020-04-02 08:33:32 +02:00
Jesper Gravgaard
3bb6efb92d Updated test data. 2020-04-01 14:53:02 +02:00
Jesper Gravgaard
b7851e7305 Proof of Concept macro expansion working. #169 2020-04-01 14:51:16 +02:00
jespergravgaard
9eb17e7ed1 Working on a C preprocessor proof-of-concept at the lexer level. #169 2020-04-01 12:56:28 +02:00
jespergravgaard
bc4dd9ea47 Working on a proof-of-concept preprocessor lexer. #169 2020-04-01 01:35:46 +02:00
jespergravgaard
244f329ab0 Default runner is now x64sc. Closes #348 2020-03-31 22:55:58 +02:00
jespergravgaard
b8a2e10fd8 The sprite scroller is now working with the sine-dampened X-movement. 2020-03-31 20:22:08 +02:00
Jesper Gravgaard
96779a5f24 Working on sprite scroller. 2020-03-31 19:20:33 +02:00
Jesper Gravgaard
a977e6d9f0 Updated multiplexer.kc to allow usage in IRQ's. Eliminated multiplexer-irq.kc. 2020-03-31 12:47:21 +02:00
jespergravgaard
90fccdebef Working on font 2x2 to sprite converter. 2020-03-31 09:55:49 +02:00
jespergravgaard
91da76e087 Created font 2x2 to sprite converter. Improved a few bitwise operators. 2020-03-30 22:39:39 +02:00
jespergravgaard
beb30de7d1 Fixed ASM re-labelling error. #369 2020-03-30 20:33:26 +02:00
jespergravgaard
7ff1a0ec9a Fixed test! 2020-03-30 18:49:00 +02:00
Jesper Gravgaard
5c49f2356e Added support for const/volatile directives inside & outside structs. Closes #377 2020-03-30 13:48:55 +02:00
Jesper Gravgaard
607f740f8b Added support for typedefs with const/volatile directives. Closes #375 2020-03-30 13:25:52 +02:00
jespergravgaard
e3b54f34d7 Fixed typedef arrays (still no array of array). Closes #376 2020-03-30 08:35:22 +02:00
jespergravgaard
5a8654b0e7 Working towards typedef with const/volatile directive handling and typedef arrays by introducing a varDecl stack in the parser. #375 #376 #377 2020-03-30 00:12:03 +02:00
jespergravgaard
db6f8b5a36 Added variable nomodify/volatile information to log. 2020-03-29 21:00:25 +02:00
jespergravgaard
a579ab491a Changed pointer and directive parsing to distinguish directives applied to pointers and directives applied to variables. Fixed all example-code to reflect this. Closes #271 2020-03-29 20:22:16 +02:00
jespergravgaard
838b8f4d26 Added support for typedef arrays. 2020-03-27 22:23:04 +01:00
jespergravgaard
d6c60d9466 Pointer type rewritten to bind to variables instead of type allowing a declaration like char *a, b, **c;. Closes #265 2020-03-27 21:08:18 +01:00
jespergravgaard
9b41df3b6a Added variable layer handling to declarations. 2020-03-27 10:53:42 +01:00
jespergravgaard
ffa9d8a6ca Added compiler option -Warraytype to allow non-standard array syntax. By default it is not allowed. #162 2020-03-26 16:20:30 +01:00
jespergravgaard
d3012e92d1 Changed code to standard C array syntax char x[8]. 2020-03-26 12:03:21 +01:00
jespergravgaard
6894f0bd7c Changed code to standard C array syntax char x[8]. 2020-03-26 10:56:19 +01:00
jespergravgaard
f9560de10d Standard C array syntax implemented char x[8]. The KickC syntax char[8] x is still supported, but will be removed. Closes #162 2020-03-26 09:13:48 +01:00
jespergravgaard
1160a14359 Changed byte/word to char/int 2020-03-26 07:06:55 +01:00
Jesper Gravgaard
253263983e Added 2x2 font compression example. Improved chargen example. 2020-03-25 17:51:45 +01:00
jespergravgaard
81202b676a Added font compression example. 2020-03-25 09:56:10 +01:00
jespergravgaard
a44d8d5388 Improved liverange testing 2020-03-23 07:26:43 +01:00
jespergravgaard
e385257cf4 Improved liverange testing 2020-03-23 07:26:26 +01:00
jespergravgaard
ae1536f429 Merged simpler live range calculation to master. Improved scope weight calculation to combine call graph depth and loop depth. Added missing fragments. 2020-03-23 00:10:07 +01:00
jespergravgaard
6b3b4bec5a Working on live range effective simple. Fixed aliasing and parameters. There is still problems with functions calling functions - such as print_w(), print_sw() and print_char(). 2020-03-22 22:26:39 +01:00
jespergravgaard
4f8609ea72 Working on #371 simpler live range calculation 2020-03-16 07:57:56 +01:00
jespergravgaard
20b596d98b Closes #368 2020-03-12 05:58:14 +01:00
jespergravgaard
c958f7e781 Added -vasmout option that shows the stdout output from KickAsm during compilation. 2020-03-12 05:56:57 +01:00
jespergravgaard
d1ec933032 Fixed error in recursive caller code. 2020-03-08 23:26:49 +01:00
jespergravgaard
0e58165f3a Improving implementation. 2020-03-08 22:43:00 +01:00
jespergravgaard
c0b0f063cc Implemented switchable effective live ranges. Started on "simple" which works for most programs - but fail for tetris, clearscreen and more. 2020-03-08 21:07:09 +01:00
jespergravgaard
7726c1d43f Refactored effectively alive vars into an interface for experimenting with less memory-intensive implementation. 2020-03-08 16:14:20 +01:00
jespergravgaard
afe8294cd1 Now auto-converting global variables modified inside a __stackcall procedure to load/store. 2020-03-08 12:57:32 +01:00
jespergravgaard
d217113afb Fixed multi-output of comments. 2020-03-08 09:43:12 +01:00
jespergravgaard
3b87c1a7c5 Restructured code to match call prepare/execute/finalize/parameter/return. 2020-03-08 09:06:39 +01:00
jespergravgaard
1836a9bd92 Finally eliminated copy visitor!
Refactored CallPhiParameters to modify the current control flow graph.
2020-03-07 22:38:40 +01:00
jespergravgaard
61a6e29f4d Added output 2020-03-07 21:43:42 +01:00
jespergravgaard
4af6d88907 Renamed passes 2020-03-07 19:44:37 +01:00
jespergravgaard
9e505c4d6e Merge remote-tracking branch 'origin/master' 2020-03-07 19:13:53 +01:00
jespergravgaard
e2cb37eaf3 Removed unneccesary condition. 2020-03-07 19:13:44 +01:00
Jesper Gravgaard
002c498810 Rewrote calling convention PHI return value pass. 2020-03-07 19:11:33 +01:00
jespergravgaard
f32f44cd92 Added missing test data. 2020-03-07 08:44:36 +01:00
jespergravgaard
2e934a7a30 Created StatementExprSideEffect. Converted call prepare to pushes. 2020-03-07 08:44:02 +01:00
jespergravgaard
7baacebc3d Created StatementExprSideEffect. Converted stack operations to this. 2020-03-07 08:08:54 +01:00
jespergravgaard
9e2e38e671 Moving __Stackcall stack operations back to pass 1/2 from pass 4 ASM code generation. 2020-03-07 00:33:07 +01:00
jespergravgaard
689aeb0ca6 Fixed problem with passing struck values to __stackcall. Closes #366 2020-03-06 09:38:09 +01:00
jespergravgaard
797c3bbd21 Moved calling convention stack handling to pass 1. Passing structs to __stackcall does not work atm. 2020-03-05 09:13:52 +01:00
jespergravgaard
c6f81595fb Added support for %E in linker scripts expanding to the name of the entry point label starting the program (ie. __bbegin). __bbegin handling could still use some love. 2020-03-03 08:58:31 +01:00
jespergravgaard
2c177dd45f Fixed passing of value lists as return values. Fixed problems with clobbering in return/call return value fetch. 2020-03-03 01:25:02 +01:00
jespergravgaard
2427720581 Fixed problem where unused parameters were eliminated. 2020-03-02 20:56:04 +01:00
jespergravgaard
25279aead3 Fixed problem with live variables and stack calls. 2020-03-02 09:21:31 +01:00
jespergravgaard
5d7533de5d Added test illustrating variable alive range propagation problem when using call stack. 2020-03-01 23:02:07 +01:00
jespergravgaard
7720eb8c13 Added tests illustrating stack call live range problems. 2020-03-01 17:05:54 +01:00
jespergravgaard
648d08a13d Added proper clobber check to call prepare sub-statements. Fixed stack clean-up after stack call return. 2020-03-01 16:00:42 +01:00
jespergravgaard
4346790c43 Fixed failing test. 2020-02-28 00:16:12 +01:00
jespergravgaard
ce7e6d29cb Added missing fragments. Handling inlined procedures. 2020-02-28 00:11:33 +01:00
Jesper Gravgaard
378798d6ba Added missing stack fragments. 2020-02-27 19:35:43 +01:00
Jesper Gravgaard
c44cb02b96 Fixed parameter offsets on stack by reversing order. 2020-02-27 13:26:30 +01:00
Jesper Gravgaard
c3c2999381 Refactored dominator calculation to happen scope by scope. 2020-02-27 12:48:23 +01:00
jespergravgaard
4ef4d178b6 Added commandline option for specifying calling convention. 2020-02-27 07:22:22 +01:00
jespergravgaard
e1e17f6152 Fixed type inference for StackIdxValue. Added a few missing stack fragments for __stackcall with pointers. 2020-02-26 11:44:15 +01:00
jespergravgaard
ee18c2c414 Added some missing fragments. 2020-02-26 11:00:08 +01:00
jespergravgaard
5e6ac1a0cd Fixed error in vae_model settings parser. 2020-02-26 00:13:03 +01:00
jespergravgaard
7135c08d6f Updated version number. 2020-02-25 22:16:54 +01:00
jespergravgaard
946144135a Added command line support for var_model(). 2020-02-25 22:15:39 +01:00
Jesper Gravgaard
b05a321d85 Merge remote-tracking branch 'origin/master' 2020-02-25 21:38:53 +01:00
Jesper Gravgaard
827f63c315 Added support for full var_models and var_models with default setting applied pre/post. 2020-02-25 21:38:29 +01:00
jespergravgaard
e9eeafd170 Fixed a few errors introduced by condition simplification rewrite. Added a fragment. 2020-02-25 09:26:05 +01:00
jespergravgaard
5fd74a8d39 Improved tetris code by inlining two kickasm-arrays. 2020-02-24 22:39:09 +01:00
jespergravgaard
19b145c207 Implemented immediate variables for preserving the value of load/store variables used in simple conditions that are inlined. #359 2020-02-23 20:57:53 +01:00
jespergravgaard
6862698fb7 Eliminated redundant methods got getting assignments/usages in Pass2SsaOptimization. 2020-02-23 19:26:53 +01:00
jespergravgaard
2961c84bd7 Working on improving the condition simplification. 2020-02-23 10:04:51 +01:00
jespergravgaard
5ffae4d92a Added C-source to generated test ASM. 2020-02-23 09:44:36 +01:00
jespergravgaard
dc6175a0b6 Working on fixing #359 problem with load/store variables and simple-conditionals. 2020-02-22 20:45:35 +01:00
jespergravgaard
d33c84488a Fixed a few tests. 2020-02-22 12:06:47 +01:00
jespergravgaard
7dacbb2c75 Fixed code for __ma. 2020-02-15 09:30:27 +01:00
jespergravgaard
f45ba8eb10 Fixed early constant identification. Added test for constant initValue. 2020-02-15 09:00:57 +01:00
jespergravgaard
7b8488ef29 Fixed the last __ma exceptions. 2020-02-14 23:01:56 +01:00
jespergravgaard
3770874860 Unrolled condition variables are now converted to SSA automatically in pass 1. 2020-02-14 15:55:04 +01:00
jespergravgaard
d0bc5af94b Now identifying USE's that are also DEFINE's as unused. 2020-02-14 10:57:29 +01:00
jespergravgaard
0beeab9be2 Refactored live ranges to work for multiple-assign variables. The price is that a few unused variables are no longer optimized away since they depend only on them selves. See duplace-loop-problem.kc. 2020-02-14 00:32:19 +01:00
Jesper Gravgaard
a5d14105d8 Fixed const in test. 2020-02-13 18:26:52 +01:00
Jesper Gravgaard
f92e750b61 Fixed removal of unused vars. 2020-02-13 13:46:54 +01:00
jespergravgaard
f106f953a8 Working on memory model ma_mem. Added some support for local static variables. 2020-02-13 11:36:27 +01:00
jespergravgaard
600a80dbcc Fixed last errors for ssa_mem var-model. 2020-02-12 23:26:20 +01:00
jespergravgaard
687705f5d2 Eliminated old getAssignment() method. 2020-02-12 22:24:29 +01:00
jespergravgaard
3d7914c31f Eliminated old getAssignment() methods. 2020-02-12 22:09:43 +01:00
jespergravgaard
6c4a99240d Eliminated old getAssignment() methods. 2020-02-12 08:21:48 +01:00
jespergravgaard
92acd45493 Eliminated old getAssignment() methods. 2020-02-12 00:47:01 +01:00
jespergravgaard
45019c1116 Fixed test 2020-02-11 22:04:01 +01:00
Jesper Gravgaard
f2ef18829f Improving synthesis 2020-02-11 21:00:04 +01:00
Jesper Gravgaard
ba20025165 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	src/main/java/dk/camelot64/kickc/model/VariableBuilder.java
2020-02-11 18:25:13 +01:00
Jesper Gravgaard
759e17829e Working on fixing ma_mem variable model. Improving synths. 2020-02-11 18:23:19 +01:00
jespergravgaard
2daf1c0f87 Added a few fragments. 2020-02-10 21:57:15 +01:00
jespergravgaard
8fe8773dc1 Fixed fragment tests. Using new VarAssignments method in alias elimination. 2020-02-10 20:14:22 +01:00
Jesper Gravgaard
8f2d766e52 Working on fixing ma_mem variable model. 2020-02-10 18:39:25 +01:00
jespergravgaard
bd9a403b64 Improving ssa_mem variable support. 2020-02-10 00:33:16 +01:00
jespergravgaard
353d45ab65 Improving ssa_mem variable support. 2020-02-09 18:50:17 +01:00
jespergravgaard
9faabae052 Merged memory-variables to main. Includes support for C-standard structs, much better constant identification, much better handling of arrays/structs inside structs, removal of string type, initialization/copying using memcpy/memset and new #pragma var_model(). 2020-02-09 16:54:14 +01:00
jespergravgaard
4f54062a43 Added test with two different variable models. 2020-02-09 15:06:16 +01:00
jespergravgaard
be05569013 Fixed tests 2020-02-09 14:30:27 +01:00
jespergravgaard
a119d38b5e Added a few tests for the new #pragma var_model(). 2020-02-09 12:55:17 +01:00
jespergravgaard
c8523c488e Now using VariableBuilderConfig for setting up SSA/MA & MemoryArea. 2020-02-09 12:44:36 +01:00
Jesper Gravgaard
eed8d58d74 Now using VariableBuilderConfig for SSA/MA. 2020-02-09 11:48:17 +01:00
jespergravgaard
df9bde2ee8 Added pragma var_model(...) for configuring memory and optimization model for variables. 2020-02-08 10:35:43 +01:00
jespergravgaard
f73b048d2e Eliminated SymbolType.STRING 2020-02-06 22:52:23 +01:00
jespergravgaard
a612562dc7 Work in progress: eliminating SymbolType.STRING 2020-02-06 22:29:41 +01:00
jespergravgaard
fda0940062 Work in progress: eliminating SymbolType.STRING 2020-02-06 22:20:53 +01:00
jespergravgaard
a231b7495f Collecting SIZEOF/INDEXOF constants in one class. Dropping defunct struct pointer rewrite pass. 2020-02-06 19:22:56 +01:00
jespergravgaard
13ab7e8da3 Removed unnecesary address-of handling. 2020-02-06 18:19:02 +01:00
jespergravgaard
45ad6b64b0 Dropped inferred volatile. 2020-02-06 18:07:56 +01:00
jespergravgaard
1a978bc82d Fixed struct address-of handling. 2020-02-06 15:40:27 +01:00
jespergravgaard
345b154264 Removed all old unwinding code. 2020-02-06 10:18:46 +01:00
jespergravgaard
b9cdfa5f39 Removed all the old unwinding code. 2020-02-06 09:49:32 +01:00
jespergravgaard
64afa1791e Call parameters rewrite now using ValueSources. 2020-02-06 01:26:46 +01:00
jespergravgaard
8a3039112b Call LValue rewrite now using ValueSources. 2020-02-06 01:19:34 +01:00
jespergravgaard
0057e16517 StructMemberReferences rewrite now using ValueSources. 2020-02-06 01:08:55 +01:00
jespergravgaard
511020649a Working on new ValueSource based unwinding. Most of the old unwinding code is now unused. 2020-02-05 17:29:25 +01:00
Jesper Gravgaard
b17d4ab8fc Unwindings moving to ValueSource 2020-02-05 09:24:55 +01:00
jespergravgaard
0336b18a62 Working on new ValueSource based unwinding!
A few __ptr__ problems in test outputs remain.
2020-02-05 00:45:08 +01:00
jespergravgaard
e1258f943d Working on new ValueSource based unwinding! 2020-02-04 20:52:58 +01:00
jespergravgaard
a50b295c45 Working on new ValueSource based unwinding! 2020-02-03 08:30:17 +01:00
jespergravgaard
ae79e813a2 Added test copying struct value into array. 2020-02-02 23:41:26 +01:00
jespergravgaard
2ebf7b698b Added logging when postponing unwindings. 2020-02-02 23:06:59 +01:00
jespergravgaard
d096790786 Fixed missing BIN-file for NMI sample example code. Closes #357 2020-02-02 22:56:21 +01:00
jespergravgaard
3e5529c0f1 Added 2 complex struct copy tests. 2020-02-02 22:24:25 +01:00
jespergravgaard
ac02d1bbc2 Added missing fragments. 2020-02-02 15:49:20 +01:00
jespergravgaard
1fffef91f5 Added a bunch of complex struct copying tests. 2020-02-02 15:00:14 +01:00
jespergravgaard
9db24ceb01 Removed main return value 2020-02-02 10:24:44 +01:00
jespergravgaard
98ee476b5b Added another struct test. 2020-02-02 09:47:51 +01:00
jespergravgaard
d60a31f188 Merged memvars-328 into memvars-struct. 2020-02-02 09:12:49 +01:00
jespergravgaard
070380b4af Merge branch '328-memvars' into memvars-struct
# Conflicts:
#	src/test/java/dk/camelot64/kickc/test/TestPrograms.java
2020-02-02 09:06:31 +01:00
jespergravgaard
7707e64ad8 Adding Millfork Benchmarks to test suite. 2020-02-02 08:47:47 +01:00
jespergravgaard
4479efb22d Adding Millfork Benchmarks to test suite. 2020-02-01 19:07:52 +01:00
jespergravgaard
5203092d3a Updated to C types. 2020-02-01 10:54:51 +01:00
jespergravgaard
7665387333 Updated to C types. 2020-02-01 10:48:47 +01:00
jespergravgaard
bb3be5655c Updated to C types. 2020-02-01 10:38:53 +01:00
jespergravgaard
d51bfe5c66 Fixed test! 2020-01-20 23:33:25 +01:00
jespergravgaard
3b68c1b33e re-enabled test. 2020-01-20 21:41:14 +01:00
jespergravgaard
bcb617ef58 Removed offending test. 2020-01-20 06:51:13 +01:00
jespergravgaard
68b4794049 Optimized 32-bit plus 8-bit constant fragment. 2020-01-20 00:30:05 +01:00
jespergravgaard
d28bb8245b Changed fragment optimization _plus_2 to only be used for byte values. 2020-01-19 23:37:15 +01:00
jespergravgaard
06a2e00540 Added bulk unwinding for struct pointer derefs. 2020-01-19 22:10:02 +01:00
Jesper Gravgaard
7ea2453733 Refactored unwindings into separate classes for better reuse. 2020-01-19 19:50:04 +01:00
jespergravgaard
a32f783b74 Global struct values are not per default load/store, main-memory. 2020-01-12 22:53:57 +01:00
jespergravgaard
ffdc590b90 Fixed tests 2020-01-12 14:09:16 +01:00
jespergravgaard
a1f490ed49 Fixed tests 2020-01-12 12:28:23 +01:00
jespergravgaard
d5f4b1f690 Init-value of global load/store memory variables is now output directly into data-statements. 2020-01-11 14:55:27 +01:00
jespergravgaard
2eb5aaa24f Added support for init-value of global load/store memory variables. 2020-01-11 13:39:10 +01:00
jespergravgaard
030a379845 Struct values can now be bulk initialized / copied in assignments. Still needs work for global variables and more. 2020-01-09 00:30:16 +01:00
jespergravgaard
26be14f7ee Working on improvements regarding global initializers and unnecessary unwinding of constant structs. Moved most unwinding to separate package. 2020-01-07 08:28:57 +01:00
jespergravgaard
4eaa0c5385 Working on improvements regarding global initializers and unnecessary unwinding of constant structs. Moved most unwinding to separate package. 2020-01-07 00:25:47 +01:00
jespergravgaard
6a9f59cda1 Working on improvements regarding global initializers and unnecessary unwinding of constant structs. Introduced RValueUnwinding for handling a single value. 2020-01-02 14:36:02 +01:00
jespergravgaard
db595d0b53 Structs with array members finally working. However import improvements remain regarding global initializers and unnecessary unwinding of constant structs. 2020-01-02 00:31:29 +01:00
jespergravgaard
8ae248b1c2 Fixed a few error messages 2020-01-01 18:47:33 +01:00