diff options
author | Joel Sing <joel@sing.id.au> | 2021-08-17 18:45:11 +0000 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2021-09-04 10:42:34 +0000 |
commit | 9cb5716f009ea71564a9ee84d653d7a76adf9926 (patch) | |
tree | 6d74f758931d78398f857b950f3053d905d309b7 /src/cmd/asm | |
parent | 4957976b1a1f67ba872cc281b9ae25d59f6e003d (diff) | |
download | go-9cb5716f009ea71564a9ee84d653d7a76adf9926.tar.gz go-9cb5716f009ea71564a9ee84d653d7a76adf9926.zip |
cmd/internal/obj/riscv: avoid obj.Prog rewriting for constant loads
Rather than rewriting the obj.Prog for a MOV pseudo-instruction targeting
a constant to register load, generate the appropriate machine instruction
sequence directly.
Change-Id: I38e62f282b39be2a0a241f32280d306558d49b44
Reviewed-on: https://go-review.googlesource.com/c/go/+/344450
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r-- | src/cmd/asm/internal/asm/testdata/riscv64.s | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/riscv64.s b/src/cmd/asm/internal/asm/testdata/riscv64.s index 173c50f2e1..b22d1a7e37 100644 --- a/src/cmd/asm/internal/asm/testdata/riscv64.s +++ b/src/cmd/asm/internal/asm/testdata/riscv64.s @@ -282,6 +282,8 @@ start: MOV X5, X6 // 13830200 MOV $2047, X5 // 9b02f07f MOV $-2048, X5 // 9b020080 + MOV $2048, X5 // b71200009b820280 + MOV $-2049, X5 // b7f2ffff9b82f27f // Converted to load of symbol. MOV $4294967296, X5 // 97020000 |