Skip to content

Commit a651e2e

Browse files
randall77gopherbot
authored andcommitted
runtime: remove duff support for amd64
Change-Id: I742b49a3889892b7b1bb354f47f1c0d933c041e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/682395 Auto-Submit: Keith Randall <[email protected]> Reviewed-by: Jorropo <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent e4291e4 commit a651e2e

File tree

3 files changed

+0
-453
lines changed

3 files changed

+0
-453
lines changed

src/cmd/internal/obj/x86/asm6.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4013,15 +4013,6 @@ func (ab *AsmBuf) mediaop(ctxt *obj.Link, o *Optab, op int, osize int, z int) in
40134013
return z
40144014
}
40154015

4016-
var bpduff1 = []byte{
4017-
0x48, 0x89, 0x6c, 0x24, 0xf0, // MOVQ BP, -16(SP)
4018-
0x48, 0x8d, 0x6c, 0x24, 0xf0, // LEAQ -16(SP), BP
4019-
}
4020-
4021-
var bpduff2 = []byte{
4022-
0x48, 0x8b, 0x6d, 0x00, // MOVQ 0(BP), BP
4023-
}
4024-
40254016
// asmevex emits EVEX pregis and opcode byte.
40264017
// In addition to asmvex r/m, vvvv and reg fields also requires optional
40274018
// K-masking register.
@@ -4859,16 +4850,6 @@ func (ab *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) {
48594850
ctxt.Diag("directly calling duff when dynamically linking Go")
48604851
}
48614852

4862-
if yt.zcase == Zcallduff && ctxt.Arch.Family == sys.AMD64 {
4863-
// Maintain BP around call, since duffcopy/duffzero can't do it
4864-
// (the call jumps into the middle of the function).
4865-
// This makes it possible to see call sites for duffcopy/duffzero in
4866-
// BP-based profiling tools like Linux perf (which is the
4867-
// whole point of maintaining frame pointers in Go).
4868-
// MOVQ BP, -16(SP)
4869-
// LEAQ -16(SP), BP
4870-
ab.Put(bpduff1)
4871-
}
48724853
ab.Put1(byte(op))
48734854
cursym.AddRel(ctxt, obj.Reloc{
48744855
Type: objabi.R_CALL,
@@ -4879,12 +4860,6 @@ func (ab *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) {
48794860
})
48804861
ab.PutInt32(0)
48814862

4882-
if yt.zcase == Zcallduff && ctxt.Arch.Family == sys.AMD64 {
4883-
// Pop BP pushed above.
4884-
// MOVQ 0(BP), BP
4885-
ab.Put(bpduff2)
4886-
}
4887-
48884863
// TODO: jump across functions needs reloc
48894864
case Zbr, Zjmp, Zloop:
48904865
if p.As == AXBEGIN {

0 commit comments

Comments
 (0)