Implemented x64 memory loads

This commit is contained in:
Eduard Urbach 2024-07-20 15:48:42 +02:00
parent 53379ff5bc
commit 5dee0777e7
Signed by: eduard
GPG key ID: 49226B848C78F6C8
5 changed files with 255 additions and 87 deletions

View file

@ -0,0 +1,8 @@
package x64
import "git.akyoto.dev/cli/q/src/build/cpu"
// LoadRegister loads from memory into a register.
func LoadRegister(code []byte, destination cpu.Register, offset byte, numBytes byte, source cpu.Register) []byte {
return memoryAccess(code, 0x8A, 0x8B, source, offset, numBytes, destination)
}