Implemented more arm64 instructions
This commit is contained in:
parent
29ee6730f2
commit
b7d76ff3e3
18 changed files with 218 additions and 29 deletions
|
@ -10,7 +10,7 @@ func MoveRegisterRegister(destination cpu.Register, source cpu.Register) uint32
|
|||
return AddRegisterNumber(destination, source, 0)
|
||||
}
|
||||
|
||||
return 0b10101010<<24 | uint32(source)<<16 | 0b11111<<5 | uint32(destination)
|
||||
return 0b10101010<<24 | reg3(destination, ZR, source)
|
||||
}
|
||||
|
||||
// MoveRegisterNumber moves an integer into the given register.
|
||||
|
@ -30,5 +30,5 @@ func MoveZero(destination cpu.Register, halfword int, number uint16) uint32 {
|
|||
|
||||
// mov encodes a generic move instruction.
|
||||
func mov(opCode uint32, halfword int, number uint16, destination cpu.Register) uint32 {
|
||||
return (1 << 31) | (opCode << 29) | (0b100101 << 23) | uint32(halfword<<21) | uint32(number<<5) | uint32(destination)
|
||||
return 1<<31 | opCode<<29 | 0b100101<<23 | uint32(halfword<<21) | uint32(number<<5) | uint32(destination)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue