- floats: remove all floating point builtin functions and move them to the floats module instead

This commit is contained in:
Irmen de Jong
2022-04-22 00:45:54 +02:00
parent 88b55ab93e
commit 7eea97d741
21 changed files with 338 additions and 490 deletions
@@ -18,19 +18,7 @@ internal class BuiltinFuncGen(private val codeGen: CodeGen, private val exprGen:
"abs" -> funcAbs(call, resultRegister)
"cmp" -> funcCmp(call)
"sgn" -> funcSgn(call, resultRegister)
"sin" -> TODO("floats not yet implemented")
"cos" -> TODO("floats not yet implemented")
"tan" -> TODO("floats not yet implemented")
"atan" -> TODO("floats not yet implemented")
"ln" -> TODO("floats not yet implemented")
"log2" -> TODO("floats not yet implemented")
"sqrt16" -> funcSqrt16(call, resultRegister)
"sqrt" -> TODO("floats not yet implemented")
"rad" -> TODO("floats not yet implemented")
"deg" -> TODO("floats not yet implemented")
"round" -> TODO("floats not yet implemented")
"floor" -> TODO("floats not yet implemented")
"ceil" -> TODO("floats not yet implemented")
"pop" -> funcPop(call)
"popw" -> funcPopw(call)
"push" -> funcPush(call)
@@ -41,7 +29,6 @@ internal class BuiltinFuncGen(private val codeGen: CodeGen, private val exprGen:
"rrestorex" -> VmCodeChunk() // vm doesn't have registers to save/restore
"rnd" -> funcRnd(resultRegister)
"rndw" -> funcRndw(resultRegister)
"rndf" -> TODO("floats not yet implemented")
"callfar" -> throw AssemblyError("callfar() is for cx16 target only")
"callrom" -> throw AssemblyError("callrom() is for cx16 target only")
"syscall" -> funcSyscall(call)