hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp
changeset 31515 6aed85dadbe6
parent 30217 5eb8768d86c4
child 33160 c59f1676d27e
equal deleted inserted replaced
31414:20e05afbc7af 31515:6aed85dadbe6
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    51     T1_model             = 17,
    51     T1_model             = 17,
    52     sparc5_instructions  = 18,
    52     sparc5_instructions  = 18,
    53     aes_instructions     = 19,
    53     aes_instructions     = 19,
    54     sha1_instruction     = 20,
    54     sha1_instruction     = 20,
    55     sha256_instruction   = 21,
    55     sha256_instruction   = 21,
    56     sha512_instruction   = 22
    56     sha512_instruction   = 22,
       
    57     crc32c_instruction   = 23
    57   };
    58   };
    58 
    59 
    59   enum Feature_Flag_Set {
    60   enum Feature_Flag_Set {
    60     unknown_m           = 0,
    61     unknown_m           = 0,
    61     all_features_m      = -1,
    62     all_features_m      = -1,
    81     sparc5_instructions_m   = 1 << sparc5_instructions,
    82     sparc5_instructions_m   = 1 << sparc5_instructions,
    82     aes_instructions_m      = 1 << aes_instructions,
    83     aes_instructions_m      = 1 << aes_instructions,
    83     sha1_instruction_m      = 1 << sha1_instruction,
    84     sha1_instruction_m      = 1 << sha1_instruction,
    84     sha256_instruction_m    = 1 << sha256_instruction,
    85     sha256_instruction_m    = 1 << sha256_instruction,
    85     sha512_instruction_m    = 1 << sha512_instruction,
    86     sha512_instruction_m    = 1 << sha512_instruction,
       
    87     crc32c_instruction_m    = 1 << crc32c_instruction,
    86 
    88 
    87     generic_v8_m        = v8_instructions_m | hardware_mul32_m | hardware_div32_m | hardware_fsmuld_m,
    89     generic_v8_m        = v8_instructions_m | hardware_mul32_m | hardware_div32_m | hardware_fsmuld_m,
    88     generic_v9_m        = generic_v8_m | v9_instructions_m,
    90     generic_v9_m        = generic_v8_m | v9_instructions_m,
    89     ultra3_m            = generic_v9_m | vis1_instructions_m | vis2_instructions_m,
    91     ultra3_m            = generic_v9_m | vis1_instructions_m | vis2_instructions_m,
    90 
    92 
   139   static bool has_sparc5_instr()        { return (_features & sparc5_instructions_m) != 0; }
   141   static bool has_sparc5_instr()        { return (_features & sparc5_instructions_m) != 0; }
   140   static bool has_aes()                 { return (_features & aes_instructions_m) != 0; }
   142   static bool has_aes()                 { return (_features & aes_instructions_m) != 0; }
   141   static bool has_sha1()                { return (_features & sha1_instruction_m) != 0; }
   143   static bool has_sha1()                { return (_features & sha1_instruction_m) != 0; }
   142   static bool has_sha256()              { return (_features & sha256_instruction_m) != 0; }
   144   static bool has_sha256()              { return (_features & sha256_instruction_m) != 0; }
   143   static bool has_sha512()              { return (_features & sha512_instruction_m) != 0; }
   145   static bool has_sha512()              { return (_features & sha512_instruction_m) != 0; }
       
   146   static bool has_crc32c()              { return (_features & crc32c_instruction_m) != 0; }
   144 
   147 
   145   static bool supports_compare_and_exchange()
   148   static bool supports_compare_and_exchange()
   146                                         { return has_v9(); }
   149                                         { return has_v9(); }
   147 
   150 
   148   // Returns true if the platform is in the niagara line (T series)
   151   // Returns true if the platform is in the niagara line (T series)