Implemented 64-bit move
This commit is contained in:
@ -133,14 +133,14 @@ func (a Assembler) Finalize() ([]byte, []byte) {
|
||||
case MOVE:
|
||||
switch operands := x.Data.(type) {
|
||||
case *RegisterNumber:
|
||||
code = x64.MoveRegisterNumber32(code, operands.Register, uint32(operands.Number))
|
||||
code = x64.MoveRegisterNumber(code, operands.Register, operands.Number)
|
||||
|
||||
case *RegisterRegister:
|
||||
code = x64.MoveRegisterRegister64(code, operands.Destination, operands.Source)
|
||||
code = x64.MoveRegisterRegister(code, operands.Destination, operands.Source)
|
||||
|
||||
case *RegisterLabel:
|
||||
start := len(code)
|
||||
code = x64.MoveRegisterNumber32(code, operands.Register, 0x00_00_00_00)
|
||||
code = x64.MoveRegisterNumber(code, operands.Register, 0x00_00_00_00)
|
||||
size := 4
|
||||
opSize := len(code) - size - start
|
||||
regLabel := x.Data.(*RegisterLabel)
|
||||
|
Reference in New Issue
Block a user