Implemented register negation on arm64

This commit is contained in:
Eduard Urbach 2025-03-17 14:35:12 +01:00
parent 2a8d4fcc6d
commit f5a6c9afbd
Signed by: eduard
GPG key ID: 49226B848C78F6C8
3 changed files with 41 additions and 0 deletions

View file

@ -307,6 +307,13 @@ func (c *compiler) ARM(x asm.Instruction) {
panic("not implemented")
}
case asm.NEGATE:
switch x.Type {
case asm.TypeRegister:
operands := c.assembler.Param.Register[x.Index]
c.append(arm.NegateRegister(operands.Register, operands.Register))
}
default:
panic("unknown mnemonic: " + x.Mnemonic.String())
}