]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/mips,s390x,riscv: save LR after decrementing SP
authorCherry Mui <cherryyz@google.com>
Wed, 22 Jun 2022 20:28:41 +0000 (16:28 -0400)
committerDavid Chase <drchase@google.com>
Wed, 29 Jun 2022 16:36:06 +0000 (16:36 +0000)
commit3562977b6fe944b2c3da0455bdd6e9294c47c931
tree53156123107f2bcfa4550627a1758a0fb9a8c8a6
parentd6481d5b9662b29453004204746945a93a6b4eb2
cmd/internal/obj/mips,s390x,riscv: save LR after decrementing SP

Following CL 412474, for the rest of the LR architectures. On
MIPS(32/64), S390X, and RISCV, there is no single instruction that
saves the LR and decrements the SP, so we need to insert an
instruction to save the LR after decrementing the SP.

On ARM(32) and PPC64 we already use a single instruction to save
the LR and decrement the SP.

Updates #53374.

Change-Id: I5a2e211026d95edb0e0f7d084ddb784f8077b86d
Reviewed-on: https://go-review.googlesource.com/c/go/+/413428
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/mips64.s
src/cmd/internal/obj/mips/obj0.go
src/cmd/internal/obj/riscv/obj.go
src/cmd/internal/obj/s390x/objz.go