Implemented more arm64 instructions

This commit is contained in:
2025-03-06 23:13:14 +01:00
parent cb908e7b31
commit 0ac7fc9a85
26 changed files with 232 additions and 73 deletions

View File

@ -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
}