@@ -4013,15 +4013,6 @@ func (ab *AsmBuf) mediaop(ctxt *obj.Link, o *Optab, op int, osize int, z int) in
4013
4013
return z
4014
4014
}
4015
4015
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
-
4025
4016
// asmevex emits EVEX pregis and opcode byte.
4026
4017
// In addition to asmvex r/m, vvvv and reg fields also requires optional
4027
4018
// K-masking register.
@@ -4859,16 +4850,6 @@ func (ab *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) {
4859
4850
ctxt .Diag ("directly calling duff when dynamically linking Go" )
4860
4851
}
4861
4852
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
- }
4872
4853
ab .Put1 (byte (op ))
4873
4854
cursym .AddRel (ctxt , obj.Reloc {
4874
4855
Type : objabi .R_CALL ,
@@ -4879,12 +4860,6 @@ func (ab *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) {
4879
4860
})
4880
4861
ab .PutInt32 (0 )
4881
4862
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
-
4888
4863
// TODO: jump across functions needs reloc
4889
4864
case Zbr , Zjmp , Zloop :
4890
4865
if p .As == AXBEGIN {
0 commit comments