gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
condcodes.hh File Reference
#include "base/bitfield.hh"
#include "base/trace.hh"

Go to the source code of this file.

Functions

bool findCarry (int width, uint64_t dest, uint64_t src1, uint64_t src2)
 Calculate the carry flag from an addition. More...
 
bool findOverflow (int width, uint64_t dest, uint64_t src1, uint64_t src2)
 Calculate the overflow flag from an addition. More...
 
bool findParity (int width, uint64_t dest)
 Calculate the parity of a value. More...
 
bool findNegative (int width, uint64_t dest)
 Calculate the negative flag. More...
 
bool findZero (int width, uint64_t dest)
 Calculate the zero flag. More...
 

Function Documentation

bool findCarry ( int  width,
uint64_t  dest,
uint64_t  src1,
uint64_t  src2 
)
inline

Calculate the carry flag from an addition.

This should work even when a carry value is also added in.

Definition at line 43 of file condcodes.hh.

References ArmISA::shift.

Referenced by X86ISA::RegOpBase::genFlags().

bool findNegative ( int  width,
uint64_t  dest 
)
inline

Calculate the negative flag.

Definition at line 81 of file condcodes.hh.

References bits().

Referenced by X86ISA::RegOpBase::genFlags().

bool findOverflow ( int  width,
uint64_t  dest,
uint64_t  src1,
uint64_t  src2 
)
inline

Calculate the overflow flag from an addition.

Definition at line 55 of file condcodes.hh.

References ArmISA::shift, and ULL.

Referenced by X86ISA::RegOpBase::genFlags().

bool findParity ( int  width,
uint64_t  dest 
)
inline

Calculate the parity of a value.

1 is for odd parity and 0 is for even.

Definition at line 65 of file condcodes.hh.

References ArmISA::mask.

Referenced by X86ISA::RegOpBase::genFlags().

bool findZero ( int  width,
uint64_t  dest 
)
inline

Calculate the zero flag.

Definition at line 90 of file condcodes.hh.

References ArmISA::mask.

Referenced by X86ISA::RegOpBase::genFlags().


Generated on Fri Jun 9 2017 13:03:56 for gem5 by doxygen 1.8.6