00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00026
00036
00037
00038 #ifndef _XST_INSTRUCTION_TRAITS_H_INCLUDED_
00039 #define _XST_INSTRUCTION_TRAITS_H_INCLUDED_
00040
00041 namespace cttl_impl {
00042
00044 static const int pop_data_ = 1;
00045
00046
00048 static const int push_data_ = 2;
00049
00051 static const int push_value_ = 3;
00052
00054 static const int push_top_ = 4;
00055
00057 static const int push_size_ = 5;
00058
00059
00061 static const int move_value_ = 6;
00062
00064 static const int move_top_ = 7;
00065
00067 static const int move_size_ = 8;
00068
00069
00071 static const int add_value_ = 9;
00072
00074 static const int add_top_ = 10;
00075
00077 static const int add_size_ = 11;
00078
00079
00081 static const int sub_value_ = 12;
00082
00084 static const int sub_top_ = 13;
00085
00087 static const int sub_size_ = 14;
00088
00089
00091 static const int neg_top_ = 15;
00092
00093
00095 static const int mul_value_ = 16;
00096
00098 static const int mul_top_ = 17;
00099
00101 static const int mul_size_ = 18;
00102
00103
00105 static const int div_value_ = 19;
00106
00108 static const int div_top_ = 20;
00109
00111 static const int div_size_ = 21;
00112
00113
00114
00122 template< int OpcodeT >
00123 struct xst_instruction_traits {
00124
00125 enum { length_ = 2 };
00126
00127 };
00128
00133 template<>
00134 struct xst_instruction_traits< pop_data_ > {
00135
00136 enum { length_ = 1 };
00137
00138 };
00139
00144 template<>
00145 struct xst_instruction_traits< push_data_ > {
00146
00147 enum { length_ = 1 };
00148
00149 };
00150
00155 template<>
00156 struct xst_instruction_traits< neg_top_ > {
00157
00158 enum { length_ = 1 };
00159
00160 };
00161
00162 }
00163
00164
00165 #endif //_XST_INSTRUCTION_TRAITS_H_INCLUDED_