#include <rex/ppc/context.h>
Floating point status and control register (FPSCR).
◆ Platform
Host access to the floating point control word.
◆ DisableFlushMode()
| void rex::ppc::FPSCRRegister::DisableFlushMode |
( |
| ) |
|
|
inlinenoexcept |
Turns off flush to zero mode, writing csr to the host only when the mode was on.
◆ DisableFlushModeUnconditional()
| void rex::ppc::FPSCRRegister::DisableFlushModeUnconditional |
( |
| ) |
|
|
inlinenoexcept |
Turns off flush to zero mode and writes csr to the host without checking its current state.
◆ EnableFlushMode()
| void rex::ppc::FPSCRRegister::EnableFlushMode |
( |
| ) |
|
|
inlinenoexcept |
Turns on flush to zero mode, writing csr to the host only when the mode was off.
◆ EnableFlushModeUnconditional()
| void rex::ppc::FPSCRRegister::EnableFlushModeUnconditional |
( |
| ) |
|
|
inlinenoexcept |
Turns on flush to zero mode and writes csr to the host without checking its current state.
◆ GetCSR()
| u32 rex::ppc::FPSCRRegister::GetCSR |
( |
| ) |
|
|
inlinenoexcept |
Returns the host floating point control register. It is the MXCSR on x86 and the FPCR on ARM.
◆ InitHost()
| void rex::ppc::FPSCRRegister::InitHost |
( |
| ) |
|
|
inlinenoexcept |
Reads the host control word, applies the host exception policy and writes it back.
◆ LoadFromHost()
| u32 rex::ppc::FPSCRRegister::LoadFromHost |
( |
| ) |
|
|
inlinenoexcept |
Reads the host control word into csr.
- Returns
- The guest rounding mode matching the host rounding mode.
◆ RestoreGuestBits()
| void rex::ppc::FPSCRRegister::RestoreGuestBits |
( |
u32 | saved | ) |
|
|
inlinenoexcept |
Restores the guest owned bits of csr from a saved word.
◆ SetCSR()
| void rex::ppc::FPSCRRegister::SetCSR |
( |
u32 | value | ) |
|
|
inlinenoexcept |
Writes the host floating point control register.
- Parameters
-
| value | The MXCSR on x86 and the FPCR on ARM. |
◆ SetFlushMode()
| void rex::ppc::FPSCRRegister::SetFlushMode |
( |
bool | enable | ) |
|
|
inlinenoexcept |
Sets flush to zero mode, writing csr to the host only when the mode changes.
- Parameters
-
| enable | True to turn flush to zero on, false to turn it off. |
◆ StoreToHost()
| void rex::ppc::FPSCRRegister::StoreToHost |
( |
u32 | value | ) |
|
|
inlinenoexcept |
Sets the host rounding mode from a guest rounding mode and writes csr to the host.
- Parameters
-
| value | The guest rounding mode, one of the kRound constants. |
◆ csr
| u32 rex::ppc::FPSCRRegister::csr |
Host floating point control word as last read or written.
◆ kFlushMask
| size_t rex::ppc::FPSCRRegister::kFlushMask = Platform::kFlushMask |
|
staticconstexpr |
Mask of the host flush to zero and denormals are zero bits in csr.
◆ kGuestMask
Bits the guest owns, the rest is host policy set by InitHost.
◆ kRoundMaskVal
| size_t rex::ppc::FPSCRRegister::kRoundMaskVal = Platform::kRoundMaskVal |
|
staticconstexpr |
Mask of the host rounding field in csr.
◆ kRoundShift
| size_t rex::ppc::FPSCRRegister::kRoundShift = Platform::kRoundShift |
|
staticconstexpr |
Bit position of the host rounding field in csr.
The documentation for this struct was generated from the following file: