Commit Graph

510 Commits

Author SHA1 Message Date
Irmen de Jong
abcdfd8e28 optimize postincrdecr on memory a bit 2024-02-03 22:33:27 +01:00
Irmen de Jong
b0f5b6925d getting rid of pointer[idx] in ast, instead always use @(ptr+idx) 2024-02-03 19:22:04 +01:00
Irmen de Jong
9f8e61789a fix 65c02 codegen for certain in-place byte bitwise invert 2024-01-31 23:55:43 +01:00
Irmen de Jong
ef198f1493 fix for certain invalid expression evaluation code.
it no longer reuses the same temporary variable all the time.

todo
2024-01-31 21:18:21 +01:00
Irmen de Jong
48ef856c0b identified wrong expr eval code - still need solution. Crash for now. 2024-01-30 23:00:50 +01:00
Irmen de Jong
0800033b47 fixed split-word array in-place element +/- (other operators not yet...) 2024-01-28 22:30:45 +01:00
Irmen de Jong
64c132ee0a changed -breakinstr option so that you now specify the exact instruction to use for a %breakpoint.
also fixed a IR issue with x=not x.
2024-01-22 22:01:47 +01:00
Irmen de Jong
87c46ba730 check boolean array size mismatch.
check for weird string assignment.
check for X16 problematic cpu instructions rmb, smb, bbr, bbs.
tweak number node equality wrt bool type
2024-01-21 19:15:22 +01:00
Irmen de Jong
b3d98be862 oops, removed a bit too much when getting rid of the noshortcircuit code 2024-01-18 22:00:57 +01:00
Irmen de Jong
fdbbd181ea fixes for address-of uword pointer array expressions 2024-01-17 22:51:15 +01:00
Irmen de Jong
69075376dc get rid of the noshortcircuit fallback 2024-01-17 21:24:41 +01:00
Irmen de Jong
504d1440cc fixed rol(),rol2(),ror(),ror2() 2024-01-17 21:02:17 +01:00
Irmen de Jong
66a836d094 added support for reverse() on split word arrays 2024-01-16 00:52:09 +01:00
Irmen de Jong
80095f4962 added support for any() on split word arrays 2024-01-15 23:51:19 +01:00
Irmen de Jong
828d83dbef loadScaledArrayIndexIntoRegister(): useless type arg removed 2024-01-15 22:19:52 +01:00
Irmen de Jong
7de665d1e4 support for split wordarrays rol/ror and rol2/ror2
optimized rol and ror codegen

optimize/fix ror/ror2/rol/rol2 on word arrays
2024-01-15 03:22:37 +01:00
Irmen de Jong
0a356ba73a added containment check of float arrays 2024-01-14 14:14:09 +01:00
Irmen de Jong
0c1018ec61 dt error details 2024-01-12 17:34:19 +01:00
Irmen de Jong
d85c347a6c optimize /256 more, and fixed a unsigned byte word cast error 2024-01-07 02:34:05 +01:00
Irmen de Jong
8e6b91cb9e some optimizations 2024-01-06 00:44:00 +01:00
Irmen de Jong
334e6dca28 added string.contains().
fixed string and array containment check for length 1.
2024-01-05 20:46:26 +01:00
Irmen de Jong
bfd3edb617 fix expression evaluation bug where intermediate values were overwritten, yielding the wrong result 2024-01-04 21:04:11 +01:00
Irmen de Jong
19a2110ba2 fix exit() now actually correctly setting the return code in A
also, moved some cleanup stuff such as CLRCHN from exit() to the cleanup routine that is always called.
finally, also call the cleanup routine when  %option no_sysinit is used
2024-01-04 00:43:35 +01:00
Irmen de Jong
242a3eec63 fix data type difference error on range from and to values 2024-01-03 21:46:22 +01:00
Irmen de Jong
1e1f444cab cleanups.
also checked that value(12) < x < value(100) is indeed properly shortcircuited if x is 12 or less
2023-12-30 04:34:07 +01:00
Irmen de Jong
265e7aefbf clean up unused codegen for logical ops on words, also fix no-shortcircuit exception 2023-12-30 04:06:02 +01:00
Irmen de Jong
1c55a6c6dc shortcutting part one 2023-12-30 03:54:12 +01:00
Irmen de Jong
8f18b5b8a7 keep distinction between logical and bitwise boolean operators 2023-12-30 01:08:42 +01:00
Irmen de Jong
ccc11e49d2 fix asmgen for uword shift right 8 or more bits 2023-12-29 05:06:09 +01:00
Irmen de Jong
5d88717f32 fix non-existing instructions txy/tyx, oops 2023-12-29 03:27:35 +01:00
Irmen de Jong
9c1b11d605 some WARN messages are now INFO 2023-12-28 14:20:47 +01:00
Irmen de Jong
37fcde30d6 constants have p8c_ prefix instead of p8v_ in the asm 2023-12-28 05:28:32 +01:00
Irmen de Jong
2eb137618e refactor block options 2023-12-26 22:13:08 +01:00
Irmen de Jong
0d44492086 push,pushw,pop and popw are no longer built-in functions but regular routines in sys 2023-12-26 14:47:31 +01:00
Irmen de Jong
8ae435549d added -slabshigh N and -slabsgolden for memory() slabs 2023-12-23 20:45:30 +01:00
Irmen de Jong
9b113c0cbb added -varsgolden to put BSS into Golden Ram at $0400 2023-12-23 20:11:50 +01:00
Irmen de Jong
0e0fac8c4b BSSHIGHRAM_END more clearly defined (to be inclusive) 2023-12-23 19:05:06 +01:00
Irmen de Jong
ad9eaeafeb call now returns a word value 2023-12-22 22:24:11 +01:00
Irmen de Jong
66d939df0d docs about new asm symbol prefixes 2023-12-20 22:37:46 +01:00
Irmen de Jong
6bc079c7b7 more asm symbol prefixing: variables with p8v_, subroutines with p8s_ etc
labels with p8l_ . All this to avoid symbol clashes in the generated assembly code.
Everything got its own distinguishing prefix so we're done with it once and for all and have only 1 breaking change moment.
2023-12-20 22:20:59 +01:00
Irmen de Jong
69f6afe420 block names in asm now prefixed with p8b_ (instead of p8_)
as part of fixing var versus block symbol conflict handling
2023-12-19 23:00:20 +01:00
Irmen de Jong
ae66fcac1e added call builtin function for indirect JSR 2023-12-17 15:45:28 +01:00
Irmen de Jong
eba0bde6f3 Merge branch 'optimize-st'
# Conflicts:
#	examples/test.p8
2023-12-17 02:11:01 +01:00
Irmen de Jong
01c2112881 remove PtJump label, just use identifier with dummy 2023-12-13 04:16:49 +01:00
Irmen de Jong
a546c2247d optimize if-else handling of asmsub boolean result in status flags 2023-12-13 04:03:21 +01:00
Irmen de Jong
0da9142009 asm: also work for asmsub that return N or Z flag (Carry already worked) 2023-12-13 02:11:15 +01:00
Irmen de Jong
00b32f64e6 tweak for,sort,reverse st use 2023-12-12 20:26:45 +01:00
Irmen de Jong
f97b3f23e2 optimize symbol table for IR 2023-12-12 19:26:27 +01:00
Irmen de Jong
8e4319cd5a module directive %encoding to set the text encoding for that whole file (iso, petscii, etc.) 2023-12-06 23:54:08 +01:00
Irmen de Jong
28c1b208c1 optimized calls for float *10 and +0.5 2023-12-06 01:18:07 +01:00