src/cpu/mips/vm/vm_version_mips.hpp

changeset 8016
efbfe5d2d462
parent 8015
2581a5399fb7
child 9251
1ccc5a3b3671
equal deleted inserted replaced
8015:2581a5399fb7 8016:efbfe5d2d462
31 31
32 32
33 class VM_Version: public Abstract_VM_Version { 33 class VM_Version: public Abstract_VM_Version {
34 protected: 34 protected:
35 enum Feature_Flag { 35 enum Feature_Flag {
36 with_l2_cache = 0, 36 with_l2_cache = 0,
37 spt_16k_page = 1, 37 spt_16k_page = 1,
38 gs464v = 2, 38 gs464v = 2,
39 gs464e = 3, 39 gs464e = 3,
40 gs464 = 4, 40 gs464 = 4,
41 with_gs_support = 5, 41 gs264 = 5,
42 with_gs_support = 6,
42 //////////////////////add some other feature here////////////////// 43 //////////////////////add some other feature here//////////////////
43 }; 44 };
44 45
45 enum Feature_Flag_Set { 46 enum Feature_Flag_Set {
46 unknown_m = 0, 47 unknown_m = 0,
47 all_features_m = -1, 48 all_features_m = -1,
48 with_l2_cache_m = 1 << with_l2_cache, 49 with_l2_cache_m = 1 << with_l2_cache,
49 spt_16k_page_m = 1 << spt_16k_page, 50 spt_16k_page_m = 1 << spt_16k_page,
50 with_gs_support_m = 1 << with_gs_support, 51 with_gs_support_m = 1 << with_gs_support,
51 gs464_m = 1 << gs464, 52 gs464_m = 1 << gs464,
52 gs464v_m = 1 << gs464v, 53 gs464v_m = 1 << gs464v,
53 gs464e_m = 1 << gs464e, 54 gs464e_m = 1 << gs464e,
55 gs264_m = 1 << gs264,
54 56
55 //////////////////////add some other feature here////////////////// 57 //////////////////////add some other feature here//////////////////
56 }; 58 };
57 59
58 static int _features; 60 static int _features;
69 //mips has no such instructions, use ll/sc instead 71 //mips has no such instructions, use ll/sc instead
70 static bool supports_compare_and_exchange() { return false; } 72 static bool supports_compare_and_exchange() { return false; }
71 73
72 static bool has_l2_cache() { return _features & with_l2_cache_m; } 74 static bool has_l2_cache() { return _features & with_l2_cache_m; }
73 static bool has_16k_page() { return _features & spt_16k_page_m; } 75 static bool has_16k_page() { return _features & spt_16k_page_m; }
76 static bool is_gs264() { return _features & gs264_m; }
74 static bool is_gs464() { return _features & gs464_m; } 77 static bool is_gs464() { return _features & gs464_m; }
75 static bool is_gs464v() { return _features & gs464v_m; } 78 static bool is_gs464v() { return _features & gs464v_m; }
76 static bool is_gs464e() { return _features & gs464e_m; } 79 static bool is_gs464e() { return _features & gs464e_m; }
77 static bool is_loongson() { return _features & with_gs_support_m; } 80 static bool is_loongson() { return _features & with_gs_support_m; }
78 static bool supports_dsp() { return 0; /*Loongson CPUs do not support DSP instructions well*/} 81 static bool supports_dsp() { return 0; /*Loongson CPUs do not support DSP instructions well*/}

mercurial