OpenASIP  2.0
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
TPEF::InstructionAnnotation Class Reference

#include <InstructionElement.hh>

Collaboration diagram for TPEF::InstructionAnnotation:
Collaboration graph

Public Member Functions

 InstructionAnnotation (Word anId, const std::vector< Byte > &payload)
 
 InstructionAnnotation (Word anId)
 
 ~InstructionAnnotation ()
 
Word id () const
 
Byte byte (Byte index) const
 
const std::vector< Byte > & payload () const
 
void addByte (Byte aByte)
 
Byte size () const
 

Static Public Attributes

static const size_t MAX_ANNOTATION_BYTES = 127
 Maximum number of bytes that annotation may contain. More...
 

Private Attributes

Word id_
 Identifcation code of annotation. More...
 
std::vector< BytepayLoad_
 Data of annotation. More...
 

Detailed Description

Instruction annotation.

Inline annotations allow to argument an instruction element with additional application-dependent information without disrupting the normal work of application.

Definition at line 49 of file InstructionElement.hh.

Constructor & Destructor Documentation

◆ InstructionAnnotation() [1/2]

TPEF::InstructionAnnotation::InstructionAnnotation ( Word  id,
const std::vector< Byte > &  payload 
)

Constructor.

Parameters
idThe id of the annotation.
payloadThe payload data as a char vector.

Definition at line 51 of file InstructionElement.cc.

52  :
53  id_(id), payLoad_(payload) {
54 }

◆ InstructionAnnotation() [2/2]

TPEF::InstructionAnnotation::InstructionAnnotation ( Word  anId)

Constructor

Definition at line 60 of file InstructionElement.cc.

60  : id_(anId) {
61 }

◆ ~InstructionAnnotation()

TPEF::InstructionAnnotation::~InstructionAnnotation ( )

Destructor

Definition at line 66 of file InstructionElement.cc.

66  {
67 }

Member Function Documentation

◆ addByte()

void TPEF::InstructionAnnotation::addByte ( Byte  aByte)

◆ byte()

Byte TPEF::InstructionAnnotation::byte ( Byte  index) const

◆ id()

Word TPEF::InstructionAnnotation::id ( ) const

◆ payload()

const std::vector<Byte>& TPEF::InstructionAnnotation::payload ( ) const

◆ size()

Byte TPEF::InstructionAnnotation::size ( ) const

Member Data Documentation

◆ id_

Word TPEF::InstructionAnnotation::id_
private

Identifcation code of annotation.

Definition at line 69 of file InstructionElement.hh.

◆ MAX_ANNOTATION_BYTES

const size_t TPEF::InstructionAnnotation::MAX_ANNOTATION_BYTES = 127
static

Maximum number of bytes that annotation may contain.

Maximum number of bytes in annotation.

Definition at line 65 of file InstructionElement.hh.

Referenced by InlineAsmParser::addDebugInfoToInlineAsmBB(), llvm::LLVMTCEBuilder::debugDataToAnnotations(), and TTAProgram::ProgramAnnotation::ProgramAnnotation().

◆ payLoad_

std::vector<Byte> TPEF::InstructionAnnotation::payLoad_
private

Data of annotation.

Definition at line 71 of file InstructionElement.hh.


The documentation for this class was generated from the following files:
TPEF::InstructionAnnotation::payload
const std::vector< Byte > & payload() const
TPEF::InstructionAnnotation::id_
Word id_
Identifcation code of annotation.
Definition: InstructionElement.hh:69
TPEF::InstructionAnnotation::payLoad_
std::vector< Byte > payLoad_
Data of annotation.
Definition: InstructionElement.hh:71