]> Cypherpunks repositories - gostls13.git/commit
cmd/compile,cmd/link: fix and re-enable open-coded defers on riscv64
authorJoel Sing <joel@sing.id.au>
Wed, 29 Jan 2020 09:06:54 +0000 (20:06 +1100)
committerJoel Sing <joel@sing.id.au>
Wed, 29 Jan 2020 16:34:44 +0000 (16:34 +0000)
commit2e4f490b31272a2df73d4ba23aad7f5a8ca49a2f
treed61b963c59a8b43fc8b24df5216cd054e0a082a6
parent1319bb959c17b8e6c7b44b26c61e8f02850d9c46
cmd/compile,cmd/link: fix and re-enable open-coded defers on riscv64

The R_CALLRISCV relocation marker is on the JALR instruction, however the actual
relocation is currently two instructions previous for the AUIPC+ADDI sequence.
Adjust the platform dependent offset accordingly and re-enable open-coded defers.

Fixes #36786.

Change-Id: I71597c193c447930fbe94ce44b7355e89ae877bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/216797
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/link/internal/ld/pcln.go
test/live.go