Implemented negation

This commit is contained in:
Eduard Urbach 2024-07-28 15:42:51 +02:00
parent c2f6aa1a08
commit 4ded8260b3
Signed by: eduard
GPG key ID: 49226B848C78F6C8
11 changed files with 136 additions and 21 deletions

View file

@ -0,0 +1,8 @@
package x64
import "git.akyoto.dev/cli/q/src/build/cpu"
// NegateRegister negates the value in the register.
func NegateRegister(code []byte, register cpu.Register) []byte {
return encode(code, AddressDirect, 0b011, register, 8, 0xF7)
}