Commit Graph

299 Commits

Author SHA1 Message Date
Irmen de Jong
922033c1b2 main block element order now remains the same as in source 2022-11-16 00:32:00 +01:00
Irmen de Jong
00c059e5b1 adding cx16/adpcm example 2022-11-15 01:17:28 +01:00
Irmen de Jong
d08451bccc ir: Block can now contain inline binary 2022-11-12 20:17:23 +01:00
Irmen de Jong
d8e785aed0 ir: fix too greedy chunk removal 2022-11-12 19:56:54 +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
e614e9787a ir: write values as hex into p8ir file 2022-11-08 21:59:05 +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
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
06b032af91 refactor 2022-11-03 00:20:31 +01:00
Irmen de Jong
3603140114 ir: fix unused code remover 2022-11-02 23:54:52 +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
b22804efaf ir: fix inlineasm linking 2022-10-31 23:59:33 +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
a5ef353484 ir: fix memory mapped var as for loop counter 2022-10-30 14:54:47 +01:00
Irmen de Jong
224f490455 Merge branch 'master' into labeledchunks
# Conflicts:
#	codeGenIntermediate/src/prog8/codegen/intermediate/AssignmentGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/ExpressionGen.kt
#	examples/test.p8
2022-10-29 18:26:09 +02:00
Irmen de Jong
5b35232ab4 fix "fpReg1 out of bounds" crash for vm target for in-place float array assignment. #85 2022-10-29 17:04:39 +02: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
76428b16f0 Merge branch 'master' into labeledchunks
# Conflicts:
#	codeGenIntermediate/src/prog8/codegen/intermediate/BuiltinFuncGen.kt
#	docs/source/todo.rst
#	examples/test.p8
#	virtualmachine/src/prog8/vm/VirtualMachine.kt
2022-10-23 12:19:02 +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
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
39d6d2857e ir: change inline binary a bit 2022-10-04 00:57:08 +02:00
Irmen de Jong
7b722a0001 ir: fix count register uses 2022-10-04 00:25:55 +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
94f0f3e966 ir: join code chunks 2022-09-30 02:47:33 +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
90b2be2bf4 vm: new memory initialization of array vars 2022-09-27 02:43:50 +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
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
0e1886e6bd vm: fix nested label prefixing 2022-09-24 16:00:25 +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
ab00822764 move IR optimizer to IR Codegen module 2022-09-19 19:41:43 +02:00
Irmen de Jong
b4352ad38b refactor IR codegen into separate module 2022-09-19 19:24:24 +02:00