Irmen de Jong
0af17cdc33
todo's for division optimizations
2024-07-21 20:32:03 +02:00
Irmen de Jong
d18f2a7bfd
improved codegen for some pointer+index expressions
2024-07-18 23:41:34 +02:00
Irmen de Jong
9046fe8d3a
ringbuffer and pointer optimization todo
2024-07-16 22:59:31 +02:00
Irmen de Jong
78c7ee247a
generate 65c02 TSB/TRB instructions in certain cases
2024-07-16 00:36:00 +02:00
Irmen de Jong
484677b4b1
Get rid of any() and all() builtin functions.
...
Replaced by regular subroutines in the anyall module.
2024-07-06 18:49:03 +02:00
Irmen de Jong
25f25a8767
Get rid of sort() and reverse() builtin functions.
...
Sort() had too many gotchas and reverse() is kinda redundant you can loop in decreasing order through an array too.
2024-07-06 17:07:58 +02:00
Irmen de Jong
43c55b58d2
fix register overwriting for certain subroutine call parameter combinations. Fixes #136
2024-07-02 23:26:34 +02:00
Irmen de Jong
ead8aa7800
asm optimization: bxx+jmp -> opposite bxx
2024-06-29 17:22:57 +02:00
Irmen de Jong
7a9dd1ac9b
optimize trivial 65c02 stack instructions
2024-06-29 15:42:40 +02:00
Irmen de Jong
1c97c22eff
optimize simple word and byte addition/subtraction better
2024-06-29 14:33:42 +02:00
Irmen de Jong
4f8aaf9244
some tweaks and todos
2024-06-26 21:22:40 +02:00
Irmen de Jong
034f27a8dd
added queens example, update kotest lib
2024-06-19 23:57:43 +02:00
Irmen de Jong
c9a4235669
update to kotlin 2.0, fix several code style issues
2024-06-04 01:00:46 +02:00
Irmen de Jong
d3dcd24b4d
add profiler script
2024-05-29 00:56:31 +02:00
Irmen de Jong
fd1e6796ef
correct branch instruction, fixes #137
2024-05-24 20:54:40 +02:00
Irmen de Jong
0dc50a93a4
added @nozp variable flag
2024-05-21 21:53:58 +02:00
Irmen de Jong
c719e274d5
java version tweaks
2024-05-18 20:25:44 +02:00
Irmen de Jong
6e8a89e6f1
optimize const word repeat setup
2024-05-18 16:30:27 +02:00
Irmen de Jong
aa2437cfb8
fix invalid repeat loop when iterations is already in register Y
2024-05-18 15:09:56 +02:00
Irmen de Jong
4a710ecdfc
cleanups
2024-05-17 18:48:04 +02:00
Irmen de Jong
7915dda35f
update libraries
2024-05-12 03:02:54 +02:00
Irmen de Jong
a7247f5b8b
fix boolean expression optimization bug
2024-04-12 21:56:25 +02:00
Irmen de Jong
5d7ddebcad
fix bool to uword cast in 6502 codegen
2024-04-11 00:34:53 +02:00
Irmen de Jong
53df0eb707
cleanups
2024-04-10 22:04:03 +02:00
Irmen de Jong
66a6659a6e
cbm.STOP2() and cbm.GETIN2() convenience routines
2024-04-06 02:16:21 +02:00
Irmen de Jong
88ae3daa42
Merge branch 'refs/heads/master' into multi-assign
...
# Conflicts:
# examples/test.p8
2024-04-06 00:14:41 +02:00
Irmen de Jong
08b8fe01ab
added missing cmp #0 after func()==0
...
cx16: diskio.fastmode() now returns success boolean
2024-04-06 00:04:54 +02:00
Irmen de Jong
98acff802f
better checking for number of return values
...
assignment optimization if return register already is the same as the assignment target
2024-04-04 23:47:33 +02:00
Irmen de Jong
34f3169dda
tweak library routines for multiple return values.
...
cbm:
MEMTOP changed (now also returns nr of banks in A)
STOP2 removed (just use STOP)
RDTIM_safe() added TEST IRQ ENABLE
RDTIM16 changed (internally) TEST IRQ ENABLE
cx16:
screen_mode changed (now also returns width and height in X,Y)
kbdbuf_peek2 removed (just use kbdbuf_peek)
joystick_get changed (presence now returned as bool in Y)
joystick_get2 removed (just use joystick_get)
mouse_pos changed (now properly returns x and y position in R0 and R1)
set_led_brightness changed into set_led_state, with only a boolean on/off argument. There is no variable brightness.
sys.set_leds_brightness() removed. Use cx16.set_led_brightness().
2024-04-04 01:39:19 +02:00
Irmen de Jong
641f6c05d8
allow 'void' as dummy assign target in multi-assignment statements
2024-03-31 23:43:26 +02:00
Irmen de Jong
3e34a3ef72
allow multi-assign to skip any status register result
2024-03-29 23:10:08 +01:00
Irmen de Jong
9a27505315
6502 codegen for multi-assigns
2024-03-25 22:17:31 +01:00
Irmen de Jong
66e7c51064
IR: fix some things related to asmsubs
2024-03-22 21:49:01 +01:00
Irmen de Jong
1fc79ff6dd
implement the missing in-place array operators for split word arrays and numeric operand
2024-03-13 21:16:49 +01:00
Irmen de Jong
820541e427
fixed and optimized pointervar indexed in-place operations
2024-03-11 23:27:48 +01:00
Irmen de Jong
80f39e8097
Merge branch 'booleans'
...
# Conflicts:
# compiler/res/prog8lib/cx16/monogfx.p8
# compiler/res/prog8lib/virtual/monogfx.p8
# compiler/src/prog8/compiler/astprocessing/BoolRemover.kt
# compiler/test/TestTypecasts.kt
# docs/source/todo.rst
# examples/cx16/highresbitmap.p8
# examples/test.p8
# httpCompilerService/src/prog8/http/TestHttp.kt
2024-03-11 01:00:48 +01:00
Irmen de Jong
fc0fae8caf
tweak the redundant beq asm optimizer a bit more
2024-03-09 00:05:06 +01:00
Irmen de Jong
04f7b772a3
lib updates, removed unused and obsolete http and dbus modules
2024-03-05 23:42:35 +01:00
Irmen de Jong
9f1bd2d7d6
asmoptimizer that removes redundant branches on boolean in A
2024-03-05 20:37:15 +01:00
Irmen de Jong
9826d7c494
optimize certain boolean comparisons more
2024-03-05 03:09:53 +01:00
Irmen de Jong
e55cde2a81
more nonstrictbool conversions
2024-03-03 19:43:48 +01:00
Irmen de Jong
da1620807f
fixed all todos in ifelse gen
2024-03-03 12:10:42 +01:00
Irmen de Jong
f39ef8f565
optimize byte comparison assignment to use rol trick instead of branching
2024-03-03 00:01:14 +01:00
Irmen de Jong
fe8b6e820c
getting rid of problematic fallback (infinite recursion)
2024-03-02 23:19:55 +01:00
Irmen de Jong
f29d24e96a
fixup split words array comparisons
2024-03-02 23:19:55 +01:00
Irmen de Jong
620ffe54ec
asm optimizer: don't remove labels. remove redundant cmp/cpx/cpy instructions.
2024-03-02 23:19:53 +01:00
Irmen de Jong
ceaa4cd07d
array issue
2024-03-02 23:19:39 +01:00
Irmen de Jong
af17f903ee
fix that if not fcall() wasn't transformed to a conditional branch instruction
2024-03-02 23:19:39 +01:00
Irmen de Jong
dba0846866
optimize word >, word <=
2024-03-02 23:19:39 +01:00
Irmen de Jong
bed629998a
fix large code for some compares
2024-03-02 23:19:39 +01:00
Irmen de Jong
bc2ede76bf
tweak to byte compares
2024-03-02 23:19:39 +01:00
Irmen de Jong
2a1fec2ed2
fix codegen error for comparisons
2024-03-02 23:19:39 +01:00
Irmen de Jong
b941d6f1e4
new comparison tests
2024-03-02 23:19:39 +01:00
Irmen de Jong
37b346740b
fix 6502 casting uword and float to bool
2024-03-02 23:19:39 +01:00
Irmen de Jong
f5e332daf7
remove redundant IR instructions like SNZ
2024-03-02 23:19:39 +01:00
Irmen de Jong
fe9a9fc5cb
new if tests
2024-03-02 23:19:39 +01:00
Irmen de Jong
a1574a7187
added txt.print_bool, several fixes
2024-03-02 23:19:39 +01:00
Irmen de Jong
006713fe13
optimize boolean to ubyte assignment (skip type cast)
2024-03-02 23:19:39 +01:00
Irmen de Jong
7868e672e0
ifelse more
2024-03-02 23:19:39 +01:00
Irmen de Jong
e1a133c2c0
ifelse more
2024-03-02 23:19:39 +01:00
Irmen de Jong
c77cd0da39
ifelse more
2024-03-02 23:19:39 +01:00
Irmen de Jong
577333f2c4
new ifelse codegen
2024-03-02 23:19:39 +01:00
Irmen de Jong
7d8cdcbfea
more bool fixes and optimizations in codegen
2024-03-02 23:19:39 +01:00
Irmen de Jong
c5c4c6f111
start of new ifelse
2024-03-02 23:19:39 +01:00
Irmen de Jong
acd841dbb6
bool changes in 6502 assignment codegen
2024-03-02 23:19:37 +01:00
Irmen de Jong
6b52ba9397
6502 asmgen
2024-03-02 23:19:20 +01:00
Irmen de Jong
41afeccd51
compiler stuff
2024-03-02 23:19:20 +01:00
Irmen de Jong
bc2b38daf4
added PtBool and other changes to intermediate Ast
2024-03-02 23:19:20 +01:00
Irmen de Jong
f40b7b62bb
updated unit tests and some basic changes for them
2024-03-02 23:19:20 +01:00
Irmen de Jong
c48012c385
tweak ifelse > and <= order
2024-03-02 17:01:31 +01:00
Irmen de Jong
a282b17286
added asm optimizer for <= byte (bcc+beq->bcs)
2024-03-02 15:34:54 +01:00
Irmen de Jong
58d9463f16
consolidate word comparison codegen
2024-03-02 14:00:12 +01:00
Irmen de Jong
047decd552
consolidate byte comparison codegen
2024-03-01 22:21:22 +01:00
Irmen de Jong
4e1686f6e3
fix warnings in gradle build scripts
2024-02-22 10:34:51 +01:00
Irmen de Jong
88458f5355
faster array copy and fix for length 256
2024-02-11 23:57:38 +01:00
Irmen de Jong
8201408f16
fix element size calc when copying array
2024-02-10 22:58:44 +01:00
Irmen de Jong
5522a305ab
add -dumpvars option to dump all allocated variables (zp, normal ram, etc)
2024-02-10 18:42:31 +01:00
Irmen de Jong
d7f72056fc
rest of the array copying
2024-02-10 17:16:06 +01:00
Irmen de Jong
906d9d858c
implementing the array copys
2024-02-10 01:40:36 +01:00
Irmen de Jong
6c8c8e11cc
fix cpu register overwrites when using @(...) arguments to an asmsub
2024-02-09 19:55:35 +01:00
Irmen de Jong
e941d2665a
preparing for new array copy codegen
2024-02-09 18:22:41 +01:00
Irmen de Jong
68669dbef0
fix & of pointervar indexing
2024-02-08 23:03:53 +01:00
Irmen de Jong
6a48de9a9f
IR: fix & of array-element
2024-02-08 21:27:53 +01:00
Irmen de Jong
73ec8c31ad
fix 6502 code for zp pointer lookup clobbering registers.
2024-02-07 22:09:04 +01:00
Irmen de Jong
8485b8429f
optimizing +=1/-=1
2024-02-06 23:49:40 +01:00
Irmen de Jong
358215e4dd
removed postIncrDecr (still allow ++/-- to be parsed into +=1/-=1)
2024-02-06 18:50:08 +01:00
Irmen de Jong
2cadb546d5
optimized in-place memory/pointervar operations some more
2024-02-04 15:17:24 +01:00
Irmen de Jong
8e00408e3e
optimize pointer indexing a bit
2024-02-03 23:24:33 +01:00
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