Refactored arm package

This commit is contained in:
2025-04-16 17:38:48 +02:00
parent 53ecf40229
commit df725a2b23
26 changed files with 102 additions and 53 deletions

View File

@ -3,6 +3,6 @@ package arm
// Call branches to a PC-relative offset, setting the register X30 to PC+4.
// The offset starts from the address of this instruction and is encoded as "imm26" times 4.
// This instruction is also known as BL (branch with link).
func Call(offset uint32) uint32 {
return uint32(0b100101<<26) | offset
func Call(offset int) uint32 {
return uint32(0b100101<<26) | uint32(offset&mask26)
}