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
Parents
rS349184: Implement VT-d capability detection on chipsets that have multiple
Branches
Unknown
Tags
Unknown