LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
gas-assembly.hh
Go to the documentation of this file.
1 
6 #ifndef TARGET_IA32_GAS_ASSEMBLY_HH
7 # define TARGET_IA32_GAS_ASSEMBLY_HH
8 
9 # include <target/assembly.hh>
10 
11 namespace target
12 {
13 
14  namespace ia32
15  {
16 
20  class GasAssembly : public Assembly
21  {
24  public:
26  GasAssembly ();
28  virtual ~GasAssembly ();
34  public:
35  std::string binop_inst (const tree::Binop::Oper& op) const;
36 
39  const temp::Temp& left,
40  const temp::Temp& right,
41  const temp::Temp& res) const;
42 
45  const temp::Temp& left,
46  int right,
47  const temp::Temp& res) const;
53  public:
56  const temp::Temp& dst) const;
59  assem::Instrs move_build (int immediate,
60  const temp::Temp& dst) const;
61 
63  assem::Instrs move_build (const temp::Label& label,
64  const temp::Temp& dst) const;
65 
67  assem::Instrs load_build (const temp::Temp& base,
68  int offset,
69  const temp::Temp& dst) const;
71  assem::Instrs load_build (const temp::Temp& base,
72  const temp::Temp& dst) const;
74  assem::Instrs load_build (int absolute,
75  const temp::Temp& dst) const;
76 
79  const temp::Temp& base,
80  int offset = 0) const;
83  int absolute) const;
89  public:
91  assem::Instrs label_build (const temp::Label& label) const;
92 
95  std::string cjump_inst (const tree::Cjump::Relop& op) const;
96 
99  const temp::Temp& left,
100  const temp::Temp& right,
101  const temp::Label& label_true,
102  const temp::Label& label_false) const;
103 
106  const temp::Temp& left,
107  int right,
108  const temp::Label& label_true,
109  const temp::Label& label_false) const;
110 
113  int left,
114  const temp::Temp& right,
115  const temp::Label& label_true,
116  const temp::Label& label_false) const;
117 
119  assem::Instrs jump_build (const temp::Label& label) const;
124  public:
126  assem::Instrs push_build (const temp::Temp& src);
127 
129  assem::Instrs call_build (const temp::Label& label,
130  const temp::temp_list_type& res) const;
132  assem::Instrs leave_build () const;
134  assem::Instrs ret_build (size_t i) const;
140  public:
142  virtual const char* runtime (bool gc = false) const override;
144  };
145 
146  } // namespace ia32
147 
148 } // namespace target
149 
150 #endif // !TARGET_IA32_GAS_ASSEMBLY_HH