diff options
| author | Guoqi Chen <chenguoqi@loongson.cn> | 2023-08-17 03:58:10 +0800 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2023-11-21 17:42:40 +0000 |
| commit | f43581131e96f0a4a7745250218ace6c4ea2e557 (patch) | |
| tree | 507474291cee48d554e42efab0654f5bbc55f015 /src/cmd/internal/obj | |
| parent | 4f55a5af5e5d325a534222050564766c249218aa (diff) | |
| download | go-f43581131e96f0a4a7745250218ace6c4ea2e557.tar.xz | |
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 <zhaoxiaolin@loongson.cn>
Change-Id: If1661adc0f766925fbe74827a369797f95fa28a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/521775
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal/obj')
| -rw-r--r-- | src/cmd/internal/obj/loong64/a.out.go | 8 |
1 files changed, 4 insertions, 4 deletions
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{} |
