]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/obj/riscv: fix the offset of JALR transformed from JAL
authorWang Yaduo <wangyaduo@linux.alibaba.com>
Fri, 27 Oct 2023 06:48:25 +0000 (14:48 +0800)
committerM Zhuo <mzh@golangcn.org>
Tue, 7 Nov 2023 01:22:04 +0000 (01:22 +0000)
commitd33548d178016122726342911f8e15016a691472
treefdb74d936480a6eabad06f3b097df9d0d2319fa4
parentb54cae276aa7997d91e1ce5de6e27ec60b19e4bb
cmd/internal/obj/riscv: fix the offset of JALR transformed from JAL

Currently, the offset of JALR is zero all the time, which is transformed
from JAL with over ±1MB offset. This causes the segment fault for the
wrong address.

Change-Id: I4dcb3eb13bd1ea71e9eb27f07c03ffec376608ab
Reviewed-on: https://go-review.googlesource.com/c/go/+/538135
Run-TryBot: M Zhuo <mzh@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: M Zhuo <mzh@golangcn.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/internal/obj/riscv/asm_test.go
src/cmd/internal/obj/riscv/obj.go