]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/obj/riscv: correctly split immediates for FLW/FLD/FSW/FSD
authorJoel Sing <joel@sing.id.au>
Thu, 16 Jan 2020 15:51:40 +0000 (02:51 +1100)
committerJoel Sing <joel@sing.id.au>
Tue, 21 Jan 2020 23:58:09 +0000 (23:58 +0000)
commit1424889921159ed28866dff40b5d54884aaddd9c
tree62c6c4d903d2245080d46891382beb7b323dfe64
parent88ed322afcd8cddc0e1ae5d02fd4d86779a4a2a3
cmd/internal/obj/riscv: correctly split immediates for FLW/FLD/FSW/FSD

The FLW/FLD/FSW/FSD instructions can have immediates that exceed 12-bits and
therefore cannot be encoded in the RISCV instruction. Handle these as we do
for other load/store instructions. Also add test coverage for all load/store
instructions with large immediates.

Fixes compilation issue reported by Carlos Eduardo de Paula.

Updates #27532

Change-Id: Ifa62f19493b3acaba5a90ac31d2df209a3afea81
Reviewed-on: https://go-review.googlesource.com/c/go/+/215037
Reviewed-by: Carlos Eduardo de Paula <me@carlosedp.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/internal/obj/riscv/asm_test.go
src/cmd/internal/obj/riscv/obj.go