aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm/internal
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2023-03-13 16:20:50 +0800
committerBen Shi <powerman1st@163.com>2023-03-21 06:51:28 +0000
commit6f2ef5ec98e1a14ee7a2805f68241cfa5feff8bd (patch)
tree085fe40c94431a6389c95bf703818b2231b77c15 /src/cmd/asm/internal
parentdac514ea370d9a5e5129614c58082fe1905f6dcb (diff)
downloadgo-6f2ef5ec98e1a14ee7a2805f68241cfa5feff8bd.tar.xz
cmd/asm, runtime: remove the RSB register from loong64
It was carryover from the mips64 port (where it represented the platform GP register) but LoongArch platform ABI doesn't have the GP concept. Change-Id: Iea326ae13676e95b040b52aaadc08d311b507bd3 Reviewed-on: https://go-review.googlesource.com/c/go/+/475815 Reviewed-by: abner chenc <chenguoqi@loongson.cn> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/cmd/asm/internal')
-rw-r--r--src/cmd/asm/internal/arch/arch.go1
-rw-r--r--src/cmd/asm/internal/asm/operand_test.go4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/cmd/asm/internal/arch/arch.go b/src/cmd/asm/internal/arch/arch.go
index 740711c40c..11bb7af899 100644
--- a/src/cmd/asm/internal/arch/arch.go
+++ b/src/cmd/asm/internal/arch/arch.go
@@ -536,7 +536,6 @@ func archLoong64(linkArch *obj.LinkArch) *Arch {
// Avoid unintentionally clobbering g using R22.
delete(register, "R22")
register["g"] = loong64.REG_R22
- register["RSB"] = loong64.REG_R31
registerPrefix := map[string]bool{
"F": true,
"FCSR": true,
diff --git a/src/cmd/asm/internal/asm/operand_test.go b/src/cmd/asm/internal/asm/operand_test.go
index 29371d6199..c7e251f50f 100644
--- a/src/cmd/asm/internal/asm/operand_test.go
+++ b/src/cmd/asm/internal/asm/operand_test.go
@@ -915,8 +915,9 @@ var loong64OperandTests = []operandTest{
{"R27", "R27"},
{"R28", "R28"},
{"R29", "R29"},
- {"R30", "R30"},
{"R3", "R3"},
+ {"R30", "R30"},
+ {"R31", "R31"},
{"R4", "R4"},
{"R5", "R5"},
{"R6", "R6"},
@@ -925,7 +926,6 @@ var loong64OperandTests = []operandTest{
{"R9", "R9"},
{"a(FP)", "a(FP)"},
{"g", "g"},
- {"RSB", "R31"},
{"ret+8(FP)", "ret+8(FP)"},
{"runtime·abort(SB)", "runtime.abort(SB)"},
{"·AddUint32(SB)", "\"\".AddUint32(SB)"},