@@ -614,27 +614,15 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
614
614
}
615
615
}
616
616
617
- var usefpheuristic bool
618
- switch ctxt .Headtype {
619
- case objabi .Hwindows , objabi .Hdarwin , objabi .Hlinux , objabi .Hdragonfly ,
620
- objabi .Hfreebsd , objabi .Hnetbsd , objabi .Hopenbsd , objabi .Hsolaris , objabi .Hplan9 :
621
- default :
622
- usefpheuristic = true
623
- }
624
-
625
617
var bpsize int
626
618
if ctxt .Arch .Family == sys .AMD64 &&
627
619
! p .From .Sym .NoFrame () && // (1) below
628
- ! (autoffset == 0 && p .From .Sym .NoSplit () && usefpheuristic ) && // (2) below
629
- ! (autoffset == 0 && ! hasCall ) { // (3) below
620
+ ! (autoffset == 0 && ! hasCall ) { // (2) below
630
621
// Make room to save a base pointer.
631
622
// There are 2 cases we must avoid:
632
623
// 1) If noframe is set (which we do for functions which tail call).
633
- // 2) Scary runtime internals which would be all messed up by frame pointers.
634
- // We detect these using a heuristic: frameless nosplit functions.
635
- // TODO: Maybe someday we label them all with NOFRAME and get rid of this heuristic.
636
624
// For performance, we also want to avoid:
637
- // 3 ) Frameless leaf functions
625
+ // 2 ) Frameless leaf functions
638
626
bpsize = ctxt .Arch .PtrSize
639
627
autoffset += int32 (bpsize )
640
628
p .To .Offset += int64 (bpsize )
0 commit comments