Implemented register negation on arm64
This commit is contained in:
parent
2a8d4fcc6d
commit
f5a6c9afbd
3 changed files with 41 additions and 0 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue