Implemented more arm64 instructions
This commit is contained in:
@ -6,11 +6,19 @@ func (a *Assembler) CanSkipReturn() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
lastMnemonic := a.Instructions[len(a.Instructions)-1].Mnemonic
|
||||
last := a.Instructions[len(a.Instructions)-1]
|
||||
|
||||
if lastMnemonic == RETURN || lastMnemonic == JUMP {
|
||||
if last.Mnemonic == RETURN || last.Mnemonic == JUMP {
|
||||
return true
|
||||
}
|
||||
|
||||
if last.Mnemonic == CALL {
|
||||
label, isLabel := last.Data.(*Label)
|
||||
|
||||
if isLabel && label.String() == "core.exit" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user