1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-03 12:07:26 +00:00
Commit Graph

513 Commits

Author SHA1 Message Date
jespergravgaard
65dffdbdea Added upport for continue inside switch statement. Closes #170 2019-08-18 21:55:21 +02:00
jespergravgaard
55b7dfdf91 Added a few fragments - and some tests illustrating certain problems. 2019-08-18 20:59:57 +02:00
jespergravgaard
3c12acbb43 Added support for \\ escape code. #241 2019-08-18 17:00:26 +02:00
jespergravgaard
577e0f6011 Implemented support for string and character escape codes \n \r \\ \" \'. Closes #241 2019-08-18 16:43:15 +02:00
jespergravgaard
f08812ab91 fixed test 2019-08-18 14:20:05 +02:00
jespergravgaard
891a4c21c2 Improved Atari Tempest Example Code. 2019-08-16 22:28:37 +02:00
jespergravgaard
8d7b0385cb Fixed type inference error message. Closes #260 2019-08-13 08:08:43 +02:00
jespergravgaard
c9a3f33773 Implemented switch()-statement - first simple test working. #170 2019-08-12 21:46:01 +02:00
jespergravgaard
1dd2f1ebe6 Improved basic-floats.kc 2019-08-11 01:16:56 +02:00
jespergravgaard
ffa75b1732 Expanded "used" logic of inine ASM to include procedure refs. 2019-08-10 18:27:05 +02:00
jespergravgaard
074826fb1f Playing a little with XMega helloworld. 2019-08-10 16:48:47 +02:00
jespergravgaard
7484e27a32 Working helloworld for XMega65 Xemu. 2019-08-10 15:41:32 +02:00
jespergravgaard
c82234db19 Fixed problem with for() continue. 2019-08-10 15:07:51 +02:00
jespergravgaard
da56d74339 Merged IcePic/master fragments. Thanks to Janne Johansson. #248 2019-08-10 14:41:46 +02:00
jespergravgaard
741f424116 Merged IcePic/master fragments. Thanks to Janne Johansson. #248 2019-08-10 14:41:30 +02:00
jespergravgaard
65bf7be4d7 Added support for export directive on data variables ensuring they are always included in the output ASM even if not used. Closes #252 2019-08-10 09:02:35 +02:00
jespergravgaard
7b155ee4b0 Added support for register keyword without parameter for compatibility. Closes #229 2019-08-10 08:39:42 +02:00
jespergravgaard
5755616588 Changed syntax slightly 2019-08-10 08:21:58 +02:00
jespergravgaard
e53159699b Implemented Xmega65 SYSCALLS. 2019-08-10 00:22:57 +02:00
jespergravgaard
4430974f25 Implemented Xmega65 SYSCALLS. 2019-08-10 00:17:55 +02:00
jespergravgaard
d70fbe4c34 Implemented Xmega65 SYSCALLS. 2019-08-10 00:16:33 +02:00
jespergravgaard
dbb6ce5933 Added support for #pragma code_seg() and #pragma data_seg(). #113 2019-08-09 22:38:33 +02:00
Jesper Gravgaard
6b0ef4408c Added test data. 2019-08-09 17:50:02 +02:00
Jesper Gravgaard
313d45fd03 Improved target platform handling. 2019-08-09 16:11:28 +02:00
jespergravgaard
8f0b9c886f Implemented initial KickAsm segment support. #113 2019-08-09 11:31:08 +02:00
jespergravgaard
d3081d3fe1 Renamed AsmSegment to AsmChunk in preparation for introduction of KickAsm segments. #113 2019-08-08 23:46:43 +02:00
Jesper Gravgaard
ab28c25528 Added #pragma syntax 2019-08-08 13:16:17 +02:00
jespergravgaard
db3e77d8fd Added NMI sample example. 2019-08-07 21:35:40 +02:00
jespergravgaard
7a49ded40c Now all instructions addressing zero-page have an explicit .z added to the ASM to ensure the ASM generated does zeropage-addressing. Closes #249 2019-08-07 21:00:21 +02:00
jespergravgaard
c78bebf2a8 Updated stdlib & tests with 0-terminated strings. 2019-08-07 19:48:56 +02:00
jespergravgaard
6c59110896 Fixed encoded string zero termination. Closes #192 2019-08-07 19:36:19 +02:00
Jesper Gravgaard
62b03bcefb Fixed encoding for literal chars through work-around. Closes #245 2019-08-07 14:58:57 +02:00
Jesper Gravgaard
ce5e3cf19a Added constant loop head optimization, that detects when the condition is constant in the first loop iteration. Closes #246 2019-08-07 13:22:05 +02:00
jespergravgaard
b2804ef335 Added a smaller sieve. 2019-08-07 11:35:15 +02:00
jespergravgaard
dacd25ac5f Added constant loop-head detection to a switchable optimization option -Oloophead. #246
Implemented for()-loop condition checking before body. Closes #183
2019-08-07 11:27:56 +02:00
jespergravgaard
c88932d423 Added constant loop-head detection to a switchable optimization option -Oloophead. #246
Implemented for()-loop condition checking before body. Closes #183
2019-08-07 11:09:29 +02:00
jespergravgaard
be4983cb13 Implemented for()-loop condition checking before body. #183
Moved constant loop-head detection to switchable optimization option.
2019-08-07 10:56:41 +02:00
jespergravgaard
0a58b03094 Constant loop head identification working. #246 is essentially complete. A few program grow to much from the optimization - this needs attention at some point. 2019-08-07 01:32:46 +02:00
jespergravgaard
e167f8dce8 Fixed almost all problems in constant loop head identification. A few program becomes infinite loops - needs fixing! A few also become way to long when rewritten - probably detect & rollback. 2019-08-06 01:10:57 +02:00
Jesper Gravgaard
c63b031dbe Implemented new Unroller that can copy a set of blocks in the control flow graph and handles block transitions according to a specified strategy. Moved loop-unroll implementation to the new Unroller. 2019-08-05 17:32:37 +02:00
jespergravgaard
3d0f0b648d Working on optimizing constant loop heads (Pass2LoopHeadConstantIdentification). #246 2019-08-04 01:50:00 +02:00
jespergravgaard
4807bbded7 Code generation now handles encoding in literal chars. Done 2/3 of #245 2019-08-04 00:13:33 +02:00
jespergravgaard
9e56b49a7e Added encoding information to literal chars. Working on 2/3 of #245 2019-08-03 14:08:48 +02:00
jespergravgaard
198280e1c8 Snapshotting program dynamic state now working through Serialization. Working on #246 2019-08-03 13:22:27 +02:00
jespergravgaard
764e0c1069 Added some basic loop tests. 2019-08-01 21:15:33 +02:00
jespergravgaard
a006e67f82 Upgraded to KickAss 5.8. Closes #243 2019-08-01 12:58:40 +02:00
jespergravgaard
129cad782b Fixed test 2019-08-01 11:03:19 +02:00
jespergravgaard
f8dfe3743b Implemented light-weight zeropage coalesce. Closes #237 2019-07-31 13:47:22 +02:00
jespergravgaard
869a2dcade Working on extracting zp coalesce logic. 2019-07-31 11:08:33 +02:00
jespergravgaard
2135bb1170 merged masters 2019-07-30 22:29:33 +02:00
jespergravgaard
78f89c927b Added joystick test 2019-07-30 22:28:19 +02:00
Jesper Gravgaard
73fb40a3e3 merged and fixed conflict 2019-07-30 15:01:43 +02:00
jespergravgaard
b27c69635b Working on light-weight coalesce #237 2019-07-29 23:50:42 +02:00
jespergravgaard
dc853bcffa Converted letter C to array of struct literal. 2019-07-28 23:11:41 +02:00
jespergravgaard
a50e9e212a Added support for literal arrays of structs by making the literal-identification and literal-handling and code-generation recursive over the value lists. Closes #223 2019-07-28 23:05:30 +02:00
jespergravgaard
44df048e64 Added support for address-of array-element &sieve[j]. Closes #228 2019-07-26 16:12:12 +02:00
jespergravgaard
07b08e3ed7 Renamed struct tests away from "problem-" name. Postponed struct member unwinding for non-variable members. 2019-07-26 14:54:10 +02:00
jespergravgaard
f336907efd Added test refs. 2019-07-26 14:31:37 +02:00
jespergravgaard
a30939e72c Finished fixes for uniwnding struct pointers/arrays. 2019-07-26 14:31:00 +02:00
jespergravgaard
66f6195739 Fixed problem with passing struct inside array as parameter. Closes #224 2019-07-26 13:22:18 +02:00
jespergravgaard
a1ef8ad163 Fixed problem with passing dereferenced struct pointers as parameters. Closes #225 2019-07-26 13:15:54 +02:00
jespergravgaard
0c33353bf8 Fixed problems with sizeof()-handling struct members. Closes #230 2019-07-25 23:06:09 +02:00
jespergravgaard
a9e0c7805f Added error when exhausting zeropage space for variables. Closes #233 2019-07-25 17:26:43 +02:00
jespergravgaard
e8a0694f34 Added support for different target platforms. Added first platforms c64basic and asm6502 (no upstart). Closes #232 2019-07-25 17:06:19 +02:00
jespergravgaard
424f5ce006 Added an extra test. 2019-07-25 14:55:10 +02:00
jespergravgaard
02ff354d3f Dropped SelfPhiEliminate pass - so now phi-variables have value for all predecessor-blocks. Added self-phi-handling to Identical-PHI optimization step instead. Closes #231 2019-07-25 14:35:43 +02:00
Jesper Gravgaard
9231fe18d6 Added splie test creating a (slowly) rotating truetype c. 2019-07-19 02:23:44 +02:00
Jesper Gravgaard
5a0b1a5d57 Added prime sieve test program 2019-07-18 09:47:41 +02:00
Jesper Gravgaard
660d2a8979 Changed print_cls() to use memset(). Fixed error in fragment. 2019-07-18 01:54:16 +02:00
Jesper Gravgaard
25f16b6b87 Added utoa() and ultoa() to print() 2019-07-18 00:45:46 +02:00
Jesper Gravgaard
9e66c01b6c Changed RADIX enum values. 2019-07-17 23:46:07 +02:00
Jesper Gravgaard
31ede3c794 Added utoa() implementation handling binary/octal/decimal & hexadecimal. 2019-07-17 23:38:09 +02:00
Jesper Gravgaard
aefa5c9f49 Added test example of sub-optimal ASM generated for sub-structs member access of a struct through a pointer. #226 2019-07-16 23:14:14 +02:00
Jesper Gravgaard
bef7663023 Optimized & minimized spline sample program. Added test demonstrating struct array initializer problem #223 2019-07-16 22:32:41 +02:00
Jesper Gravgaard
33b506902f Optimized & minimized spline sample program. Found a few TODO's regarding struct unwinding. 2019-07-16 22:03:16 +02:00
Jesper Gravgaard
eba674bd44 Added spline sample. Added many fragments. Fixed error in line where from&to are the same. Fixed cast to dword/sdword. Fixed unwinding of members that are themselves structs. Closes #222 2019-07-16 21:16:00 +02:00
Jesper Gravgaard
dd8ccaf186 Added spline test, a bunch of missing fragments and special ror/rol 8 handling. 2019-07-15 23:45:52 +02:00
Jesper Gravgaard
13509b59cb Added optimize option for using a fragment cache. Yields no significant performance benefit. 2019-07-15 09:47:47 +02:00
Jesper Gravgaard
d1333cdbe4 Added a few missing fragments. 2019-07-14 20:40:44 +02:00
jespergravgaard
9264967b3f fixed tests 2019-07-11 06:31:29 +02:00
jespergravgaard
57bbe42711 Fixed problem with small negative constant unsigned words. 2019-07-10 20:54:35 +02:00
jespergravgaard
fd63efafe2 Added a bresenham line routine to singlecolor bitmap bitmap2.kc 2019-07-10 18:43:42 +02:00
jespergravgaard
62d7ecbeff Moved back to malloc() based impl. 2019-07-10 12:07:06 +02:00
jespergravgaard
7a36932c48 Finished bucket-based spiral 2019-07-09 18:13:05 +02:00
jespergravgaard
bafffa14f2 fixed tests 2019-07-09 17:33:20 +02:00
jespergravgaard
91a428d22b Updated to 256 buckets & parametrized screen. 2019-07-09 16:05:55 +02:00
jespergravgaard
bf0d399b2c Working on buckets 2019-07-09 15:03:02 +02:00
jespergravgaard
80e84f3234 Added fragments. Implemented working buckets. 2019-07-09 14:41:29 +02:00
jespergravgaard
a7ac33a653 Changed HEAP to grow down from $a000. Fixed inner increment problem. Closes #216 2019-07-09 11:40:56 +02:00
jespergravgaard
b5222c7929 Fixed tests. 2019-07-09 00:51:54 +02:00
jespergravgaard
f8b4dde791 Added fragments - fixed object equality problem when incrementing complex expressions of non-byte type. 2019-07-09 00:31:44 +02:00
jespergravgaard
0e59591d6c Improved output from -Sc option adding C-code comments to the ASM. 2019-07-08 16:43:10 +02:00
jespergravgaard
bf60fab6d0 Removed segment ID from default log. 2019-07-08 12:04:44 +02:00
jespergravgaard
b053acf39b Fixed fragment tests 2019-07-07 00:39:34 +02:00
jespergravgaard
1d092962b3 Added center-based plasma, some fragments and some synth rules. 2019-07-07 00:17:00 +02:00
jespergravgaard
b05160bfff Made char (without sign qualifier) unsigned as allowed by standard C. Closes #204 2019-07-06 11:24:16 +02:00
jespergravgaard
6f4a1f0555 Tetris NPE has been fixed. 2019-07-06 11:00:15 +02:00
jespergravgaard
c5f1ec7d8a Added program that shows a spiral on the screen. 2019-07-06 10:32:25 +02:00
jespergravgaard
966773ed2b Fixed error where global variable live ranges where ignored by ZP coalesce. 2019-07-06 00:48:45 +02:00
jespergravgaard
e64659025e Merged optimizations. 2019-07-05 06:56:24 +02:00