fix(riscv64): accept the g spelling of the goroutine register

Assisted-by: GLM 5.3
This commit is contained in:
2026-09-20 00:38:24 +02:00
parent 187e4856d3
commit f15ff66fb1
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -22,9 +22,9 @@ TEXT ·dirtyFP(SB), NOSPLIT, $0-16
RET
// func dirtyG(a int64) int64
// Deliberately clobbers R28, the goroutine pointer (a serious ABI violation).
// Deliberately clobbers g, the goroutine pointer (R28; a serious ABI violation).
TEXT ·dirtyG(SB), NOSPLIT, $0-16
MOVD $0x5678, R28
MOVD $0x5678, g
MOVD a+0(FP), R0
MOVD R0, ret+8(FP)
RET
+2 -2
View File
@@ -13,9 +13,9 @@ TEXT ·cleanAdd(SB), NOSPLIT, $0-24
RET
// func dirtyG(a int64) int64
// Deliberately clobbers R22, the goroutine pointer (a serious ABI violation).
// Deliberately clobbers g, the goroutine pointer (R22; a serious ABI violation).
TEXT ·dirtyG(SB), NOSPLIT, $0-16
MOVV $0x5678, R22
MOVV $0x5678, g
MOVV a+0(FP), R4
MOVV R4, ret+8(FP)
RET
+2 -2
View File
@@ -13,9 +13,9 @@ TEXT ·cleanAdd(SB), NOSPLIT, $0-24
RET
// func dirtyG(a int64) int64
// Deliberately clobbers X27, the goroutine pointer (a serious ABI violation).
// Deliberately clobbers g, the goroutine pointer (X27; a serious ABI violation).
TEXT ·dirtyG(SB), NOSPLIT, $0-16
MOV $0x5678, X27
MOV $0x5678, g
MOV a+0(FP), X5
MOV X5, ret+8(FP)
RET