Commit Graph

141 Commits

Author SHA1 Message Date
Irmen de Jong
92062d056d divmod() now works on multiple data types including float.
divmodw() has been removed
2023-05-02 01:19:53 +02:00
Irmen de Jong
06368ab0a1 sqrt() now works on multiple data types including float.
no need to use floats.sqrtf() anymore
2023-05-02 01:19:53 +02:00
Irmen de Jong
38efe25c68 abs() now works on multiple data types including float.
no need to use floats.fabs() anymore
2023-05-02 01:19:53 +02:00
Irmen de Jong
319079de7a sqrt 2023-05-02 01:19:53 +02:00
Irmen de Jong
025bf900a5 min max docs, added floats.minf() and maxf() 2023-05-02 01:19:53 +02:00
Irmen de Jong
c07eda15b1 adding min() and max() 2023-05-02 01:19:53 +02:00
Irmen de Jong
76a203d4df api change: rename builtin func sqrt16 to sqrtw 2023-05-02 01:19:53 +02:00
Irmen de Jong
3f64782023 c128: remove floats module 2023-04-28 17:48:54 +02:00
Irmen de Jong
f8d35f9502 c128: no FP support 2023-04-28 17:43:42 +02:00
Irmen de Jong
ea78d3ec9a c128: better ZP definition 2023-04-28 17:08:56 +02:00
Irmen de Jong
c3d74f2ae9 fix golden ram area for x16, remove romsub restriction
note: romsubs still won't work in the VM but at least they compile again
2023-04-08 00:40:52 +02:00
Irmen de Jong
f47498888c optimize imports 2023-04-07 22:34:23 +02:00
Irmen de Jong
2d85fd093e Merge branch 'new-expr-codegen'
# Conflicts:
#	codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/BuiltinFuncGen.kt
#	examples/test.p8
2023-03-29 23:56:16 +02:00
Irmen de Jong
d936568b76 added divmod() and divmodw() builtin functions to efficiently compute division and remainder in a single call 2023-03-29 23:46:44 +02:00
Irmen de Jong
729209574e fixing str compares codegen 2023-03-28 20:01:26 +02:00
Irmen de Jong
f28206d989 new attempt 2023-03-28 20:01:26 +02:00
Irmen de Jong
629ed74d09 got rid of rpn deadend code... 2023-03-25 18:45:17 +01:00
Irmen de Jong
01461a196d implementing optimized comparisons 2023-03-25 00:08:21 +01:00
Irmen de Jong
266f6ab919 check 2023-03-22 20:15:24 +01:00
Irmen de Jong
134fd62da8 RPN: better handling of bit shifts 2023-03-21 02:58:26 +01:00
Irmen de Jong
d265271148 fix rpn variable depth clobber and type error 2023-03-20 22:18:10 +01:00
Irmen de Jong
df2d7d4734 fix RPN comparison exprs 2023-03-19 16:08:48 +01:00
Irmen de Jong
374464a1f8 weird condition operator... 2023-03-19 01:32:20 +01:00
Irmen de Jong
6e4ae034b2 more Rpn optimizations 2023-03-19 00:48:12 +01:00
Irmen de Jong
52b560e72d more Rpn optimizations 2023-03-18 19:13:32 +01:00
Irmen de Jong
7b802bfd3d Merge branch 'master' into rpn-expressions
# Conflicts:
#	codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt
2023-03-18 13:39:14 +01:00
Irmen de Jong
f9c4632b8d c64: remove 2 problematic ZP locations from the free list when using floating point 2023-03-18 13:36:19 +01:00
Irmen de Jong
94c06e13f4 implementing Rpn optimizations 2 2023-03-18 12:43:45 +01:00
Irmen de Jong
5b0e1b4f9e a little rpn refactor 2023-03-17 23:04:56 +01:00
Irmen de Jong
8c0a93779b added first implementation of RPN 6502 codegen - all via stackeval still 2023-03-17 22:28:22 +01:00
Irmen de Jong
9241479da4 add "-rpn" command line switch to transform exprs to RPN in codegen 2023-03-17 22:28:22 +01:00
Irmen de Jong
8ffca93cd5 added transform routine for expr -> RPN 2023-03-17 22:28:22 +01:00
Irmen de Jong
7fea0c124a introduce PtRpn node to replace PtBinaryExpression later 2023-03-17 22:28:22 +01:00
Irmen de Jong
44676756ae don't print weird position link for library files 2023-03-17 00:50:17 +01:00
Irmen de Jong
b399b0f182 don't print weird position link for dummy positions 2023-03-16 23:37:33 +01:00
Irmen de Jong
e2c101206c removed a problematic asm optimization step that could result in dysfunctional code when writing to I/O addresses 2023-03-14 22:14:48 +01:00
Irmen de Jong
48fed4e6fb slight tweak to codegenerator backend interface 2023-03-08 00:14:38 +01:00
Irmen de Jong
fd07ae5225 fix various IR file and symboltable issues 2023-03-07 19:40:11 +01:00
Irmen de Jong
448d176c24 fix vm crash on empty string 2023-03-04 15:35:54 +01:00
Irmen de Jong
3114ab87dc add 8 bit sample width support 2023-03-03 17:12:44 +01:00
Irmen de Jong
d282a2d846 remove cx16.callrom() just use callfar 2023-02-23 23:02:56 +01:00
Irmen de Jong
ba9268a09e added -varshigh compiler option to move BSS section.
Documented BSS a bit in the manual.
2023-02-22 22:44:29 +01:00
Irmen de Jong
5318ba6c6e shrink evalstack from 2 to 1 page
c64=$cf00-$cfff, x16: $0700-$07ff
2023-02-21 22:52:04 +01:00
Irmen de Jong
435b9d8973 get rid of 'noreinit' option for now, because it resulted in unreliable code 2023-02-20 23:29:16 +01:00
Irmen de Jong
c3c82282ba reinitGlobals option is clearer than the inverse 2023-02-19 19:09:29 +01:00
Irmen de Jong
dddf9a9396 remove explicit 'bss' from St var, changed to 'uninitialized' 2023-02-19 16:50:06 +01:00
Irmen de Jong
aaf375a57b move some utility methods into Pt Ast nodes itself 2023-02-16 22:45:35 +01:00
Irmen de Jong
3cce985f03 check float bits 2023-02-16 22:22:12 +01:00
Irmen de Jong
c59df6ec20 optimize isZpVar 2023-02-16 00:41:20 +01:00
Irmen de Jong
5c3f41f64d reintroduce explicit PtAugmentedAssign ast node 2023-02-15 22:54:32 +01:00