ReXGlue SDK
Loading...
Searching...
No Matches
rex::ppc::CRRegister Struct Reference

#include <rex/ppc/context.h>

Classes

union  [union].__unnamed0__

Public Member Functions

u32 GetRaw () const noexcept
void SetRaw (u32 value) noexcept
template<typename T>
void Compare (T left, T right, const XERRegister &xer) noexcept
void Compare (f64 left, f64 right) noexcept
void SetFromMask (simde__m128 mask, int imm) noexcept
void SetFromMask (simde__m128i mask, int imm) noexcept

Public Attributes

u8 lt
u8 gt
u8 eq
union  

Detailed Description

Condition register (CR) field.

Member Function Documentation

◆ Compare() [1/2]

void rex::ppc::CRRegister::Compare ( f64 left,
f64 right )
inlinenoexcept

Sets lt, gt and eq from a floating point comparison, and un when either operand is NaN.

◆ Compare() [2/2]

template<typename T>
void rex::ppc::CRRegister::Compare ( T left,
T right,
const XERRegister & xer )
inlinenoexcept

Sets lt, gt and eq from an ordered comparison and copies so from the XER.

Parameters
xerThe XER whose so is copied.

◆ GetRaw()

u32 rex::ppc::CRRegister::GetRaw ( ) const
inlinenoexcept

Returns the 4 bit CR field value. The field holds lt in bit 3 down to so in bit 0.

◆ SetFromMask() [1/2]

void rex::ppc::CRRegister::SetFromMask ( simde__m128 mask,
int imm )
inlinenoexcept

Sets lt when the lane sign mask of a float vector equals imm and eq when no sign bit is set. Clears gt and so.

Parameters
maskThe vector whose 4 lane sign bits are tested.
immThe sign mask that sets lt.

◆ SetFromMask() [2/2]

void rex::ppc::CRRegister::SetFromMask ( simde__m128i mask,
int imm )
inlinenoexcept

Sets lt when the byte sign mask of an integer vector equals imm and eq when no sign bit is set. Clears gt and so.

Parameters
maskThe vector whose 16 byte sign bits are tested.
immThe sign mask that sets lt.

◆ SetRaw()

void rex::ppc::CRRegister::SetRaw ( u32 value)
inlinenoexcept

Sets lt, gt, eq and so from the low 4 bits of a CR field value.

Parameters
valueThe CR field value, lt in bit 3 and so in bit 0.

Member Data Documentation

◆ eq

u8 rex::ppc::CRRegister::eq

CR field bit 2, 1 when the operands compared equal.

◆ gt

u8 rex::ppc::CRRegister::gt

CR field bit 1, 1 when the left operand compared greater than the right.

◆ lt

u8 rex::ppc::CRRegister::lt

CR field bit 0, 1 when the left operand compared less than the right.


The documentation for this struct was generated from the following file: