]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: fix return with register
authorJoel Sing <joel@sing.id.au>
Fri, 14 Jun 2024 15:28:46 +0000 (01:28 +1000)
committerJoel Sing <joel@sing.id.au>
Tue, 25 Jun 2024 14:29:06 +0000 (14:29 +0000)
commitb1fd047508aad9f5038dc04d78146cc582328bf5
treeb5e1929d55206a7579dbc71e6ef810f4ce9fefdd
parentb3b4556c245c8f21872910ee866133428bbb5a60
cmd/internal/obj/arm64: fix return with register

ARM64 allows for a register to be specified with a return
instruction. While the assembler parsing and encoding currently
supports this, the preprocess function uses LR unconditionally.
Correct this such that if a register is specified, the register
is used.

Change-Id: I708f6c7e910d141559b60d2d5ee76ae2e1dc3a0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/592796
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/internal/obj/arm64/obj7.go