Operator.xcc
Benoit Dupont de Dinechin (Benoit.Dupont-de-Dinechin@st.com).
Copyright 2002 - 2007 STMicroelectronics. Copyright 1995 - 1998 Commissariat a l'Energie Atomique.
This program is free software; you can redistribute it and/or modify it under the terms of either (at your option): the GNU General Public License (GPL) version 2; the GNU Lesser General Public License (LGPL) version 2.1; any later version of these licences as published by the Free Software Foundation.
OperatorParameter_kind— OperatorParameterKind of this OperatorParameter.
static inline OperatorParameterKind OperatorParameter_kind(const_OperatorParameter this) { return (OperatorParameterKind)OperatorParameter_KIND(this); }
OperatorParameter_rank— Rank of this OperatorParameter in the Instance Operand list.
- Return
- 0 if the OperatorParameter has no corresponding Operand.
static inline int OperatorParameter_rank(const_OperatorParameter this) { return OperatorParameter_RANK(this); }
OperatorParameter_type— The OperandType of this OperatorParameter.
static inline OperandType OperatorParameter_type(const_OperatorParameter this) { return (OperandType)OperatorParameter_TYPE(this); }
OperatorParameter_enum— The Modifier/Immediate/RegClass/Regmask of this OperatorParameter.
static inline int OperatorParameter_enum(const_OperatorParameter this) { return OperatorParameter_ENUM(this); }
OperatorParameter_same— The Index of the OperatorParameter that must get the same encoding as this OperatorParameter; -1 if none. Used to identify Instance Operands that are both read and written.
static inline int OperatorParameter_same(const_OperatorParameter this) { return OperatorParameter_SAME(this); }
OperatorParameter_FOREACH_ConflictIndex— Iterate over this OperatorParameter
conflicting OperatorParameter indices . These Parameters must get different
encodings (e.g., different Registers). The indices are listed in increasing
order.
Continuing with continue
, and exiting with break
or return
are allowed.
#define OperatorParameter_FOREACH_ConflictIndex(this,index) { \ const int8_t* OperatorParameter_ITER = OperatorParameter_CONFLICTS(this); \ const int8_t* OperatorParameter_FENCE = OperatorParameter_ITER \ + OperatorParameter_COUNT(this); \ for (; OperatorParameter_ITER < OperatorParameter_FENCE; \ ++OperatorParameter_ITER) { \ const int index = *OperatorParameter_ITER; #define OperatorParameter_ENDEACH_ConflictIndex \ } \ }
OperatorParameterArray— Array of OperatorParameter(s).
struct OperatorParameterArray_ { int16_t WRITECOUNT; int16_t READCOUNT; const OperatorParameter_ *ITEMS; };
OperatorParameterArray_readCount— Argument count in this OperatorParameterArray.
static inline int OperatorParameterArray_readCount(const_OperatorParameterArray this) { return OperatorParameterArray_READCOUNT(this); }
OperatorParameterArray_writeCount— Result count in this OperatorParameterArray.
static inline int OperatorParameterArray_writeCount(const_OperatorParameterArray this) { return OperatorParameterArray_WRITECOUNT(this); }
OperatorParameterArray_count— OperatorParameter count in this OperatorParameterArray.
static inline int OperatorParameterArray_count(const_OperatorParameterArray this) { return OperatorParameterArray_READCOUNT(this) + OperatorParameterArray_WRITECOUNT(this); }
OperatorParameterArray_items— For use by OperatorParameterArray_FOREACH_OperatorParameter.
static inline const OperatorParameter_ * OperatorParameterArray_items(const_OperatorParameterArray this) { return OperatorParameterArray_ITEMS(this); }
OperatorParameterArray_readParameters— Pointer to the argument OperatorParameter(s).
static inline const OperatorParameter_ * OperatorParameterArray_readParameters(const_OperatorParameterArray this) { return OperatorParameterArray_ITEMS(this) + OperatorParameterArray_WRITECOUNT(this); }
OperatorParameterArray_writeParameters— Pointer to the result OperatorParameter(s).
static inline const OperatorParameter_ * OperatorParameterArray_writeParameters(const_OperatorParameterArray this) { return OperatorParameterArray_ITEMS(this) + 0; }
OperatorParameterArray_FOREACH_OperatorParameter— Iterate over this OperatorParameterArray OperatorParameter(s).
#define OperatorParameterArray_FOREACH_OperatorParameter(this, parameter) { \ const OperatorParameter_ *OperatorParameterArray_ITEMS = OperatorParameterArray_items(this); \ int OperatorParameterArray_COUNT = OperatorParameterArray_count(this); \ int OperatorParameterArray_INDEX = 0; \ for (; OperatorParameterArray_INDEX < OperatorParameterArray_COUNT; \ OperatorParameterArray_INDEX++) { \ const_OperatorParameter parameter = \ OperatorParameterArray_ITEMS + OperatorParameterArray_INDEX; #define OperatorParameterArray_ENDEACH_OperatorParameter \ } \ }
Operator_name_— Names for the Operator enumeration.
extern const char * Operator_name_(Operator this);
Operator_attributes— Access this Operator attributes.
OperatorAttributes Operator_attributes(Operator this);
Operator_instance— This Operator Instance for a Processor.
Instance Operator_instance(Operator this, Processor processor);
Operator_mnemonic— This Operator Mnemonic attribute.
const char * Operator_mnemonic(Operator this);
Operator_parameterArray— This Operator OperatorParameterArray.
const_OperatorParameterArray Operator_parameterArray(Operator this);
Operator_readCount— This Operator count of argument OperatorParameter(s).
static inline int Operator_readCount(Operator this) { const_OperatorParameterArray parameterArray = Operator_parameterArray(this); return OperatorParameterArray_readCount(parameterArray); }
Operator_writeCount— This Operator count of result OperatorParameter(s).
static inline int Operator_writeCount(Operator this) { const_OperatorParameterArray parameterArray = Operator_parameterArray(this); return OperatorParameterArray_writeCount(parameterArray); }
Operator_readParameter— Access the read OperatorParameter at readIndex.
static inline const_OperatorParameter Operator_readParameter(Operator this, int readIndex) { const_OperatorParameterArray parameterArray = Operator_parameterArray(this); Except_REQUIRE( readIndex >= 0 && readIndex < OperatorParameterArray_READCOUNT(parameterArray)); return OperatorParameterArray_readParameters(parameterArray) + readIndex; }
Operator_writeParameter— Access the write OperatorParameter at writeIndex.
static inline const_OperatorParameter Operator_writeParameter(Operator this, int writeIndex) { const_OperatorParameterArray parameterArray = Operator_parameterArray(this); Except_REQUIRE( writeIndex >= 0 && writeIndex < OperatorParameterArray_WRITECOUNT(parameterArray)); return OperatorParameterArray_writeParameters(parameterArray) + writeIndex; }
Operator_getReadOperandType— The Operator read index where the OperandType is.
int8_t Operator_getReadOperandType(Operator this, OperandType type);
Operator_getReadParameterKind— The Operator read index where the OperatorParameterKind is.
int8_t Operator_getReadParameterKind(Operator this, OperatorParameterKind kind);
Operator_isFixRegisterRAW— True if Register RAW latency needs a fix.
bool Operator_isFixRegisterRAW(Operator this);
Operator_selectInstance— Select a suitable instance for the processor.
Instance Operator_selectInstance(Operator this, Processor processor);
Operator_require— The register lifetime flow requirements.
int Operator_require(Operator this, RegFile regFile);
Operator_baseAddressIndex— The index of this Operator base address OperatorParameter(s).
- Return
- The index starting at 0 of base address OperatorParameter among writes.
int Operator_baseAddressIndex(Operator this);
Operator_memoryAccessSize— Get the access size in bytes of a memory access.
int Operator_memoryAccessSize(Operator this);
Operator_isXXX— Test if this Operator is a XXX.
#define Operator_isEntry(this) ((this) == Operator_ENTRY) #define Operator_isLabel(this) ((this) == Operator_LABEL) #define Operator_isFall(this) ((this) == Operator_FALL) #define Operator_isLoop(this) ((this) == Operator_LOOP) #define Operator_isPhi(this) ((this) == Operator_PHI) #define Operator_isPsi(this) ((this) == Operator_PSI) #define Operator_isSigma(this) ((this) == Operator_SIGMA) #define Operator_isSsa(this) ((this) >= Operator_PHI && (this) <= Operator_SIGMA) #define Operator_isKill(this) ((this) == Operator_KILL) #define Operator_isECopy(this) ((this) == Operator_ECOPY) #define Operator_isLCopy(this) ((this) == Operator_LCOPY) #define Operator_isPCopy(this) ((this) == Operator_PCOPY) #define Operator_isPseudo(this) \ (Operator_attributes(this)>>OperatorAttribute_Pseudo & 1) #define Operator_isReadList(this) \ (Operator_attributes(this)>>OperatorAttribute_ReadList & 1) #define Operator_isWriteList(this) \ (Operator_attributes(this)>>OperatorAttribute_WriteList & 1) #define Operator_isMulti(this) \ (Operator_attributes(this)>>OperatorAttribute_Multi & 1) #define Operator_isControl(this) \ (Operator_attributes(this)>>OperatorAttribute_Control & 1) #define Operator_isMemoryRead(this) \ (Operator_attributes(this)>>OperatorAttribute_MemoryRead & 1) #define Operator_isMemoryWrite(this) \ (Operator_attributes(this)>>OperatorAttribute_MemoryWrite & 1) #define Operator_isMemoryEffect(this) ( \ (Operator_attributes(this) & ((1<<OperatorAttribute_MemoryWrite))) \ || Operator_isMemoryBarrier(this) \ || Operator_isPrefetch(this) \ ) #define Operator_isMemory(this) ( \ ( Operator_attributes(this) \ & ((1<<OperatorAttribute_MemoryRead)|(1<<OperatorAttribute_MemoryWrite))) \ || Operator_isMemoryBarrier(this) \ || Operator_isPrefetch(this) \ ) #define Operator_isConditional(this) \ (Operator_attributes(this)>>OperatorAttribute_Conditional & 1) #define Operator_isParCopy(this) \ ((unsigned)((this) - Operator_PCOPY) <= (unsigned)(Operator_LCOPY - Operator_PCOPY))
Operator_isSeqCopy— Test if this Operator is a COPY.
In this case result 0 is the destination and argument 0 is the source.
bool Operator_isSeqCopy(Operator this);
Operator_isAdd— Test if this Operator is an ADD.
bool Operator_isAdd(Operator this);
Operator_isAdditive— Test if this Operator is additive.
An operator OP is additive if OP(a, b) = OP(a+c, b-c).
bool Operator_isAdditive(Operator this, int aIndex, int bIndex);
Operator_isSubtractive— Test if this Operator is subtractive.
An operator OP is subtractive if OP(a, b) = OP(a+c, b+c).
bool Operator_isSubtractive(Operator this, int aIndex, int bIndex);
Operator_isTranslative— Test if this Operator is translative.
An operator OP is translative if OP(a+c, b+c) = OP(a, b) + c.
bool Operator_isTranslative(Operator this, int aIndex, int bIndex);
Operator_isAssociative— Test if this Operator is associative.
An operator OP is associative if OP(OP(a, b), c) = OP(a, OP(b, c)).
bool Operator_isAssociative(Operator this, int aIndex, int bIndex);
Operator_isCommutative— Test if this Operator is commutative.
An operator OP is commutative if OP(a, b) = OP(b, a).
bool Operator_isCommutative(Operator this, int aIndex, int bIndex);
Operator_isGoTo— Test if this Operator is a GOTO operator.
A GOTO operator branches to a PC-relative or an absolute address, and has one or two targets.
bool Operator_isGoTo(Operator this);
Operator_isJump— Test if this Operator is a JUMP operator.
A JUMP operator branches to an address contained in a register.
bool Operator_isJump(Operator this);
Operator_isBranch— Test if this Operator is a branch operator.
A branch is a control-flow change that remains inside the function.
bool Operator_isBranch(Operator this);
Operator_isCall— Test if this Operator is a CALL operator.
A CALL operator branches to a PC-relative or an absolute address.
bool Operator_isCall(Operator this);
Operator_isLink— Test if this Operator is a LINK operator.
bool Operator_isLink(Operator this);
Operator_isRoutine— Test if this Operator is a function call operator.
bool Operator_isRoutine(Operator this);
Operator_isReturn— Test if this Operator is a function return operator.
bool Operator_isReturn(Operator this);
Operator_isGNUASM— Test if this Operator is a GNU ASM.
bool Operator_isGNUASM(Operator this);
Operator_isMemoryBarrier— Test if this Operator is a memory barrier.
bool Operator_isMemoryBarrier(Operator this);
Operator_isStalling— Test if this Operator is stalling the processor.
Should be true for Operators that almost always stall the processor, and not true for Operators that occasionally stall like memory accesses with cache misses.
bool Operator_isStalling(Operator this);
Operator_isPrefetch— Test if this Operator prefetches memory.
bool Operator_isPrefetch(Operator this);
Operator_isSafeLoad— Test if this Operator is a safe memory load.
bool Operator_isSafeLoad(Operator this);
Operator_speculate— Speculate this Operator.
Operator Operator_speculate(Operator this, Processor processor);
Operator_predicatePositive— The predicated on true variant of this Operator.
Operator Operator_predicatePositive(Operator this, Processor processor);
Operator_predicateNegative— The predicated on false variant of this Operator.
Operator Operator_predicateNegative(Operator this, Processor processor);
Operator_predicateIndex— This Operator predicate argument index.
int Operator_predicateIndex(Operator this);
Operator_predicatePolarity— This Operator predicate polarity.
int Operator_predicatePolarity(Operator this);
Operator_unpredicate— The predicated on false variant of this Operator.
Operator Operator_unpredicate(Operator this, Processor processor);
Operator_complementWrite— Complement this operator on the designated write parameter.
Operator Operator_complementWrite(Operator this, Processor processor, int32_t writeIndex);
Operator_complementRead— Complement this operator on the designated read parameter.
Operator Operator_complementRead(Operator this, Processor processor, int32_t readIndex);
Operator_isHWLSkip— Test if this Operator is a Hardware Loop Skip.
static inline bool Operator_isHWLSkip(Operator this) { return false; }
Operator_isHWLBreak— Test if this Operator is a Hardware Loop Break.
static inline bool Operator_isHWLBreak(Operator this) { return false; }
Operator_isHWLIter— Test if this Operator is a Hardware Loop Iter.
static inline bool Operator_isHWLIter(Operator this) { return false; }
Operator_isHWLBranch— Test if this Operator is a Hardware Loop Branch.
static inline bool Operator_isHWLBranch(Operator this) { return false; }
Operator_isHWLPseudo— Test if this Operator is a Hardware Loop Pseudo.
static inline bool Operator_isHWLPseudo(Operator this) { return false; }
st200-Operator.xcc
Benoit Dupont de Dinechin (Benoit.Dupont-de-Dinechin@st.com).
Copyright 2002 - 2007 STMicroelectronics. Copyright 1995 - 1998 Commissariat a l'Energie Atomique.
This program is free software; you can redistribute it and/or modify it under the terms of either (at your option): the GNU General Public License (GPL) version 2; the GNU Lesser General Public License (LGPL) version 2.1; any later version of these licences as published by the Free Software Foundation.