]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: teach regalloc to rightly do nothing on loong64 in case of dynlinking
authorWANG Xuerui <git@xen0n.name>
Tue, 13 Dec 2022 08:51:02 +0000 (16:51 +0800)
committerDavid Chase <drchase@google.com>
Tue, 21 Nov 2023 17:49:56 +0000 (17:49 +0000)
This is needed before actual support for buildmode=plugin is added.
Should not affect current behavior.

Change-Id: I86371d7e373fd529cb8710850d7b0fbbf1eb52ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/480877
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: WANG Xuerui <git@xen0n.name>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/ssa/regalloc.go

index fcd3f5c8b54746e33726125801f87c607247b747..2325b9ee458412571decd28537f6165782b47494 100644 (file)
@@ -672,6 +672,8 @@ func (s *regAllocState) init(f *Func) {
                        s.allocatable &^= 1 << 9 // R9
                case "arm64":
                        // nothing to do
+               case "loong64": // R2 (aka TP) already reserved.
+                       // nothing to do
                case "ppc64le": // R2 already reserved.
                        // nothing to do
                case "riscv64": // X3 (aka GP) and X4 (aka TP) already reserved.