LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
cpu.hh
Go to the documentation of this file.
1
6
#ifndef TARGET_CPU_HH
7
# define TARGET_CPU_HH
8
9
# include <memory>
10
# include <vector>
11
12
# include <
temp/fwd.hh
>
13
14
namespace
target
15
{
16
18
class
Cpu
19
{
22
public
:
24
Cpu
();
26
virtual
~Cpu
();
32
public
:
34
virtual
size_t
word_size_get
()
const
= 0;
35
37
virtual
size_t
nb_regs
()
const
;
38
40
virtual
const
temp::Temp
&
fp_reg
()
const
= 0;
41
43
virtual
const
temp::Temp
&
result_reg
()
const
= 0;
44
46
virtual
const
temp::TempMap
&
tempmap_get
()
const
;
47
49
virtual
const
temp::temp_list_type
&
argument_regs
()
const
;
50
52
virtual
const
temp::temp_set_type
&
caller_save_regs
()
const
;
53
55
virtual
const
temp::temp_set_type
&
callee_save_regs
()
const
;
56
58
virtual
const
temp::temp_set_type
&
special_regs
()
const
;
59
61
virtual
temp::temp_set_type
registers_get
()
const
;
67
protected
:
69
virtual
void
argument_reg
(
const
std::string& name);
70
72
virtual
void
caller_save_reg
(
const
std::string& name);
73
75
virtual
void
callee_save_reg
(
const
std::string& name);
76
78
virtual
void
special_reg
(
const
temp::Temp
& t);
84
protected
:
86
temp::temp_set_type
callee_save_registers_
;
87
89
temp::temp_set_type
caller_save_registers_
;
90
92
temp::temp_list_type
argument_registers_
;
93
95
temp::temp_set_type
special_registers_
;
96
98
std::unique_ptr<temp::TempMap>
tempmap_
;
101
public
:
103
std::ostream&
dump
(std::ostream& ostr)
const
;
104
};
105
107
std::ostream&
operator<<
(std::ostream& ostr,
const
Cpu
& cpu);
108
109
}
// namespace target
110
111
#endif // !TARGET_CPU_HH
target
cpu.hh
Generated on Wed Mar 5 2014 15:47:37 for LRDE Tiger Compiler by
1.8.1.2