src/cpu/sparc/vm/vm_version_sparc.hpp

changeset 2403
c04052fd6ae1
parent 2350
2f644f85485d
child 3037
3d42f82cd811
     1.1 --- a/src/cpu/sparc/vm/vm_version_sparc.hpp	Thu Dec 16 12:47:52 2010 -0800
     1.2 +++ b/src/cpu/sparc/vm/vm_version_sparc.hpp	Thu Dec 16 14:15:12 2010 -0800
     1.3 @@ -41,7 +41,12 @@
     1.4      vis2_instructions  = 7,
     1.5      sun4v_instructions = 8,
     1.6      blk_init_instructions = 9,
     1.7 -    fmaf_instructions  = 10
     1.8 +    fmaf_instructions  = 10,
     1.9 +    fmau_instructions  = 11,
    1.10 +    vis3_instructions  = 12,
    1.11 +    sparc64_family     = 13,
    1.12 +    T_family           = 14,
    1.13 +    T1_model           = 15
    1.14    };
    1.15  
    1.16    enum Feature_Flag_Set {
    1.17 @@ -59,6 +64,11 @@
    1.18      sun4v_m             = 1 << sun4v_instructions,
    1.19      blk_init_instructions_m = 1 << blk_init_instructions,
    1.20      fmaf_instructions_m = 1 << fmaf_instructions,
    1.21 +    fmau_instructions_m = 1 << fmau_instructions,
    1.22 +    vis3_instructions_m = 1 << vis3_instructions,
    1.23 +    sparc64_family_m    = 1 << sparc64_family,
    1.24 +    T_family_m          = 1 << T_family,
    1.25 +    T1_model_m          = 1 << T1_model,
    1.26  
    1.27      generic_v8_m        = v8_instructions_m | hardware_mul32_m | hardware_div32_m | hardware_fsmuld_m,
    1.28      generic_v9_m        = generic_v8_m | v9_instructions_m,
    1.29 @@ -76,8 +86,13 @@
    1.30    static int  determine_features();
    1.31    static int  platform_features(int features);
    1.32  
    1.33 -  static bool is_niagara1(int features) { return (features & sun4v_m) != 0; }
    1.34 -  static bool  is_sparc64(int features) { return (features & fmaf_instructions_m) != 0; }
    1.35 +  // Returns true if the platform is in the niagara line (T series)
    1.36 +  static bool is_T_family(int features) { return (features & T_family_m) != 0; }
    1.37 +  static bool is_niagara() { return is_T_family(_features); }
    1.38 +  DEBUG_ONLY( static bool is_niagara(int features)  { return (features & sun4v_m) != 0; } )
    1.39 +
    1.40 +  // Returns true if it is niagara1 (T1).
    1.41 +  static bool is_T1_model(int features) { return is_T_family(features) && ((features & T1_model_m) != 0); }
    1.42  
    1.43    static int maximum_niagara1_processor_count() { return 32; }
    1.44  
    1.45 @@ -94,6 +109,7 @@
    1.46    static bool has_hardware_popc()       { return (_features & hardware_popc_m) != 0; }
    1.47    static bool has_vis1()                { return (_features & vis1_instructions_m) != 0; }
    1.48    static bool has_vis2()                { return (_features & vis2_instructions_m) != 0; }
    1.49 +  static bool has_vis3()                { return (_features & vis3_instructions_m) != 0; }
    1.50    static bool has_blk_init()            { return (_features & blk_init_instructions_m) != 0; }
    1.51  
    1.52    static bool supports_compare_and_exchange()
    1.53 @@ -101,14 +117,14 @@
    1.54  
    1.55    static bool is_ultra3()               { return (_features & ultra3_m) == ultra3_m; }
    1.56    static bool is_sun4v()                { return (_features & sun4v_m) != 0; }
    1.57 -  static bool is_niagara1()             { return is_niagara1(_features); }
    1.58 -  // Returns true if the platform is in the niagara line and
    1.59 -  // newer than the niagara1.
    1.60 -  static bool is_niagara1_plus();
    1.61 -  static bool is_sparc64()              { return is_sparc64(_features); }
    1.62 +  // Returns true if the platform is in the niagara line (T series)
    1.63 +  // and newer than the niagara1.
    1.64 +  static bool is_niagara_plus()         { return is_T_family(_features) && !is_T1_model(_features); }
    1.65 +  // Fujitsu SPARC64
    1.66 +  static bool is_sparc64()              { return (_features & sparc64_family_m) != 0; }
    1.67  
    1.68 -  static bool has_fast_fxtof()          { return has_v9() && !is_ultra3(); }
    1.69 -  static bool has_fast_idiv()           { return is_niagara1_plus() || is_sparc64(); }
    1.70 +  static bool has_fast_fxtof()          { return is_niagara() || is_sparc64() || has_v9() && !is_ultra3(); }
    1.71 +  static bool has_fast_idiv()           { return is_niagara_plus() || is_sparc64(); }
    1.72  
    1.73    static const char* cpu_features()     { return _features_str; }
    1.74  

mercurial