1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

x64: fix off by one error in for loops

This commit is contained in:
Alexander Medvednikov 2019-11-29 12:33:04 +03:00
parent 39bc38233a
commit 431568faad
2 changed files with 26 additions and 26 deletions

View File

@ -8,7 +8,7 @@ fn main() {
println('Hello world from V x64 machine code generator!') println('Hello world from V x64 machine code generator!')
} }
println('Hello again!') println('Hello again!')
test_fn() //test_fn()
println('dne') println('done')
} }

View File

@ -189,7 +189,7 @@ pub fn (g mut Gen) gen_loop_start(from int) int {
pub fn (g mut Gen) gen_loop_end(to int, label int) { pub fn (g mut Gen) gen_loop_end(to int, label int) {
g.cmp(.r12, ._8, to) g.cmp(.r12, ._8, to)
g.jle(label) g.jl(label)
} }
pub fn (g mut Gen) save_main_fn_addr() { pub fn (g mut Gen) save_main_fn_addr() {