tests: disable clipboard on linux; x64: leave()

pull/4537/head
Alexander Medvednikov 2020-04-21 06:16:47 +02:00
parent 77679d9650
commit ab38605802
2 changed files with 11 additions and 1 deletions

View File

@ -14,10 +14,14 @@ fn run_test(is_primary bool){
fn test_primary(){
$if linux {
run_test(true)
return
//run_test(true)
}
}
fn test_clipboard(){
$if linux {
return
}
run_test(false)
}

View File

@ -262,6 +262,11 @@ pub fn (mut g Gen) sub32(reg Register, val int) {
g.write8(0x48)
g.write8(0x81)
g.write8(0xe8 + reg) // TODO rax is different?
g.write32(val)
}
fn (mut g Gen) leave() {
g.write8(0xc9)
}
// returns label's relative address
@ -452,6 +457,7 @@ fn (mut g Gen) fn_decl(it ast.FnDecl) {
// return
}
if !is_main {
// g.leave()
g.pop(.rbp)
}
g.ret()