HomeFreeBSD

Evaluating htons() at compile time is more efficient than doing ntohs()

Description

Evaluating htons() at compile time is more efficient than doing ntohs()
at runtime. This change removes a dependency on a barrel shifter pass
before branch resolution, while reducing the instruction stream size
by 9 bytes on amd64.

MFC after: 3 days

Details

Provenance
zecAuthored on Jun 19 2019, 8:39 AM
Parents
rGda761f3b1f02: Implement VT-d capability detection on chipsets that have multiple
Branches
Unknown
Tags
Unknown