OpenTTD Source 20260218-master-g2123fca5ea
cpu.h File Reference

Functions related to CPU specific instructions. More...

Go to the source code of this file.

Functions

bool HasCPUIDFlag (uint type, uint index, uint bit)
 Check whether the current CPU has the given flag.

Detailed Description

Functions related to CPU specific instructions.

Definition in file cpu.h.

Function Documentation

◆ HasCPUIDFlag()

bool HasCPUIDFlag ( uint type,
uint index,
uint bit )

Check whether the current CPU has the given flag.

Parameters
typeThe type to be passing to cpuid (usually 1).
indexThe index in the returned info array.
bitThe bit index that needs to be set.
Returns
The value of the bit, or false when there is no CPUID or the type is not available.

Definition at line 80 of file cpu.cpp.

References CPUID(), and HasBit().