remove long-branch warning for now

This commit is contained in:
Irmen de Jong 2019-01-16 22:22:21 +01:00
parent 49c3dc3c32
commit aa8f8978f0
4 changed files with 5 additions and 6 deletions

View File

@ -346,7 +346,7 @@ memcopy16_up .proc
inc dest+1 ; increment hi byte of dest
+ dex ; decrement X (lo byte counter)
bne - ; if X<>0 then move another byte
dec length ; weve moved 255 bytes, dec length
dec length ; we've moved 255 bytes, dec length
bpl - ; if length is still positive go back and move more
rts ; done
.pend

View File

@ -376,10 +376,10 @@ interface INameScope {
}
fun getLabelOrVariable(name: String): IStatement? {
// TODO this call is relatively slow.... cache it? make statement list non-mutable and update the cache when it is explicitly updated?
// this is called A LOT and could perhaps be optimized a bit more, but adding a cache didn't make much of a practical runtime difference
for (stmt in statements) {
if (stmt is VarDecl && stmt.name==name) return stmt
else if (stmt is Label && stmt.name==name) return stmt
if (stmt is Label && stmt.name==name) return stmt
}
return null
}

View File

@ -30,8 +30,6 @@ fun optimizeAssembly(lines: MutableList<String>): Int {
numberOfOptimizations++
}
println("ASM OPTIMIZATIONS: $numberOfOptimizations") // TODO weg
return numberOfOptimizations
}

View File

@ -10,7 +10,8 @@ class AssemblyProgram(val name: String) {
private val viceMonListFile = "$name.vice-mon-list"
fun assemble(options: CompilationOptions) {
val command = mutableListOf("64tass", "--ascii", "--case-sensitive", "--long-branch", "-Wall", "-Wno-strict-bool", "-Wlong-branch",
// add "-Wlong-branch" to see warnings about conversion of branch instructions to jumps
val command = mutableListOf("64tass", "--ascii", "--case-sensitive", "--long-branch", "-Wall", "-Wno-strict-bool",
"-Werror", "-Wno-error=long-branch", "--dump-labels", "--vice-labels", "-l", viceMonListFile, "--no-monitor")
val outFile = when(options.output) {