Improved x64 documentation

This commit is contained in:
2024-07-23 10:47:27 +02:00
parent eb160afd91
commit d6db1b1096
4 changed files with 24 additions and 18 deletions

View File

@ -7,7 +7,7 @@ import (
)
// encodeNum encodes an instruction with up to two registers and a number parameter.
func encodeNum(code []byte, mod byte, reg cpu.Register, rm cpu.Register, number int, opCode8 byte, opCode32 byte) []byte {
func encodeNum(code []byte, mod AddressMode, reg cpu.Register, rm cpu.Register, number int, opCode8 byte, opCode32 byte) []byte {
if SizeOf(int64(number)) == 1 {
code = encode(code, mod, reg, rm, 8, opCode8)
return append(code, byte(number))