mirror of
https://github.com/irmen/prog8.git
synced 2025-02-09 23:30:45 +00:00
fixed float zp problem on C64, added more zp locations to block list
This commit is contained in:
parent
af39502450
commit
df995f7bc9
@ -179,7 +179,7 @@ private fun optimizeAst(programAst: Program, errors: ErrorReporter) {
|
|||||||
// keep optimizing expressions and statements until no more steps remain
|
// keep optimizing expressions and statements until no more steps remain
|
||||||
val optsDone1 = programAst.simplifyExpressions()
|
val optsDone1 = programAst.simplifyExpressions()
|
||||||
val optsDone2 = programAst.optimizeStatements(errors)
|
val optsDone2 = programAst.optimizeStatements(errors)
|
||||||
programAst.constantFold(errors) // because simplified statements and expressions could give rise to more constants that can be folded away:
|
programAst.constantFold(errors) // because simplified statements and expressions could give rise to more constants that can be folded away
|
||||||
errors.handle()
|
errors.handle()
|
||||||
if (optsDone1 + optsDone2 == 0)
|
if (optsDone1 + optsDone2 == 0)
|
||||||
break
|
break
|
||||||
|
@ -147,7 +147,7 @@ internal object C64MachineDefinition: IMachineDefinition {
|
|||||||
if (options.zeropage == ZeropageType.FLOATSAFE) {
|
if (options.zeropage == ZeropageType.FLOATSAFE) {
|
||||||
// remove the zero page locations used for floating point operations from the free list
|
// remove the zero page locations used for floating point operations from the free list
|
||||||
free.removeAll(listOf(
|
free.removeAll(listOf(
|
||||||
0x12, 0x26, 0x27, 0x28, 0x29, 0x2a,
|
0x10, 0x11, 0x12, 0x26, 0x27, 0x28, 0x29, 0x2a,
|
||||||
0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60,
|
0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60,
|
||||||
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
|
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
|
||||||
0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72,
|
0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72,
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
%target c64
|
%target c64
|
||||||
%import floats
|
%import floats
|
||||||
%import graphics
|
%import graphics
|
||||||
|
%zeropage floatsafe
|
||||||
; TODO FIX OUTPUT when Optimizer is enabled (it's ok when compiling without optimization)
|
|
||||||
|
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user