diff options
| author | Cherry Zhang <lunaria21@gmail.com> | 2016-04-27 22:17:44 -0400 |
|---|---|---|
| committer | Minux Ma <minux@golang.org> | 2016-05-01 02:36:37 +0000 |
| commit | 8dc0444a04a8a43887b4ca3753ee63b430cf2602 (patch) | |
| tree | ae1474adfe0867b437c7c9c4e3605a4c074a9417 /src/cmd/internal/obj/mips | |
| parent | a409fb80b0ebc1353336a9c03f8db408fbc6d1d5 (diff) | |
| download | go-8dc0444a04a8a43887b4ca3753ee63b430cf2602.tar.xz | |
cmd/asm, cmd/internal/obj/mips: add an alias of RSB on mips64x
Change-Id: I724ce0a48c1aeed14267c049fa415a6fa2fffbcf
Reviewed-on: https://go-review.googlesource.com/19864
Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/mips')
| -rw-r--r-- | src/cmd/internal/obj/mips/a.out.go | 2 | ||||
| -rw-r--r-- | src/cmd/internal/obj/mips/list0.go | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/mips/a.out.go b/src/cmd/internal/obj/mips/a.out.go index da0d2616f7..44add12e86 100644 --- a/src/cmd/internal/obj/mips/a.out.go +++ b/src/cmd/internal/obj/mips/a.out.go @@ -187,7 +187,7 @@ const ( REGZERO = REG_R0 /* set to zero */ REGSP = REG_R29 - REGSB = REG_R30 + REGSB = REG_R28 REGLINK = REG_R31 REGRET = REG_R1 REGARG = -1 /* -1 disables passing the first argument in register */ diff --git a/src/cmd/internal/obj/mips/list0.go b/src/cmd/internal/obj/mips/list0.go index 40dc4605c9..ca80e8b96d 100644 --- a/src/cmd/internal/obj/mips/list0.go +++ b/src/cmd/internal/obj/mips/list0.go @@ -47,6 +47,10 @@ func Rconv(r int) string { // Special case. return "g" } + if r == REGSB { + // Special case. + return "RSB" + } if REG_R0 <= r && r <= REG_R31 { return fmt.Sprintf("R%d", r-REG_R0) } |
