From f43581131e96f0a4a7745250218ace6c4ea2e557 Mon Sep 17 00:00:00 2001 From: Guoqi Chen Date: Thu, 17 Aug 2023 03:58:10 +0800 Subject: cmd/compile, cmd/internal, runtime: change the registers used by the duff device for loong64 Add R21 to the allocatable registers, use R20 and R21 in duff device. This CL is in preparation for subsequent regABI support. Updates #40724 Co-authored-by: Xiaolin Zhao Change-Id: If1661adc0f766925fbe74827a369797f95fa28a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/521775 Reviewed-by: David Chase Run-TryBot: David Chase Reviewed-by: Cherry Mui Reviewed-by: Meidan Li Reviewed-by: Than McIntosh TryBot-Result: Gopher Robot --- src/cmd/internal/obj/loong64/a.out.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cmd/internal/obj') diff --git a/src/cmd/internal/obj/loong64/a.out.go b/src/cmd/internal/obj/loong64/a.out.go index 99a7da388f..a4bb7b40a3 100644 --- a/src/cmd/internal/obj/loong64/a.out.go +++ b/src/cmd/internal/obj/loong64/a.out.go @@ -157,14 +157,14 @@ const ( REGZERO = REG_R0 // set to zero REGLINK = REG_R1 REGSP = REG_R3 - REGRET = REG_R19 + REGRET = REG_R20 // not use REGARG = -1 // -1 disables passing the first argument in register - REGRT1 = REG_R19 // reserved for runtime, duffzero and duffcopy - REGRT2 = REG_R20 // reserved for runtime, duffcopy + REGRT1 = REG_R20 // reserved for runtime, duffzero and duffcopy + REGRT2 = REG_R21 // reserved for runtime, duffcopy REGCTXT = REG_R29 // context for closures REGG = REG_R22 // G in loong64 REGTMP = REG_R30 // used by the assembler - FREGRET = REG_F0 + FREGRET = REG_F0 // not use ) var LOONG64DWARFRegisters = map[int16]int16{} -- cgit v1.3-5-g9baa