OpenASIP  2.0
FixedRegisters.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 FixedRegisters.hh
26  *
27  * Declaration of FixedRegisters class.
28  *
29  * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_FIXED_REGISTERS_HH
34 #define TTA_FIXED_REGISTERS_HH
35 
36 #include <vector>
37 #include <cstddef>
38 
39 class SimValue;
40 
41 /**
42  * Contains all the registers that are assigned to special purpose.
43  */
45 public:
47  virtual ~FixedRegisters();
48 
49  SimValue& stackPointer() const;
50  SimValue& integerArgumentRegister(int index) const;
51  SimValue& floatArgumentRegister(int index) const;
53  SimValue& floatReturnValue() const;
54 
55  void setStackPointer(SimValue& value);
58  void setIntegerReturnValue(SimValue& value);
59  void setFloatReturnValue(SimValue& value);
60 
61 private:
62  /// Copying not allowed.
64  /// Assignment not allowed.
66 
67  /// Stack pointer.
69  /// Integer argument registers.
70  std::vector<SimValue*> integerArgs_;
71  /// Floating point argument registers.
72  std::vector<SimValue*> floatArgs_;
73  /// Integer return value.
75  /// Floating point return value.
77 };
78 
79 #endif
FixedRegisters::integerArgumentRegister
SimValue & integerArgumentRegister(int index) const
Definition: FixedRegisters.cc:70
FixedRegisters::floatReturnValue
SimValue & floatReturnValue() const
Definition: FixedRegisters.cc:111
FixedRegisters::stackPointer
SimValue & stackPointer() const
Definition: FixedRegisters.cc:55
FixedRegisters::~FixedRegisters
virtual ~FixedRegisters()
Definition: FixedRegisters.cc:46
SimValue
Definition: SimValue.hh:96
FixedRegisters::setFloatReturnValue
void setFloatReturnValue(SimValue &value)
Definition: FixedRegisters.cc:164
FixedRegisters::addFloatArgumentRegister
void addFloatArgumentRegister(SimValue &value)
Definition: FixedRegisters.cc:144
FixedRegisters::intReturnValue_
SimValue * intReturnValue_
Integer return value.
Definition: FixedRegisters.hh:74
FixedRegisters::floatReturnValue_
SimValue * floatReturnValue_
Floating point return value.
Definition: FixedRegisters.hh:76
FixedRegisters::integerReturnValue
SimValue & integerReturnValue() const
Definition: FixedRegisters.cc:98
FixedRegisters::stackPointer_
SimValue * stackPointer_
Stack pointer.
Definition: FixedRegisters.hh:68
FixedRegisters::FixedRegisters
FixedRegisters()
Definition: FixedRegisters.cc:39
FixedRegisters::addIntegerArgumentRegister
void addIntegerArgumentRegister(SimValue &value)
Definition: FixedRegisters.cc:134
FixedRegisters::integerArgs_
std::vector< SimValue * > integerArgs_
Integer argument registers.
Definition: FixedRegisters.hh:70
FixedRegisters::setStackPointer
void setStackPointer(SimValue &value)
Definition: FixedRegisters.cc:124
FixedRegisters::floatArgumentRegister
SimValue & floatArgumentRegister(int index) const
Definition: FixedRegisters.cc:85
FixedRegisters::setIntegerReturnValue
void setIntegerReturnValue(SimValue &value)
Definition: FixedRegisters.cc:154
FixedRegisters::operator=
FixedRegisters & operator=(const FixedRegisters)
Assignment not allowed.
FixedRegisters
Definition: FixedRegisters.hh:44
FixedRegisters::floatArgs_
std::vector< SimValue * > floatArgs_
Floating point argument registers.
Definition: FixedRegisters.hh:72