tm_instr_base.cc

Go to the documentation of this file.
00001 #include <lestes/md/instructions/tm_instr_base.g.hh>
00002 #include <lestes/backend_v2/intercode/ge.g.hh>
00003 #include <lestes/backend_v2/intercode/pi.g.hh>
00004 
00005 package(lestes);
00006 package(md);
00007 package(instructions);
00008 
00009 using namespace ::lestes::backend_v2::intercode;
00010 
00011 /*!
00012         \brief Tells whether the current instruction is jump.
00013 */
00014 bool tm_instr_base::is_jump()
00015 {
00016     return flags & IF_JUMP;
00017 }
00018 
00019 /*!
00020         \brief Tells whether the current instruction is load.
00021 */
00022 bool tm_instr_base::is_load()
00023 {
00024     return flags & IF_LOAD;
00025 }
00026 
00027 /*!
00028         \brief Tells whether the current instruction is store.
00029 */
00030 bool tm_instr_base::is_store()
00031 {
00032     return flags & IF_STORE;
00033 }
00034 
00035 /*!
00036         \brief Tells whether the current instruction is system instruction.
00037 */
00038 bool tm_instr_base::is_system()
00039 {
00040     return flags & IF_SYS;
00041 }
00042 
00043 /*!
00044         \brief Tells whether the current instruction is copy instruction.
00045 */
00046 bool tm_instr_base::is_copy()
00047 {
00048     return flags & IF_COPY;
00049 }
00050 
00051 
00052 /*!
00053         \brief Tells kind of current operand.
00054 */
00055 tm_instr_op_base::kind_type tm_instr_op_mem_base::kind_get()
00056 {
00057     return tm_instr_op_base::MEMORY;
00058 }
00059 
00060 /*!
00061         \brief Creates new instance of ge_operand on the basis of the current tm_instr_op.
00062         
00063         \param type A datatype of the created operand.
00064         \return A new ge_operand.
00065 */
00066 ptr< ::lestes::backend_v2::intercode::ge_operand > tm_instr_op_mem_base::convert_to_ge(ptr< ::lestes::md::types::tm_data_type_base >) {
00067         lassert(false);
00068 }
00069 
00070 /*!
00071         \brief Tells kind of current operand.
00072 */
00073 tm_instr_op_base::kind_type tm_instr_op_imm_base::kind_get()
00074 {
00075     return tm_instr_op_base::IMMEDIATE;
00076 }
00077 
00078 /*!
00079         \brief Creates new instance of ge_operand on the basis of the current tm_instr_op.
00080         
00081         \param type A datatype of the created operand.
00082         \return A new ge_operand.
00083 */
00084 ptr< ::lestes::backend_v2::intercode::ge_operand > tm_instr_op_imm_base::convert_to_ge(ptr< ::lestes::md::types::tm_data_type_base >) {
00085         lassert(false);
00086 }
00087 
00088 
00089 /*!
00090         \brief Tells kind of current operand.
00091 */
00092 tm_instr_op_base::kind_type tm_instr_op_reg_base::kind_get()
00093 {
00094     return tm_instr_op_base::REGISTER;
00095 }
00096 
00097 /*!
00098         \brief Creates new instance of ge_operand on the basis of the current tm_instr_op.
00099         
00100         \param type A datatype of the created operand.
00101         \return A new ge_operand.
00102 */
00103 ptr< ::lestes::backend_v2::intercode::ge_operand > tm_instr_op_reg_base::convert_to_ge(ptr< ::lestes::md::types::tm_data_type_base > type) {
00104         return ge_operand_reg::create(type,NULL,NULL);
00105 }
00106 
00107 
00108 end_package(insturctions);
00109 end_package(md);
00110 end_package(lestes);
00111 

Generated on Mon Feb 12 18:23:42 2007 for lestes by doxygen 1.5.1-20070107