OpenASIP
2.0
src
base
program
MoveGuard.cc
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 MoveGuard.cc
26
*
27
* Implementation of MoveGuard class.
28
*
29
* @author Ari Metsähalme 2005 (ari.metsahalme-no.spam-tut.fi)
30
* @note rating: red
31
*/
32
33
#include "
MoveGuard.hh
"
34
#include "
Guard.hh
"
35
36
using namespace
TTAMachine
;
37
38
namespace
TTAProgram
{
39
40
/////////////////////////////////////////////////////////////////////////////
41
// MoveGuard
42
/////////////////////////////////////////////////////////////////////////////
43
44
/**
45
* Constructor.
46
47
* @param guard The guard.
48
*/
49
MoveGuard::MoveGuard(
const
TTAMachine::Guard
& guard):
50
guard_(&guard) {
51
}
52
53
/**
54
* Destructor.
55
*/
56
MoveGuard::~MoveGuard
() {
57
}
58
59
/**
60
* Tells whether this guard is a constant true or false value.
61
*
62
* @return false always.
63
*/
64
bool
65
MoveGuard::isUnconditional
()
const
{
66
return
false
;
67
}
68
69
/**
70
* Tells whether the guard is inverted or not.
71
*
72
* @return True if the Boolean value computed out of the contents of
73
* the source register is inverted.
74
*/
75
bool
76
MoveGuard::isInverted
()
const
{
77
return
guard_
->
isInverted
();
78
}
79
80
/**
81
* Returns the guard object.
82
*
83
* @return The guard object.
84
*/
85
const
Guard
&
86
MoveGuard::guard
()
const
{
87
return
*
guard_
;
88
}
89
90
/**
91
* Makes a copy of the move guard.
92
*
93
* @return A copy of the move guard.
94
*/
95
MoveGuard
*
96
MoveGuard::copy
()
const
{
97
return
new
MoveGuard
(*
guard_
);
98
}
99
100
}
TTAMachine::Guard
Definition:
Guard.hh:55
TTAProgram
Definition:
Estimator.hh:65
TTAProgram::MoveGuard::isInverted
bool isInverted() const
Definition:
MoveGuard.cc:76
Guard.hh
TTAMachine::Guard::isInverted
virtual bool isInverted() const
TTAProgram::MoveGuard::MoveGuard
MoveGuard(const TTAMachine::Guard &guard)
Definition:
MoveGuard.cc:49
TTAProgram::MoveGuard::guard_
const TTAMachine::Guard * guard_
The guard object.
Definition:
MoveGuard.hh:65
TTAProgram::MoveGuard::copy
MoveGuard * copy() const
Definition:
MoveGuard.cc:96
TTAProgram::MoveGuard::guard
const TTAMachine::Guard & guard() const
Definition:
MoveGuard.cc:86
TTAMachine
Definition:
Assembler.hh:48
TTAProgram::MoveGuard
Definition:
MoveGuard.hh:47
TTAProgram::MoveGuard::isUnconditional
bool isUnconditional() const
Definition:
MoveGuard.cc:65
MoveGuard.hh
TTAProgram::MoveGuard::~MoveGuard
~MoveGuard()
Definition:
MoveGuard.cc:56
Generated by
1.8.17