Implemented 64-bit move

This commit is contained in:
2024-07-26 16:19:13 +02:00
parent 123738f88c
commit bf80551a15
8 changed files with 62 additions and 29 deletions

View File

@ -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)