Improved x64 encoder

This commit is contained in:
Eduard Urbach 2024-06-24 21:54:03 +02:00
parent c1d3e0d11b
commit 81fcb50e77
Signed by: eduard
GPG key ID: 49226B848C78F6C8
5 changed files with 46 additions and 23 deletions

View file

@ -6,5 +6,5 @@ import (
// SubRegNum subtracts a number from the given register.
func SubRegNum(code []byte, destination cpu.Register, number int) []byte {
return numberToRegister(0x83, 0x81, 0b101, code, destination, number)
return numRegReg(code, 0x83, 0x81, 0b101, byte(destination), number)
}