@@ -4419,40 +4419,24 @@ type FloatingEQNEJump struct {
4419
4419
Index int
4420
4420
}
4421
4421
4422
- func (s * SSAGenState ) oneFPJump (b * ssa.Block , jumps * FloatingEQNEJump , likely ssa. BranchPrediction ) {
4422
+ func (s * SSAGenState ) oneFPJump (b * ssa.Block , jumps * FloatingEQNEJump ) {
4423
4423
p := s .Prog (jumps .Jump )
4424
4424
p .To .Type = obj .TYPE_BRANCH
4425
4425
to := jumps .Index
4426
4426
s .Branches = append (s .Branches , Branch {p , b .Succs [to ].Block ()})
4427
- if to == 1 {
4428
- likely = - likely
4429
- }
4430
- // liblink reorders the instruction stream as it sees fit.
4431
- // Pass along what we know so liblink can make use of it.
4432
- // TODO: Once we've fully switched to SSA,
4433
- // make liblink leave our output alone.
4434
- switch likely {
4435
- case ssa .BranchUnlikely :
4436
- p .From .Type = obj .TYPE_CONST
4437
- p .From .Offset = 0
4438
- case ssa .BranchLikely :
4439
- p .From .Type = obj .TYPE_CONST
4440
- p .From .Offset = 1
4441
- }
4442
4427
}
4443
4428
4444
4429
func (s * SSAGenState ) FPJump (b , next * ssa.Block , jumps * [2 ][2 ]FloatingEQNEJump ) {
4445
- likely := b .Likely
4446
4430
switch next {
4447
4431
case b .Succs [0 ].Block ():
4448
- s .oneFPJump (b , & jumps [0 ][0 ], likely )
4449
- s .oneFPJump (b , & jumps [0 ][1 ], likely )
4432
+ s .oneFPJump (b , & jumps [0 ][0 ])
4433
+ s .oneFPJump (b , & jumps [0 ][1 ])
4450
4434
case b .Succs [1 ].Block ():
4451
- s .oneFPJump (b , & jumps [1 ][0 ], likely )
4452
- s .oneFPJump (b , & jumps [1 ][1 ], likely )
4435
+ s .oneFPJump (b , & jumps [1 ][0 ])
4436
+ s .oneFPJump (b , & jumps [1 ][1 ])
4453
4437
default :
4454
- s .oneFPJump (b , & jumps [1 ][0 ], likely )
4455
- s .oneFPJump (b , & jumps [1 ][1 ], likely )
4438
+ s .oneFPJump (b , & jumps [1 ][0 ])
4439
+ s .oneFPJump (b , & jumps [1 ][1 ])
4456
4440
q := s .Prog (obj .AJMP )
4457
4441
q .To .Type = obj .TYPE_BRANCH
4458
4442
s .Branches = append (s .Branches , Branch {q , b .Succs [1 ].Block ()})
0 commit comments