00001 #ifndef ASSEMBLY_H_
00002 #define ASSEMBLY_H_
00003
00004
00005 #include "instruction.h"
00006 #include <vector>
00007
00008 using namespace std;
00009
00010 namespace il
00011 {
00012 class expression;
00013
00018 class assembly : public il::instruction
00019 {
00020
00021 friend class boost::serialization::access;
00022 template<class Archive>
00023 void serialize(Archive & ar, const unsigned int version)
00024 {
00025 ar & boost::serialization::base_object<il::instruction>(*this);
00026 ar & asm_instruction;
00027 ar & inputs;
00028 ar & outputs;
00029 ar & clobber_registers;
00030 }
00031
00032
00033 private:
00034 string asm_instruction;
00035 vector<expression*> inputs;
00036 vector<expression*> outputs;
00037 vector<string> clobber_registers;
00038
00039 public:
00040 assembly();
00041
00050 assembly(string asm_instruction,
00051 vector<expression*> & inputs, vector<expression*> &outputs,
00052 vector<string> & clobber_registers, location loc);
00053 virtual ~assembly();
00054 virtual void print();
00055 virtual string to_string() const;
00056
00057 string get_instruction();
00058 vector<expression*>& get_input_registers();
00059 vector<expression*>& get_output_registers();
00060 vector<string>& get_clobber_registers();
00061
00062
00063 };
00064
00065 }
00066
00067 #endif