q/src/arm/Call.go
Eduard Urbach 3ae47f93eb
All checks were successful
/ test (push) Successful in 19s
Added arm package
2025-06-23 11:49:39 +02:00

8 lines
No EOL
327 B
Go

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 int) uint32 {
return uint32(0b100101<<26) | uint32(offset&mask26)
}