OpenASIP
2.0
src
base
tpef
ImmediateElement.hh
Go to the documentation of this file.
1
/*
2
Copyright (c) 2002-2009 Tampere University.
3
4
This file is part of TTA-Based Codesign Environment (TCE).
5
6
Permission is hereby granted, free of charge, to any person obtaining a
7
copy of this software and associated documentation files (the "Software"),
8
to deal in the Software without restriction, including without limitation
9
the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
and/or sell copies of the Software, and to permit persons to whom the
11
Software is furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
DEALINGS IN THE SOFTWARE.
23
*/
24
/**
25
* @file ImmediateElement.hh
26
*
27
* Declaration of ImmediateElement class.
28
*
29
* @author Mikael Lepistö 2003 (tmlepist-no.spam-cs.tut.fi)
30
* @note reviewed 21 October 2003 by ml, jn, rl, pj
31
*
32
* @note rating: yellow
33
*/
34
35
#ifndef TTA_IMMEDIATE_ELEMENT_HH
36
#define TTA_IMMEDIATE_ELEMENT_HH
37
38
#include <vector>
39
40
#include "
TPEFBaseType.hh
"
41
#include "
InstructionElement.hh
"
42
#include "
Exception.hh
"
43
44
namespace
TPEF
{
45
46
/**
47
* Immediate data element of CodeSection.
48
*/
49
class
ImmediateElement
:
public
InstructionElement
{
50
public
:
51
ImmediateElement
();
52
virtual
~ImmediateElement
();
53
54
bool
isInline
()
const
;
55
56
void
addByte
(
Byte
aByte);
57
58
Byte
byte
(
unsigned
int
index)
const
;
59
60
void
setByte
(
unsigned
int
index,
Byte
aValue);
61
62
void
setWord
(Word aValue);
63
void
setSignedWord
(SignedWord aValue);
64
void
setSignedLong
(
SLongWord
aValue);
65
void
setULongWord
(
ULongWord
aValue);
66
67
Word
word
()
const
;
68
69
LongWord
longWord
()
const
;
70
SignedLongWord
sLongWord
()
const
;
71
72
SignedWord
signedWord
()
const
;
73
74
unsigned
int
length
()
const
;
75
76
Byte
destinationUnit
()
const
;
77
void
setDestinationUnit
(
Byte
aDestinationUnit);
78
79
Byte
destinationIndex
()
const
;
80
void
setDestinationIndex
(
Byte
aDestinationIndex);
81
82
private
:
83
/// Value of immediate.
84
std::vector<Byte>
value_
;
85
/// Destination unit of immediate.
86
Byte
destinationUnit_
;
87
/// Destination index of immediate.
88
Byte
destinationIndex_
;
89
};
90
}
91
92
#include "
ImmediateElement.icc
"
93
94
#endif
TPEF::ImmediateElement::sLongWord
SignedLongWord sLongWord() const
TPEF::ImmediateElement::destinationIndex
Byte destinationIndex() const
Exception.hh
TPEF::ImmediateElement::addByte
void addByte(Byte aByte)
TPEF::InstructionElement
Definition:
InstructionElement.hh:77
TPEF::ImmediateElement::ImmediateElement
ImmediateElement()
Definition:
ImmediateElement.cc:43
TPEF::ImmediateElement::setDestinationIndex
void setDestinationIndex(Byte aDestinationIndex)
TPEF::ImmediateElement::setByte
void setByte(unsigned int index, Byte aValue)
TPEF::ImmediateElement::setWord
void setWord(Word aValue)
TPEF::ImmediateElement::setSignedWord
void setSignedWord(SignedWord aValue)
TPEF::ImmediateElement::word
Word word() const
TPEF::ImmediateElement
Definition:
ImmediateElement.hh:49
InstructionElement.hh
Byte
unsigned char Byte
Definition:
BaseType.hh:116
TPEF::ImmediateElement::longWord
LongWord longWord() const
TPEF::ImmediateElement::setULongWord
void setULongWord(ULongWord aValue)
TPEF::ImmediateElement::setDestinationUnit
void setDestinationUnit(Byte aDestinationUnit)
LongWord
unsigned long LongWord
Definition:
BaseType.hh:49
TPEF::ImmediateElement::destinationUnit_
Byte destinationUnit_
Destination unit of immediate.
Definition:
ImmediateElement.hh:86
TPEF::ImmediateElement::destinationIndex_
Byte destinationIndex_
Destination index of immediate.
Definition:
ImmediateElement.hh:88
ImmediateElement.icc
TPEF::ImmediateElement::signedWord
SignedWord signedWord() const
TPEF::ImmediateElement::byte
Byte byte(unsigned int index) const
TPEF::ImmediateElement::setSignedLong
void setSignedLong(SLongWord aValue)
ULongWord
unsigned long ULongWord
Definition:
BaseType.hh:51
TPEF::ImmediateElement::destinationUnit
Byte destinationUnit() const
TPEFBaseType.hh
TPEF::ImmediateElement::~ImmediateElement
virtual ~ImmediateElement()
Definition:
ImmediateElement.cc:50
TPEF::ImmediateElement::length
unsigned int length() const
SignedLongWord
long SignedLongWord
Definition:
BaseType.hh:50
SLongWord
long SLongWord
Definition:
BaseType.hh:52
TPEF::ImmediateElement::isInline
bool isInline() const
TPEF
Definition:
Assembler.hh:43
TPEF::ImmediateElement::value_
std::vector< Byte > value_
Value of immediate.
Definition:
ImmediateElement.hh:84
Generated by
1.8.17