Implemented more arm64 instructions
This commit is contained in:
parent
cb908e7b31
commit
0ac7fc9a85
26 changed files with 232 additions and 73 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue