Irmen de Jong
50343a18af
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/IfElseAsmGen.kt
2024-11-08 19:06:44 +01:00
Irmen de Jong
9864abd393
romsub keyword is now extsub
2024-11-06 22:14:53 +01:00
Irmen de Jong
c702c4a6df
internal rename of romsub to extsub
2024-11-06 21:42:16 +01:00
Irmen de Jong
4152f7e88c
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/IfElseAsmGen.kt
# compilerAst/src/prog8/ast/expressions/AstExpressions.kt
2024-11-06 01:43:57 +01:00
Irmen de Jong
77e376f6bf
romsub @bank now also accepts a variable so the bank can be dynamic
2024-11-06 00:02:36 +01:00
Irmen de Jong
85e87dfe2e
consolidate @rombank and @rambank into just @bank
2024-11-03 21:15:11 +01:00
Irmen de Jong
155896c4c7
added @rombank and @rambank bank number tags on romsubs
...
on cx16 and c128 targets the compiler then automatically inserts a CALLFAR instead of a regular JSR to automatically do the bank switching.
2024-11-03 18:19:31 +01:00
Irmen de Jong
178e60bba0
fix ast source gen for romsub
2024-11-03 15:04:53 +01:00
Irmen de Jong
7cfb33a448
tweak & fix if expression with word condition
2024-11-02 22:01:57 +01:00
Irmen de Jong
b14012c9bc
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt
# codeGenIntermediate/src/prog8/codegen/intermediate/AssignmentGen.kt
# codeGenIntermediate/src/prog8/codegen/intermediate/IRCodeGen.kt
# compiler/src/prog8/compiler/astprocessing/AstPreprocessor.kt
# compiler/test/TestZeropage.kt
# compilerAst/src/prog8/ast/statements/AstStatements.kt
# virtualmachine/src/prog8/vm/VirtualMachine.kt
2024-11-02 04:57:28 +01:00
Irmen de Jong
3b798097b9
added memtop to machine definition and asm source code check
...
added %memtop directive
2024-11-02 00:59:07 +01:00
Irmen de Jong
64ea72ed4d
tweak plot
2024-11-01 21:56:27 +01:00
Irmen de Jong
4a47e15b1c
fix IR if expression sometimes lacking a cmpi after calculation of the condition value
...
VM/IR: add a returni immediate value return instruction to replace certain returnr's
2024-11-01 01:04:16 +01:00
Irmen de Jong
a7a5dda378
merge master
2024-10-26 22:01:56 +02:00
Irmen de Jong
1f2d46628e
remove %option align_xxx (block level alignment, as we now have better alternatives)
2024-10-26 21:18:34 +02:00
Irmen de Jong
c9535049c8
%align directive and @align64
2024-10-26 20:58:35 +02:00
Irmen de Jong
1cd754f05d
adding @alignword/page on individual variables
2024-10-26 17:00:38 +02:00
Irmen de Jong
6bc1fc4464
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/optimize/Optimizer.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
2024-10-23 21:53:21 +02:00
Irmen de Jong
fdd18c615c
more ifexpresssion codegen tweaks
2024-10-23 21:04:55 +02:00
Irmen de Jong
47c1bba41d
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
# compiler/src/prog8/compiler/astprocessing/IntermediateAstPostprocess.kt
# compiler/test/ast/TestVariousCompilerAst.kt
2024-10-23 00:29:38 +02:00
Irmen de Jong
c14f6cfc2b
more optimal if expression code
2024-10-22 23:49:24 +02:00
Irmen de Jong
b23f1f4b72
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/core/BuiltinFunctions.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# compiler/src/prog8/compiler/astprocessing/IntermediateAstPostprocess.kt
# compiler/test/ast/TestIntermediateAst.kt
2024-10-21 01:08:11 +02:00
Irmen de Jong
a6159702da
defers are now only registered/called when flow of control actually reached the defer statement
...
a defer statement sets its corresponding bit in a bitmask that is shifted in the defer handler routine to see what defer blocks to call.
2024-10-21 00:55:51 +02:00
Irmen de Jong
db0c77c09e
rename
2024-10-19 23:01:41 +02:00
Irmen de Jong
af7cc9c761
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/ast/AstExpressions.kt
# codeCore/src/prog8/code/core/BuiltinFunctions.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# compiler/test/ast/TestIntermediateAst.kt
2024-10-19 22:45:39 +02:00
Irmen de Jong
9851d14fb9
added if expression: ubyte a = if b>0 44 else 55
...
it doesn't generate the best code yet, like regular ifs do.
2024-10-19 15:34:04 +02:00
Irmen de Jong
d5fc69d3e4
fix instruction index error in optimizer
2024-10-19 14:45:53 +02:00
Irmen de Jong
d8f1822c12
fixes
2024-10-18 20:32:46 +02:00
Irmen de Jong
ce7d094adb
Zig-like "defer" to clean up stuff when leaving the scope of the current routine.
2024-10-18 01:30:20 +02:00
Irmen de Jong
c218234efe
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/SymbolTable.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/ProgramAndVarsGen.kt
# compiler/test/TestSymbolTable.kt
# examples/test.p8
# intermediate/src/prog8/intermediate/IRFileReader.kt
# intermediate/src/prog8/intermediate/IRSymbolTable.kt
# intermediate/src/prog8/intermediate/Utils.kt
# virtualmachine/src/prog8/vm/VmProgramLoader.kt
2024-10-16 22:40:45 +02:00
Irmen de Jong
38ef394e15
IR codegen: global vars with numeric initialization value are now also put into the VARIABLESWITHINIT section rather than requiring explicit code instructions to initialize them in INITGLOBALS.
...
Note that something similar, such as putting those variables inline in the program initialized with their value and all, cannot be done for the 6502 codegen: the program needs a mechanism to reset ALL variables when it runs a second time.
2024-10-16 22:15:51 +02:00
Irmen de Jong
0f72bdb4a2
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/core/BuiltinFunctions.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# codeGenIntermediate/src/prog8/codegen/intermediate/BuiltinFuncGen.kt
# codeOptimizers/src/prog8/optimizer/ConstantIdentifierReplacer.kt
# compiler/src/prog8/compiler/astprocessing/AstChecker.kt
# compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt
# compiler/test/ast/TestAstChecks.kt
2024-10-13 21:48:33 +02:00
Irmen de Jong
e9edffa9f0
remove support for array-to-array assignments (other than initialization of variable declaration)
...
Just use an explicit sys.memcopy(src, dest, sizeof(dest)) or assign array members individually.
2024-10-13 20:02:43 +02:00
Irmen de Jong
7afd716fab
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/core/BuiltinFunctions.kt
# compiler/src/prog8/compiler/astprocessing/AstChecker.kt
# examples/test.p8
2024-10-08 22:58:26 +02:00
Irmen de Jong
eaa22a9d13
added callfar2() builtin function that allows to set A,X,Y and Carry arguments.
2024-10-08 21:36:04 +02:00
Irmen de Jong
5890a1ca1e
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# examples/test.p8
2024-09-14 23:18:38 +02:00
Irmen de Jong
c7b1e8d772
fixed a variable scopedname issue where it took the fully scoped name instead of just the local name
...
this made 64tass not strip out that code if it was unused
2024-09-14 23:17:26 +02:00
Irmen de Jong
f45fd517ac
fix merge
2024-09-12 23:53:36 +02:00
Irmen de Jong
a737547fe9
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/ast/AstExpressions.kt
# codeCore/src/prog8/code/optimize/Optimizer.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/ForLoopsAsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
# codeGenIntermediate/src/prog8/codegen/intermediate/ExpressionGen.kt
# codeGenIntermediate/src/prog8/codegen/intermediate/IRCodeGen.kt
# codeOptimizers/src/prog8/optimizer/StatementOptimizer.kt
# compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt
# compiler/src/prog8/compiler/astprocessing/VariousCleanups.kt
# docs/source/todo.rst
# examples/test.p8
2024-09-12 23:32:23 +02:00
Irmen de Jong
ac0c8a68f6
IR: Improve codegen for for loops downto 0/1
2024-09-12 23:00:32 +02:00
Irmen de Jong
5986dcdd2f
add new containment check codegen for IR
2024-09-12 22:04:20 +02:00
Irmen de Jong
255c5bfaca
improve containment check for few values
2024-09-11 03:24:30 +02:00
Irmen de Jong
4e98fb75d6
support assigning multiple return flags from asmsub in 6502 codegen
2024-09-09 22:56:40 +02:00
Irmen de Jong
8f5d42dbc2
more tests and some cleanups/fixes
2024-09-08 23:01:49 +02:00
Irmen de Jong
759babb4c1
rename back to DataType
2024-09-08 22:59:08 +02:00
Irmen de Jong
5cbf1cd2b1
cleanup imports
2024-09-08 22:58:36 +02:00
Irmen de Jong
c41dc98936
making datatype more capable (subtypes)
2024-09-08 22:58:36 +02:00
Irmen de Jong
e80c22275d
making datatype more capable (subtypes)
2024-09-08 22:58:35 +02:00
Irmen de Jong
74e305b90c
making datatype more capable (subtypes)
2024-09-08 22:57:49 +02:00
Irmen de Jong
59a2fec176
fix IR containment check
2024-09-08 21:49:13 +02:00