Simplified code
This commit is contained in:
parent
162ddbefef
commit
a296ee8c94
5 changed files with 41 additions and 37 deletions
|
@ -34,9 +34,9 @@ func MoveRegisterNumber(code []byte, destination cpu.Register, number int) []byt
|
|||
|
||||
if w == 1 {
|
||||
return binary.LittleEndian.AppendUint64(code, uint64(number))
|
||||
} else {
|
||||
return binary.LittleEndian.AppendUint32(code, uint32(number))
|
||||
}
|
||||
|
||||
return binary.LittleEndian.AppendUint32(code, uint32(number))
|
||||
}
|
||||
|
||||
// MoveRegisterNumber32 moves an integer into the given register and sign-extends the register.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue