HomeFreeBSD

lahf/sahf are supported on some amd64 processors

Description

lahf/sahf are supported on some amd64 processors

While the instructions were not included into the original instruction
set, their support can be indicated by a special feature bit.
For example:

CPU: AMD Phenom(tm) II X4 955 Processor (3214.71-MHz K8-class CPU)
...
  AMD Features2=0x37ff<LAHF, ...>

Clang 3.8 uses lahf/sahf as a faster alternative to pushf/popf where
possible.

MFC after: 2 weeks

Details

Provenance
avgAuthored on
Parents
rS298472: MFV r298471: 6052 decouple lzc_create() from the implementation details
Branches
Unknown
Tags
Unknown