OpenASIP  2.0
Public Member Functions | Private Member Functions | List of all members
TTAProgram::TerminalInstructionAddress Class Referenceabstract

#include <TerminalInstructionAddress.hh>

Inheritance diagram for TTAProgram::TerminalInstructionAddress:
Inheritance graph
Collaboration diagram for TTAProgram::TerminalInstructionAddress:
Collaboration graph

Public Member Functions

 TerminalInstructionAddress ()
 
virtual ~TerminalInstructionAddress ()
 
bool isInstructionAddress () const
 
virtual Address address () const =0
 
SimValue value () const
 
virtual Terminalcopy () const =0
 
virtual bool equals (const Terminal &other) const =0
 
- Public Member Functions inherited from TTAProgram::TerminalImmediate
 TerminalImmediate (SimValue value)
 
virtual ~TerminalImmediate ()
 
virtual bool isImmediate () const
 
virtual TCEString toString () const
 
- Public Member Functions inherited from TTAProgram::Terminal
 Terminal ()
 
virtual ~Terminal ()
 
virtual bool isAddress () const
 
virtual bool isImmediateRegister () const
 
virtual bool isGPR () const
 
virtual bool isFUPort () const
 
virtual bool isRA () const
 
virtual bool isBasicBlockReference () const
 
virtual bool isProgramOperationReference () const
 
virtual bool isCodeSymbolReference () const
 
virtual bool isUniversalMachineRegister () const
 
virtual const InstructionReferenceinstructionReference () const
 
virtual InstructionReferenceinstructionReference ()
 
virtual const TTAMachine::RegisterFileregisterFile () const
 
virtual const TTAMachine::ImmediateUnitimmediateUnit () const
 
virtual const TTAMachine::FunctionUnitfunctionUnit () const
 
virtual const BasicBlockbasicBlock () const
 
virtual int index () const
 
virtual bool isOpcodeSetting () const
 
virtual bool isTriggering () const
 
virtual Operationoperation () const
 
virtual OperationhintOperation () const
 
virtual int operationIndex () const
 
virtual const TTAMachine::Portport () const
 
virtual void setIndex (int index)
 
virtual void setInstructionReference (InstructionReference ref)
 
bool operator== (const Terminal &other) const
 
- Public Member Functions inherited from TTAProgram::AnnotatedInstructionElement
 AnnotatedInstructionElement ()
 
 ~AnnotatedInstructionElement ()
 
void addAnnotation (const ProgramAnnotation &annotation)
 
void setAnnotation (const ProgramAnnotation &annotation)
 
ProgramAnnotation annotation (int index, ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
 
int annotationCount (ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
 
void removeAnnotations (ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID)
 
bool hasAnnotations (ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
 
bool hasAnnotation (ProgramAnnotation::Id id, const TCEString &data) const
 
void copyAnnotationsFrom (const AnnotatedInstructionElement &other)
 

Private Member Functions

TerminalInstructionAddressoperator= (const TerminalInstructionAddress &)
 Assignment not allowed. More...
 

Additional Inherited Members

- Protected Attributes inherited from TTAProgram::TerminalImmediate
SimValue value_
 Value of the inline immediate. More...
 

Detailed Description

An interface for Terminals that represent inline immediates that refer to (absolute) instruction addresses.

Definition at line 45 of file TerminalInstructionAddress.hh.

Constructor & Destructor Documentation

◆ TerminalInstructionAddress()

TTAProgram::TerminalInstructionAddress::TerminalInstructionAddress ( )

The constructor.

Parameters
valueThe value of the inline immediate (the address).
spaceThe address space of the address the immediate refers to.
refThe instruction this address refers to.

Definition at line 48 of file TerminalInstructionAddress.cc.

48  :
50 }

◆ ~TerminalInstructionAddress()

TTAProgram::TerminalInstructionAddress::~TerminalInstructionAddress ( )
virtual

The destructor.

Definition at line 55 of file TerminalInstructionAddress.cc.

55  {
56 }

Member Function Documentation

◆ address()

virtual Address TTAProgram::TerminalInstructionAddress::address ( ) const
pure virtual

Returns the address held by this terminal.

Returns
A memory address.
Exceptions
WrongSubclassif the terminal is not an instance of TerminalAddress.

Reimplemented from TTAProgram::Terminal.

Implemented in TTAProgram::TerminalProgramOperation, and TTAProgram::TerminalInstructionReference.

Referenced by value().

◆ copy()

virtual Terminal* TTAProgram::TerminalInstructionAddress::copy ( ) const
pure virtual

Creates an exact copy of the terminal and returns it.

Returns
A copy of the terminal.

Reimplemented from TTAProgram::TerminalImmediate.

Implemented in TTAProgram::TerminalProgramOperation, and TTAProgram::TerminalInstructionReference.

◆ equals()

virtual bool TTAProgram::TerminalInstructionAddress::equals ( const Terminal other) const
pure virtual

Checks if terminals are equal.

Parameters
otherTerminal to compare.
Returns
true if terminals are equal.

Reimplemented from TTAProgram::TerminalImmediate.

Implemented in TTAProgram::TerminalProgramOperation, and TTAProgram::TerminalInstructionReference.

◆ isInstructionAddress()

bool TTAProgram::TerminalInstructionAddress::isInstructionAddress ( ) const
inlinevirtual

Tells whether the terminal is an inline immediate value that refers to an instruction address.

Returns
True if the terminal is an inline immediate value that refers to an instruction address.

Reimplemented from TTAProgram::Terminal.

Definition at line 50 of file TerminalInstructionAddress.hh.

50 { return true; }

◆ operator=()

TerminalInstructionAddress& TTAProgram::TerminalInstructionAddress::operator= ( const TerminalInstructionAddress )
private

Assignment not allowed.

◆ value()

SimValue TTAProgram::TerminalInstructionAddress::value ( ) const
inlinevirtual

Returns the value of the inline immediate.

Returns
The value of the inline immediate.
Exceptions
WrongSubclassnever.

Reimplemented from TTAProgram::TerminalImmediate.

Definition at line 53 of file TerminalInstructionAddress.hh.

53  {
54  return SimValue(address().location(), WORD_BITWIDTH);
55  }

References address(), and WORD_BITWIDTH.

Here is the call graph for this function:

The documentation for this class was generated from the following files:
TTAProgram::TerminalImmediate::TerminalImmediate
TerminalImmediate(SimValue value)
Definition: TerminalImmediate.cc:48
SimValue
Definition: SimValue.hh:96
TTAProgram::TerminalInstructionAddress::address
virtual Address address() const =0
WORD_BITWIDTH
const Byte WORD_BITWIDTH
Definition: BaseType.hh:138