Renamed x64 to x86

This commit is contained in:
Eduard Urbach 2025-02-05 23:16:18 +01:00
parent f558a69366
commit 9c53235e7e
Signed by: eduard
GPG key ID: 49226B848C78F6C8
80 changed files with 1757 additions and 1757 deletions

16
src/x86/Pop.go Normal file
View file

@ -0,0 +1,16 @@
package x86
import "git.akyoto.dev/cli/q/src/cpu"
// PopRegister pops a value from the stack and saves it into the register.
func PopRegister(code []byte, register cpu.Register) []byte {
if register >= 8 {
code = append(code, REX(0, 0, 0, 1))
register -= 8
}
return append(
code,
0x58+byte(register),
)
}