Moved sizeof functions to a separate package
This commit is contained in:
@ -4,13 +4,14 @@ import (
|
||||
"encoding/binary"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/build/cpu"
|
||||
"git.akyoto.dev/cli/q/src/build/sizeof"
|
||||
)
|
||||
|
||||
// MoveRegisterNumber moves an integer into the given register.
|
||||
func MoveRegisterNumber(code []byte, destination cpu.Register, number int) []byte {
|
||||
w := byte(0)
|
||||
|
||||
if SizeOf(int64(number)) == 8 {
|
||||
if sizeof.Signed(int64(number)) == 8 {
|
||||
w = 1
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user