LLVM 20.0.0git
Functions | Variables
SIModeRegisterDefaults.cpp File Reference
#include "SIModeRegisterDefaults.h"
#include "GCNSubtarget.h"

Go to the source code of this file.

Functions

static constexpr uint32_t getModeRegisterRoundMode (uint32_t HWFP32Val, uint32_t HWFP64Val)
 Combine f32 and f64 rounding modes into a combined rounding mode value.
 
static constexpr uint64_t encodeFltRoundsTable (uint32_t FltRoundsVal, uint32_t HWF32Val, uint32_t HWF64Val)
 
static constexpr uint64_t encodeFltRoundsTableSame (AMDGPUFltRounds FltRoundsMode, uint32_t HWVal)
 
static constexpr AMDGPUFltRounds decodeIndexFltRoundConversionTable (uint32_t HWMode)
 
static constexpr uint64_t encodeFltRoundsToHWTableSame (uint32_t HWVal, uint32_t FltRoundsVal)
 
static constexpr uint64_t encodeFltRoundsToHWTable (uint32_t HWF32Val, uint32_t HWF64Val, uint32_t FltRoundsVal)
 Decode FLT_ROUNDS into the hardware value where the two rounding modes different and use an extended value.
 
static constexpr uint32_t decodeFltRoundToHWConversionTable (uint64_t FltRoundToHWConversionTable, uint32_t FltRounds)
 Read the hardware rounding mode equivalent of a AMDGPUFltRounds value.
 
static constexpr uint32_t decodeFltRoundToHW (uint32_t FltRounds)
 

Variables

static constexpr uint32_t HWTowardZero = FP_ROUND_ROUND_TO_ZERO
 
static constexpr uint32_t HWNearestTiesToEven = FP_ROUND_ROUND_TO_NEAREST
 
static constexpr uint32_t HWTowardPositive = FP_ROUND_ROUND_TO_INF
 
static constexpr uint32_t HWTowardNegative = FP_ROUND_ROUND_TO_NEGINF
 

Function Documentation

◆ decodeFltRoundToHW()

static constexpr uint32_t decodeFltRoundToHW ( uint32_t  FltRounds)
staticconstexpr

◆ decodeFltRoundToHWConversionTable()

static constexpr uint32_t decodeFltRoundToHWConversionTable ( uint64_t  FltRoundToHWConversionTable,
uint32_t  FltRounds 
)
staticconstexpr

Read the hardware rounding mode equivalent of a AMDGPUFltRounds value.

Definition at line 239 of file SIModeRegisterDefaults.cpp.

References llvm::AMDGPU::ExtendedFltRoundOffset, llvm::AMDGPU::FltRoundToHWConversionTable, and llvm::TowardNegative.

◆ decodeIndexFltRoundConversionTable()

static constexpr AMDGPUFltRounds decodeIndexFltRoundConversionTable ( uint32_t  HWMode)
staticconstexpr

◆ encodeFltRoundsTable()

static constexpr uint64_t encodeFltRoundsTable ( uint32_t  FltRoundsVal,
uint32_t  HWF32Val,
uint32_t  HWF64Val 
)
staticconstexpr

◆ encodeFltRoundsTableSame()

static constexpr uint64_t encodeFltRoundsTableSame ( AMDGPUFltRounds  FltRoundsMode,
uint32_t  HWVal 
)
staticconstexpr

Definition at line 68 of file SIModeRegisterDefaults.cpp.

References encodeFltRoundsTable().

◆ encodeFltRoundsToHWTable()

static constexpr uint64_t encodeFltRoundsToHWTable ( uint32_t  HWF32Val,
uint32_t  HWF64Val,
uint32_t  FltRoundsVal 
)
staticconstexpr

Decode FLT_ROUNDS into the hardware value where the two rounding modes different and use an extended value.

Definition at line 191 of file SIModeRegisterDefaults.cpp.

References llvm::AMDGPU::ExtendedFltRoundOffset, getModeRegisterRoundMode(), and llvm::TowardNegative.

◆ encodeFltRoundsToHWTableSame()

static constexpr uint64_t encodeFltRoundsToHWTableSame ( uint32_t  HWVal,
uint32_t  FltRoundsVal 
)
staticconstexpr

◆ getModeRegisterRoundMode()

static constexpr uint32_t getModeRegisterRoundMode ( uint32_t  HWFP32Val,
uint32_t  HWFP64Val 
)
staticconstexpr

Combine f32 and f64 rounding modes into a combined rounding mode value.

Definition at line 49 of file SIModeRegisterDefaults.cpp.

References llvm::AMDGPU::F32FltRoundOffset, and llvm::AMDGPU::F64FltRoundOffset.

Referenced by encodeFltRoundsTable(), encodeFltRoundsToHWTable(), and encodeFltRoundsToHWTableSame().

Variable Documentation

◆ HWNearestTiesToEven

constexpr uint32_t HWNearestTiesToEven = FP_ROUND_ROUND_TO_NEAREST
staticconstexpr

Definition at line 82 of file SIModeRegisterDefaults.cpp.

◆ HWTowardNegative

constexpr uint32_t HWTowardNegative = FP_ROUND_ROUND_TO_NEGINF
staticconstexpr

Definition at line 84 of file SIModeRegisterDefaults.cpp.

◆ HWTowardPositive

constexpr uint32_t HWTowardPositive = FP_ROUND_ROUND_TO_INF
staticconstexpr

Definition at line 83 of file SIModeRegisterDefaults.cpp.

◆ HWTowardZero

constexpr uint32_t HWTowardZero = FP_ROUND_ROUND_TO_ZERO
staticconstexpr

Definition at line 81 of file SIModeRegisterDefaults.cpp.