]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/riscv: correct message in regVal panic
authorJoel Sing <joel@sing.id.au>
Sun, 27 Aug 2023 16:08:06 +0000 (02:08 +1000)
committerJoel Sing <joel@sing.id.au>
Fri, 8 Sep 2023 04:21:02 +0000 (04:21 +0000)
Change-Id: I68be4110216145ad1fb2e5095e1f2b143f9e69ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/523456
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: M Zhuo <mzh@golangcn.org>
Run-TryBot: Joel Sing <joel@sing.id.au>

src/cmd/internal/obj/riscv/obj.go

index 36812833a9358d64c8e75a23a8efcd9812ad7505..f60abe4197aca18fecc0b263ca1fb12b663b10af 100644 (file)
@@ -973,7 +973,7 @@ func Split32BitImmediate(imm int64) (low, high int64, err error) {
 
 func regVal(r, min, max uint32) uint32 {
        if r < min || r > max {
-               panic(fmt.Sprintf("register out of range, want %d < %d < %d", min, r, max))
+               panic(fmt.Sprintf("register out of range, want %d <= %d <= %d", min, r, max))
        }
        return r - min
 }