diff options
| author | Keith Randall <khr@golang.org> | 2025-06-17 10:56:53 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-08-15 11:13:59 -0700 |
| commit | a651e2ea47586f1e29688202ff60c719bac6a05b (patch) | |
| tree | 99998d3dcdeffaa05f95d3d6e72ea95febc52bcd /src/cmd/internal/obj | |
| parent | e4291e484cfcef5711f45d08e6d97a505eca9bf4 (diff) | |
| download | go-a651e2ea47586f1e29688202ff60c719bac6a05b.tar.xz | |
runtime: remove duff support for amd64
Change-Id: I742b49a3889892b7b1bb354f47f1c0d933c041e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/682395
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/internal/obj')
| -rw-r--r-- | src/cmd/internal/obj/x86/asm6.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go index 0906f16eaa..b071bd530d 100644 --- a/src/cmd/internal/obj/x86/asm6.go +++ b/src/cmd/internal/obj/x86/asm6.go @@ -4013,15 +4013,6 @@ func (ab *AsmBuf) mediaop(ctxt *obj.Link, o *Optab, op int, osize int, z int) in return z } -var bpduff1 = []byte{ - 0x48, 0x89, 0x6c, 0x24, 0xf0, // MOVQ BP, -16(SP) - 0x48, 0x8d, 0x6c, 0x24, 0xf0, // LEAQ -16(SP), BP -} - -var bpduff2 = []byte{ - 0x48, 0x8b, 0x6d, 0x00, // MOVQ 0(BP), BP -} - // asmevex emits EVEX pregis and opcode byte. // In addition to asmvex r/m, vvvv and reg fields also requires optional // K-masking register. @@ -4859,16 +4850,6 @@ func (ab *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) { ctxt.Diag("directly calling duff when dynamically linking Go") } - if yt.zcase == Zcallduff && ctxt.Arch.Family == sys.AMD64 { - // Maintain BP around call, since duffcopy/duffzero can't do it - // (the call jumps into the middle of the function). - // This makes it possible to see call sites for duffcopy/duffzero in - // BP-based profiling tools like Linux perf (which is the - // whole point of maintaining frame pointers in Go). - // MOVQ BP, -16(SP) - // LEAQ -16(SP), BP - ab.Put(bpduff1) - } ab.Put1(byte(op)) cursym.AddRel(ctxt, obj.Reloc{ Type: objabi.R_CALL, @@ -4879,12 +4860,6 @@ func (ab *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) { }) ab.PutInt32(0) - if yt.zcase == Zcallduff && ctxt.Arch.Family == sys.AMD64 { - // Pop BP pushed above. - // MOVQ 0(BP), BP - ab.Put(bpduff2) - } - // TODO: jump across functions needs reloc case Zbr, Zjmp, Zloop: if p.As == AXBEGIN { |
