Irmen de Jong
df1793efbf
fixed: word << 12 is suddenly an uword (with optimizer on)
2022-11-15 03:00:41 +01:00
Irmen de Jong
836a2700f2
func(x>>1) no longer uses slow stack eval
2022-11-15 02:49:40 +01:00
Irmen de Jong
8f3aaf77a1
fix optimizer hanging on uword xx :: xx >>= 8 / xx=msb(xx)
2022-11-15 01:40:13 +01:00
Irmen de Jong
00c059e5b1
adding cx16/adpcm example
2022-11-15 01:17:28 +01:00
Irmen de Jong
b465fc5aaf
fix bug in word array containment check (prog8_lib.containment_wordarray) that could hang the loop
2022-11-12 23:19:01 +01:00
Irmen de Jong
2d78eaa48d
fix gfx2 text color, added cx16 snow example
2022-11-12 22:08:07 +01:00
Irmen de Jong
d08451bccc
ir: Block can now contain inline binary
2022-11-12 20:17:23 +01:00
Irmen de Jong
267b6f49b5
IRFileReader parses the p8ir file with xml parser
2022-11-12 16:51:20 +01:00
Irmen de Jong
e6688f4b9d
clearer error for VM limitation cannot load label address as value
2022-11-12 13:45:02 +01:00
Irmen de Jong
9d7b9771c2
p8ir file format is now valid XML
2022-11-11 23:35:52 +01:00
Irmen de Jong
3dcf628fdb
fixed subroutine name shadow check
2022-11-10 22:51:37 +01:00
Irmen de Jong
e614e9787a
ir: write values as hex into p8ir file
2022-11-08 21:59:05 +01:00
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
207cdaf7a4
fix kefrenbars example (use gfx2 instead of kernal routines)
2022-11-06 17:33:30 +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
fc55b34d84
ir: fix asmsub multi-value return codegen
2022-11-03 22:29:41 +01:00
Irmen de Jong
6f67fc0e02
ir: get rid of '_' symbol prefix
2022-11-03 21:54:53 +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
06b032af91
refactor
2022-11-03 00:20:31 +01:00
Irmen de Jong
e094785cbd
ir: fix unused code remover
2022-11-02 23:16:51 +01:00
Irmen de Jong
e7408224ac
ir: remove position tracking from codechunk for now
2022-11-02 22:12:42 +01:00
Irmen de Jong
e67c05c274
ir: fix asmsub contents not appearing in IR file
2022-11-02 20:50:51 +01:00
Irmen de Jong
890f55f91a
fixup compiler internals diagram
2022-10-31 00:39:43 +01:00
Irmen de Jong
5efe2b027a
ir: fix chunk linkage in optimizer
2022-10-30 23:42:41 +01:00
Irmen de Jong
5b6569d0f9
ir: fix overwriting chunk label
2022-10-30 19:03:02 +01:00
Irmen de Jong
67a36d8d31
more robust 'return' statement checks in subroutines
2022-10-30 14:41:28 +01:00
Irmen de Jong
7cc3cc3990
ir: fix non-code chunk linkage
2022-10-30 12:55:06 +01:00
Irmen de Jong
b718b12083
ir/vm fix chunk linkage
2022-10-26 00:12:56 +02:00
Irmen de Jong
cfa7258ff4
various
2022-10-25 23:18:42 +02:00
Irmen de Jong
585009ac5c
ir: fix syscall numbers and more
2022-10-24 01:57:37 +02:00
Irmen de Jong
30ee65fd14
ir: ensure that block and sub labels are also on the first chunk in said block/sub
2022-10-23 18:54:08 +02:00
Irmen de Jong
fabae6e970
ir: fix handling of labeled chunks
2022-10-16 23:53:17 +02:00
Irmen de Jong
a9f9c40d8a
ir: fix handling of labeled chunks
2022-10-13 00:56:44 +02:00
Irmen de Jong
6fc89607d3
ir: moving to labeled chunks, no more IRLabel nodes
2022-10-07 00:34:56 +02:00
Irmen de Jong
2340760f53
rename
2022-10-04 22:54:14 +02:00
Irmen de Jong
e7682119e0
ir: count register uses
2022-10-02 15:56:06 +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
94f0f3e966
ir: join code chunks
2022-09-30 02:47:33 +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
e7a3a89bfb
fix windows issue
2022-09-27 22:41:48 +02:00
Irmen de Jong
7ea7e63f44
use require() more often
2022-09-27 18:27:55 +02:00
Irmen de Jong
1d2ce2cbeb
consolidate IR line parse function
2022-09-27 18:02:57 +02:00
Irmen de Jong
06cf2e0bd7
vm: fix memory slabs (bsieve example)
2022-09-27 16:32:44 +02:00
Irmen de Jong
9d219ae4b9
refactor
2022-09-27 03:32:39 +02:00
Irmen de Jong
71f5a6c50e
remove p8virt from compiler diagram
2022-09-27 02:52:29 +02:00
Irmen de Jong
90b2be2bf4
vm: new memory initialization of array vars
2022-09-27 02:43:50 +02:00
Irmen de Jong
db1aa8fcbd
vm: new translation of IRProgram into vm program list
2022-09-27 01:50:00 +02:00
Irmen de Jong
11c000f764
moved codeGenVirtual module into virtualmachine module
2022-09-26 20:00:40 +02:00
Irmen de Jong
4d6dcbd173
ir: consolidate IRCodeInstruction and Instruction
2022-09-26 19:46:44 +02:00
Irmen de Jong
0da117efd2
vm: get rid of .p8virt file and cruft
2022-09-26 19:28:40 +02:00
Irmen de Jong
533c368e32
make IRFileReader's file source more general
2022-09-26 14:47:28 +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
1d65d63bd9
ir: making sure all names are scoped properly. textelite now runs in vm
2022-09-25 18:02:35 +02:00
Irmen de Jong
dda19c29fe
vm: fix symbols to be case sensitive properly in p8virt assembler
2022-09-25 15:51:50 +02:00
Irmen de Jong
ca41669f4f
vm: fix scoped name in address-of inside array
2022-09-24 18:26:35 +02:00
Irmen de Jong
0e1886e6bd
vm: fix nested label prefixing
2022-09-24 16:00:25 +02:00
Irmen de Jong
c26e116f0e
vm: fix crashes when array contains pointers/strings
2022-09-24 14:42:07 +02:00
Irmen de Jong
5c9c7f2c5e
adding more complex vm examples
2022-09-23 14:56:06 +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
46dac909ef
vm/math.p8: complete the sin and cos routines
2022-09-22 15:49:19 +02:00
Irmen de Jong
b1e4347e10
fix compiler crash sometimes when casting byte to word
2022-09-22 13:00:47 +02:00
Irmen de Jong
97aa91c75e
removed 16 bits sin/cos routines from math library (sin16, sin16r etc)
2022-09-22 12:55:00 +02:00
Irmen de Jong
4f8fb32136
some docs about compiler internal architecture
2022-09-21 17:34:52 +02:00
Irmen de Jong
e0fbce0087
few more unittests for IR
2022-09-21 02:59:36 +02:00
Irmen de Jong
fb22f78fb3
added '-keepIR' option to save the IR file if it's generated.
2022-09-20 12:30:22 +02:00
Irmen de Jong
5167fdb3f0
docs
2022-09-20 04:10:49 +02:00
Irmen de Jong
b4352ad38b
refactor IR codegen into separate module
2022-09-19 19:24:24 +02:00
Irmen de Jong
d07d00fa41
Join codeAst and codeCore modules
2022-09-19 17:28:18 +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
c8f3bfa726
vm assembler now understands simple indexed addresses (symbol+number)
2022-09-18 02:17:42 +02:00
Irmen de Jong
3091e3a1c8
IR support for instructions operating on cpu regs
2022-09-18 01:51:04 +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
7294ec9a3c
working on address-of
2022-09-15 22:44:33 +02:00
Irmen de Jong
e34bab9585
change syntax of address-of in p8virt code to &X, instead of {X}
2022-09-13 23:28:52 +02:00
Irmen de Jong
6886b61186
also output inline asm chunks
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
c6c5ff2089
added joystick controls to cx16 tehtriz
2022-08-23 18:11:35 +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
dcdd4b3255
found bug in comparison expr codegen
2022-08-22 23:16:56 +02:00
Irmen de Jong
bb5ffb24a8
add IDEA antlr parser build info to documentation
2022-08-21 13:32:31 +02:00
Irmen de Jong
6454bf8ec4
added mouse cursor to amiga example
...
slightly sped up text rendering in gfx2 highres mode
2022-08-16 04:25:59 +02:00
Irmen de Jong
f37a822725
move
2022-08-14 13:17:03 +02:00
Irmen de Jong
f249ccd414
added asm optimization for same pointer index
2022-08-14 12:50:46 +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
d8e18df3a1
added c64 starfield example
2022-08-14 12:02:23 +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
b6eef3612f
added some ported bench8 test programs
2022-08-12 22:08:27 +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