Flattened package hierarchy
This commit is contained in:
parent
12dcf672cb
commit
a4dc5a4eff
89 changed files with 42 additions and 42 deletions
16
src/x64/Pop.go
Normal file
16
src/x64/Pop.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package x64
|
||||
|
||||
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),
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue