diff options
| author | cui fliter <imcusg@gmail.com> | 2022-10-05 03:15:24 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-06 04:37:00 +0000 |
| commit | b314eea4cdba0755caedc9a3e683d3f7e1e2be6f (patch) | |
| tree | cdfa79c2881fc5d4add6fb8a873ec13f8ee6b8e1 /src/cmd/internal/obj | |
| parent | 755a2927d8f5bb79952db8fd17bbdec1aed91518 (diff) | |
| download | go-b314eea4cdba0755caedc9a3e683d3f7e1e2be6f.tar.xz | |
all: remove redundant type conversion
Change-Id: I375233dc700adbc58a6d4af995d07b352bf85b11
GitHub-Last-Rev: ef129205231b892f61b0135c87bb791a5e1a126c
GitHub-Pull-Request: golang/go#55994
Reviewed-on: https://go-review.googlesource.com/c/go/+/437715
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/cmd/internal/obj')
| -rw-r--r-- | src/cmd/internal/obj/wasm/wasmobj.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/internal/obj/wasm/wasmobj.go b/src/cmd/internal/obj/wasm/wasmobj.go index 1c726f77d3..59b2e7bddc 100644 --- a/src/cmd/internal/obj/wasm/wasmobj.go +++ b/src/cmd/internal/obj/wasm/wasmobj.go @@ -379,7 +379,7 @@ func preprocess(ctxt *obj.Link, s *obj.LSym, newprog obj.ProgAlloc) { p = appendp(p, AGet, regAddr(REGG)) p = appendp(p, AI32WrapI64) p = appendp(p, AI32Load, constAddr(2*int64(ctxt.Arch.PtrSize))) // G.stackguard0 - p = appendp(p, AI32Const, constAddr(int64(framesize)-objabi.StackSmall)) + p = appendp(p, AI32Const, constAddr(framesize-objabi.StackSmall)) p = appendp(p, AI32Add) p = appendp(p, AI32LeU) } @@ -577,18 +577,18 @@ func preprocess(ctxt *obj.Link, s *obj.LSym, newprog obj.ProgAlloc) { for p := s.Func().Text; p != nil; p = p.Link { switch p.From.Name { case obj.NAME_AUTO: - p.From.Offset += int64(framesize) + p.From.Offset += framesize case obj.NAME_PARAM: p.From.Reg = REG_SP - p.From.Offset += int64(framesize) + 8 // parameters are after the frame and the 8-byte return address + p.From.Offset += framesize + 8 // parameters are after the frame and the 8-byte return address } switch p.To.Name { case obj.NAME_AUTO: - p.To.Offset += int64(framesize) + p.To.Offset += framesize case obj.NAME_PARAM: p.To.Reg = REG_SP - p.To.Offset += int64(framesize) + 8 // parameters are after the frame and the 8-byte return address + p.To.Offset += framesize + 8 // parameters are after the frame and the 8-byte return address } switch p.As { |
