OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
DisassemblyFPRegister Class Reference

#include <DisassemblyFPRegister.hh>

Inheritance diagram for DisassemblyFPRegister:
Inheritance graph
Collaboration diagram for DisassemblyFPRegister:
Collaboration graph

Public Member Functions

 DisassemblyFPRegister (Word index)
 
virtual ~DisassemblyFPRegister ()
 
virtual std::string toString () const
 
- Public Member Functions inherited from DisassemblyElement
virtual ~DisassemblyElement ()
 

Private Attributes

Word index_
 Index of the register. More...
 

Additional Inherited Members

- Protected Member Functions inherited from DisassemblyElement
 DisassemblyElement ()
 

Detailed Description

Represents a floating point register in the disassembler.

Definition at line 42 of file DisassemblyFPRegister.hh.

Constructor & Destructor Documentation

◆ DisassemblyFPRegister()

DisassemblyFPRegister::DisassemblyFPRegister ( Word  index)

The Constructor.

Parameters
indexIndex of the register.

Definition at line 41 of file DisassemblyFPRegister.cc.

41  :
43  index_(index) {
44 }

◆ ~DisassemblyFPRegister()

DisassemblyFPRegister::~DisassemblyFPRegister ( )
virtual

The destructor.

Definition at line 50 of file DisassemblyFPRegister.cc.

50  {
51 }

Member Function Documentation

◆ toString()

std::string DisassemblyFPRegister::toString ( ) const
virtual

Returns disassembly of the float register.

Returns
Disassembly of the float register as a string.

Implements DisassemblyElement.

Definition at line 60 of file DisassemblyFPRegister.cc.

60  {
61 
62  // Registers reserved for passing and returning function parameters.
63  switch (index_) {
64  case 0: return "fres0";
65  case 1: return "farg1";
66  case 2: return "farg2";
67  case 3: return "farg3";
68  case 4: return "farg4";
69  }
70 
71  return "f" + Conversion::toString(index_);
72 }

References index_, and Conversion::toString().

Here is the call graph for this function:

Member Data Documentation

◆ index_

Word DisassemblyFPRegister::index_
private

Index of the register.

Definition at line 49 of file DisassemblyFPRegister.hh.

Referenced by toString().


The documentation for this class was generated from the following files:
Conversion::toString
static std::string toString(const T &source)
DisassemblyFPRegister::index_
Word index_
Index of the register.
Definition: DisassemblyFPRegister.hh:49
DisassemblyElement::DisassemblyElement
DisassemblyElement()
Definition: DisassemblyElement.cc:38