Irmen de Jong
5d4bfffc7e
float.rndseedf() now takes float seed value and is consistent for all CBM compilation targets
2022-11-06 22:53:57 +01:00
Irmen de Jong
7315b581ce
added gfx2.pget(x,y) to get the pixel color value
2022-11-06 13:40:55 +01:00
Irmen de Jong
38efaae7b2
ir/vm: syscall params in high base register to avoid push/pop
2022-11-06 12:52:09 +01:00
Irmen de Jong
469e042216
vm: replaced prog8_lib.string_compare and others with syscalls
2022-11-04 23:12:13 +01:00
Irmen de Jong
0f1a4b9d8f
fixed certain type check error when passing boolean value to ubyte function parameter
...
fixed virtual machine string comparison syscall
2022-11-03 23:06:03 +01:00
Irmen de Jong
7303c00296
vm: prog8lib.wordarray_contains() fixed
2022-11-03 22:48:47 +01:00
Irmen de Jong
562d722ad5
codegen: added missing codegen for float array inplace modification
2022-11-03 20:08:46 +01:00
Irmen de Jong
144c1ba3a6
ir: fix float instruction value in formatspec
2022-11-03 19:08:38 +01:00
Irmen de Jong
dc0edc4c2b
break also in for
2022-10-29 23:34:59 +02:00
Irmen de Jong
434515d957
fix: array[x] = ~array[x] no longer crashes the codegen
2022-10-27 23:56:38 +02:00
Irmen de Jong
e9a4a905ef
preparing to fix the array indexing compiler issue
2022-10-26 23:53:17 +02:00
Irmen de Jong
e94bf4c63c
replace rnd()/rndw() builtin functions by regular routines in math module
2022-10-22 17:02:43 +02:00
Irmen de Jong
ec5adffdc2
rnd()/rndf() routines can now be seeded with new rndseed()/rndseedf() routines. fixes #80
2022-10-22 13:34:22 +02:00
Irmen de Jong
53b0b562e6
fix check for routine that returns multiple values but in status bit. Fixes #79
2022-10-19 23:23:49 +02:00
Irmen de Jong
39d6d2857e
ir: change inline binary a bit
2022-10-04 00:57:08 +02:00
Irmen de Jong
af6be44676
ir: adding register usage inspections
...
fix compiler problems with untrimmed inlined asm, and when only a single return statement is present in a subroutine
2022-09-30 20:25:00 +02:00
Irmen de Jong
5a8f97a0b6
ir: adding last missing features to be able to encode all of Prog8
2022-09-30 16:01:00 +02:00
Irmen de Jong
0d4dd385b8
added '%ir' to write inline IR code, '%asm' is now only for real 6502 assembly.
...
(%ir is probably only used in the library modules for the virtual machine target)
2022-09-30 15:12:26 +02:00
Irmen de Jong
7c1bdfe713
ir: uninitialized vars remain empty, bss section classifier (unused for now as there are no segements yet)
2022-09-28 16:56:50 +02:00
Irmen de Jong
1d2ce2cbeb
consolidate IR line parse function
2022-09-27 18:02:57 +02:00
Irmen de Jong
1a56743bb1
fix IR repeat loop codegen when amount is 0
2022-09-25 20:48:17 +02:00
Irmen de Jong
ca2fb6cef3
IR no longer depends on VM syscalls but has its own syscall list for the few builtin functions that still require it
2022-09-23 14:27:51 +02:00
Irmen de Jong
11d87e4725
VM: support cpu registers
2022-09-19 17:13:46 +02:00
Irmen de Jong
627ed51a1b
IR: mem mapped vars and memory slabs
2022-09-19 15:20:40 +02:00
Irmen de Jong
2f3e7d1c27
IR support for storing incbins and romsubs
2022-09-17 16:07:41 +02:00
Irmen de Jong
0e831d4b92
fix superfluous usage of addressOf()
2022-09-16 00:31:04 +02:00
Irmen de Jong
6428ced157
added subroutine params to IRSubroutine
2022-09-13 23:06:05 +02:00
Irmen de Jong
30a42ec1bd
IR tweak
2022-09-13 23:06:05 +02:00
Irmen de Jong
aacea3e9db
incbin in IR
2022-09-13 23:06:05 +02:00
Irmen de Jong
6886b61186
also output inline asm chunks
2022-09-13 23:06:05 +02:00
Irmen de Jong
0744c9fa29
properly flatten label names for the IR code
2022-09-13 23:06:05 +02:00
Irmen de Jong
502a665ffc
getting address-of into IR without allocations
2022-09-13 23:06:05 +02:00
Irmen de Jong
3c315703c0
making IR file reader
2022-09-13 23:06:05 +02:00
Irmen de Jong
12ed07a607
comments
2022-09-13 23:06:05 +02:00
Irmen de Jong
97f4316653
rename IR classes
2022-09-13 23:06:05 +02:00
Irmen de Jong
a182b13e5a
fixup for memoryslabs
2022-09-13 23:06:05 +02:00
Irmen de Jong
80b630a1e4
added memoryslabs to symboltable
2022-09-13 23:06:05 +02:00
Irmen de Jong
475efbe007
steps to make actual IR based on VM code. For now, as experimental codegen.
2022-09-13 23:06:05 +02:00
Irmen de Jong
176ec8ac7d
fix 6502 codegen bug: complex comparison expression is evaluated wrong.
...
Fixed by reintroducing splitting of comparison expression in if statements by using a temporary variable and/or register to precompute left/right values.
2022-08-23 00:05:57 +02:00
Irmen de Jong
fc0a0105b3
move memoryslab administration from allocator to symboltable
2022-08-21 19:48:56 +02:00
Irmen de Jong
7ef4ddf0f3
fixed operator precedence: bitwise must come before comparisons
2022-08-14 12:34:00 +02:00
Irmen de Jong
0aa0ec5abd
fix c64 zeropage locations of cx16 virtual registers
2022-08-13 00:14:19 +02:00
Irmen de Jong
44ee4b989f
optimize code for logical expressions more if right operand is simple
2022-08-12 00:49:40 +02:00
Irmen de Jong
18790d867c
optimize conditional expression WORD & $ff00 to just msb(WORD)&$ff
2022-08-12 00:21:44 +02:00
Irmen de Jong
d6b8936376
fix mkword(@(ptr), 0) wrong asm
2022-08-11 23:01:19 +02:00
Irmen de Jong
4d840c7db8
optimized mkword(0, X)
2022-08-11 22:51:09 +02:00
Irmen de Jong
4d2b21816d
optimized uword <<8 and >>8
2022-08-11 22:25:15 +02:00
Irmen de Jong
2d34fdd28f
in a block marked option force_output, make all subroutines in asm use .block rather than .proc
...
this fixes some obscure assembly issues where subroutines were omitted from the output program by 64tass
2022-08-10 21:28:40 +02:00
Irmen de Jong
68abda1219
fix a few small compiler errors (removing functioncall, removing block, assigning virtual register return value)
2022-08-09 23:38:29 +02:00
Irmen de Jong
f778f08f76
tweak
2022-08-08 21:09:49 +02:00