HomeFreeBSD

amd64: move fusufault after all users

Description

amd64: move fusufault after all users

A lot of function have the following check:

cmpq    %rax,%rdi                       /* verify address is valid */
ja      fusufault

The label is present earlier in kernel .text, which means this is a jump
backwards. Absent any information in branch predictor, the cpu predicts it
as taken. Since it is almost never taken in practice, this results in a
completely avoidable misprediction.

Move it past all consumers, so that it is predicted as not taken.

Approved by: re (kib)

Details

Provenance
mjgAuthored on
Parents
rS338827: MFV r338797:
Branches
Unknown
Tags
Unknown