]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv: split immediates larger than 12-bits
authorJoel Sing <joel@sing.id.au>
Sun, 3 Nov 2019 16:25:53 +0000 (03:25 +1100)
committerJoel Sing <joel@sing.id.au>
Tue, 19 Nov 2019 06:10:03 +0000 (06:10 +0000)
commit8cf5293caa7071601fa90358abdd20a0b787e178
tree8e7725b50b1ce18b85ef0d667d7e78356d0331f1
parent1046a9cb1b348a91e551ed2d1714e0926a1b04b1
cmd/internal/obj/riscv: split immediates larger than 12-bits

Handle immediates larger than 12-bits by rewriting as an LUI instruction with
the high bits, followed by the original instruction with the low bits.

Based on the riscv-go port.

Updates #27532

Change-Id: I8ed6d6e6db06fb8a27f3ab75f467ec2b7ff1f075
Reviewed-on: https://go-review.googlesource.com/c/go/+/204626
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/obj.go