src/hotspot/cpu/s390/vm_version_s390.hpp
author ghaug
Tue, 10 Jul 2018 11:36:36 +0200
changeset 51034 9937ef7499dc
parent 47607 c2ff34932cbd
child 53244 9807daeb47c4
permissions -rw-r--r--
8206919: s390: add missing info to vm_version_ext_s390 Reviewed-by: simonis, mdoerr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     1
/*
51034
9937ef7499dc 8206919: s390: add missing info to vm_version_ext_s390
ghaug
parents: 47607
diff changeset
     2
 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
9937ef7499dc 8206919: s390: add missing info to vm_version_ext_s390
ghaug
parents: 47607
diff changeset
     3
 * Copyright (c) 2016, 2018 SAP SE. All rights reserved.
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     5
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     8
 * published by the Free Software Foundation.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     9
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    14
 * accompanied this code).
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    15
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    19
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    22
 * questions.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    23
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    24
 */
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    25
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    26
#ifndef CPU_S390_VM_VM_VERSION_S390_HPP
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    27
#define CPU_S390_VM_VM_VERSION_S390_HPP
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    28
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    29
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    30
#include "runtime/globals_extension.hpp"
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    31
#include "runtime/vm_version.hpp"
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    32
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    33
class VM_Version: public Abstract_VM_Version {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    34
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    35
 protected:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    36
// The following list contains the (approximate) announcement/availability
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    37
// dates of the many System z generations in existence as of now which
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    38
// implement the z/Architecture.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    39
//   z900: 2000-10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    40
//   z990: 2003-06
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    41
//   z9:   2005-09
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    42
//   z10:  2007-04
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    43
//   z10:  2008-02
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    44
//   z196: 2010-08
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    45
//   ec12: 2012-09
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    46
//   z13:  2015-03
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    47
//
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    48
// z/Architecture is the name of the 64-bit extension of the 31-bit s390
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    49
// architecture.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    50
//
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    51
// ----------------------------------------------
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    52
// --- FeatureBitString Bits   0.. 63 (DW[0]) ---
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    53
// ----------------------------------------------
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    54
//                                           11222334445566
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    55
//                                        04826048260482604
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    56
#define  StoreFacilityListExtendedMask  0x0100000000000000UL  // z9
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    57
#define  ETF2Mask                       0x0000800000000000UL  // z900
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    58
#define  CryptoFacilityMask             0x0000400000000000UL  // z990
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    59
#define  LongDispFacilityMask           0x0000200000000000UL  // z900 with microcode update
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    60
#define  LongDispFacilityHighPerfMask   0x0000300000000000UL  // z990
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    61
#define  HFPMultiplyAndAddMask          0x0000080000000000UL  // z990
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    62
#define  ExtImmedFacilityMask           0x0000040000000000UL  // z9
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    63
#define  ETF3Mask                       0x0000020000000000UL  // z990/z9 (?)
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    64
#define  HFPUnnormalizedMask            0x0000010000000000UL  // z9
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    65
#define  ETF2EnhancementMask            0x0000008000000000UL  // z9
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    66
#define  StoreClockFastMask             0x0000004000000000UL  // z9
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    67
#define  ParsingEnhancementsMask        0x0000002000000000UL  // z10(?)
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    68
#define  ETF3EnhancementMask            0x0000000200000000UL  // z9
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    69
#define  ExtractCPUTimeMask             0x0000000100000000UL  // z10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    70
#define  CompareSwapStoreMask           0x00000000c0000000UL  // z10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    71
#define  GnrlInstrExtFacilityMask       0x0000000020000000UL  // z10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    72
#define  ExecuteExtensionsMask          0x0000000010000000UL  // z10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    73
#define  FPExtensionsMask               0x0000000004000000UL  // z196
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    74
#define  FPSupportEnhancementsMask      0x0000000000400000UL  // z10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    75
#define  DecimalFloatingPointMask       0x0000000000300000UL  // z10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    76
// z196 begin
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    77
#define  DistinctOpndsMask              0x0000000000040000UL  // z196
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    78
#define  FastBCRSerializationMask       DistinctOpndsMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    79
#define  HighWordMask                   DistinctOpndsMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    80
#define  LoadStoreConditionalMask       DistinctOpndsMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    81
#define  PopulationCountMask            DistinctOpndsMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    82
#define  InterlockedAccess1Mask         DistinctOpndsMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    83
// z196 end
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    84
// EC12 begin
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    85
#define  DFPZonedConversionMask         0x0000000000008000UL  // ec12
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    86
#define  MiscInstrExtMask               0x0000000000004000UL  // ec12
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    87
#define  ExecutionHintMask              MiscInstrExtMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    88
#define  LoadAndTrapMask                MiscInstrExtMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    89
#define  ProcessorAssistMask            MiscInstrExtMask
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    90
#define  ConstrainedTxExecutionMask     0x0000000000002000UL  // ec12
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    91
#define  InterlockedAccess2Mask         0x0000000000000800UL  // ec12
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    92
// EC12 end
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    93
// z13 begin
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    94
#define  LoadStoreConditional2Mask      0x0000000000000400UL  // z13
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    95
#define  CryptoExtension5Mask           0x0000000000000040UL  // z13
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    96
// z13 end
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    97
// Feature-DW[0] starts to fill up. Use of these masks is risky.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    98
#define  TestFeature1ImplMask           0x0000000000000001UL
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    99
#define  TestFeature2ImplMask           0x0000000000000002UL
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   100
#define  TestFeature4ImplMask           0x0000000000000004UL
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   101
#define  TestFeature8ImplMask           0x0000000000000008UL
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   102
// ----------------------------------------------
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   103
// --- FeatureBitString Bits  64..127 (DW[1]) ---
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   104
// ----------------------------------------------
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   105
//                                                 11111111
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   106
//                                        66778889900011222
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   107
//                                        48260482604826048
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   108
#define  TransactionalExecutionMask     0x0040000000000000UL  // ec12
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   109
#define  CryptoExtension3Mask           0x0008000000000000UL  // z196
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   110
#define  CryptoExtension4Mask           0x0004000000000000UL  // z196
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   111
#define  DFPPackedConversionMask        0x0000800000000000UL  // z13
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   112
// ----------------------------------------------
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   113
// --- FeatureBitString Bits 128..192 (DW[2]) ---
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   114
// ----------------------------------------------
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   115
//                                        11111111111111111
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   116
//                                        23344455666778889
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   117
//                                        82604826048260482
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   118
#define  VectorFacilityMask             0x4000000000000000UL  // z13, not avail in VM guest mode!
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   119
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   120
  enum {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   121
    _max_cache_levels = 8,    // As limited by ECAG instruction.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   122
    _features_buffer_len = 4, // in DW
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   123
    _code_buffer_len = 2*256  // For feature detection code.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   124
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   125
  static unsigned long _features[_features_buffer_len];
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   126
  static unsigned long _cipher_features[_features_buffer_len];
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   127
  static unsigned long _msgdigest_features[_features_buffer_len];
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   128
  static unsigned int  _nfeatures;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   129
  static unsigned int  _ncipher_features;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   130
  static unsigned int  _nmsgdigest_features;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   131
  static unsigned int  _Dcache_lineSize;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   132
  static unsigned int  _Icache_lineSize;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   133
  static bool          _is_determine_features_test_running;
51034
9937ef7499dc 8206919: s390: add missing info to vm_version_ext_s390
ghaug
parents: 47607
diff changeset
   134
  static const char*   _model_string;
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   135
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   136
  static bool test_feature_bit(unsigned long* featureBuffer, int featureNum, unsigned int bufLen);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   137
  static void set_features_string();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   138
  static void print_features_internal(const char* text, bool print_anyway=false);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   139
  static void determine_features();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   140
  static long call_getFeatures(unsigned long* buffer, int buflen, int functionCode);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   141
  static void set_getFeatures(address entryPoint);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   142
  static int  calculate_ECAG_functionCode(unsigned int attributeIndication,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   143
                                          unsigned int levelIndication,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   144
                                          unsigned int typeIndication);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   145
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   146
  // Setting features via march=z900|z990|z9|z10|z196|ec12|z13|ztest commandline option.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   147
  static void reset_features(bool reset);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   148
  static void set_features_z900(bool reset = true);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   149
  static void set_features_z990(bool reset = true);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   150
  static void set_features_z9(bool reset = true);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   151
  static void set_features_z10(bool reset = true);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   152
  static void set_features_z196(bool reset = true);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   153
  static void set_features_ec12(bool reset = true);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   154
  static void set_features_z13(bool reset = true);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   155
  static void set_features_from(const char* march);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   156
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   157
  // Get the CPU type from feature bit settings.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   158
  static bool is_z900() { return has_long_displacement()      && !has_long_displacement_fast(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   159
  static bool is_z990() { return has_long_displacement_fast() && !has_extended_immediate();  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   160
  static bool is_z9()   { return has_extended_immediate()     && !has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   161
  static bool is_z10()  { return has_GnrlInstrExtensions()    && !has_DistinctOpnds(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   162
  static bool is_z196() { return has_DistinctOpnds()          && !has_MiscInstrExt(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   163
  static bool is_ec12() { return has_MiscInstrExt()           && !has_CryptoExt5(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   164
  static bool is_z13()  { return has_CryptoExt5();}
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   165
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   166
  // Get information about cache line sizes.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   167
  // As of now and the foreseeable future, line size of all levels will be the same and 256.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   168
  static unsigned int Dcache_lineSize(unsigned int level = 0) { return _Dcache_lineSize; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   169
  static unsigned int Icache_lineSize(unsigned int level = 0) { return _Icache_lineSize; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   170
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   171
 public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   172
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   173
  // Need to use nested class with unscoped enum.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   174
  // C++11 declaration "enum class Cipher { ... } is not supported.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   175
  class CipherMode {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   176
    public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   177
      enum {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   178
        cipher   = 0x00,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   179
        decipher = 0x80
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   180
      };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   181
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   182
  class Cipher {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   183
   public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   184
    enum { // KM only!!! KMC uses different parmBlk sizes.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   185
      _Query              =   0,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   186
      _DEA                =   1,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   187
      _TDEA128            =   2,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   188
      _TDEA192            =   3,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   189
      _EncryptedDEA       =   9,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   190
      _EncryptedDEA128    =  10,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   191
      _EncryptedDEA192    =  11,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   192
      _AES128             =  18,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   193
      _AES192             =  19,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   194
      _AES256             =  20,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   195
      _EnccryptedAES128   =  26,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   196
      _EnccryptedAES192   =  27,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   197
      _EnccryptedAES256   =  28,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   198
      _XTSAES128          =  50,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   199
      _XTSAES256          =  52,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   200
      _EncryptedXTSAES128 =  58,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   201
      _EncryptedXTSAES256 =  60,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   202
      _PRNG               =  67,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   203
      _featureBits        = 128,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   204
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   205
      // Parameter block sizes (in bytes) for KM instruction.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   206
      _Query_parmBlk              =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   207
      _DEA_parmBlk                =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   208
      _TDEA128_parmBlk            =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   209
      _TDEA192_parmBlk            =  24,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   210
      _EncryptedDEA_parmBlk       =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   211
      _EncryptedDEA128_parmBlk    =  40,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   212
      _EncryptedDEA192_parmBlk    =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   213
      _AES128_parmBlk             =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   214
      _AES192_parmBlk             =  24,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   215
      _AES256_parmBlk             =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   216
      _EnccryptedAES128_parmBlk   =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   217
      _EnccryptedAES192_parmBlk   =  56,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   218
      _EnccryptedAES256_parmBlk   =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   219
      _XTSAES128_parmBlk          =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   220
      _XTSAES256_parmBlk          =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   221
      _EncryptedXTSAES128_parmBlk =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   222
      _EncryptedXTSAES256_parmBlk =  80,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   223
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   224
      // Parameter block sizes (in bytes) for KMC instruction.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   225
      _Query_parmBlk_C              =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   226
      _DEA_parmBlk_C                =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   227
      _TDEA128_parmBlk_C            =  24,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   228
      _TDEA192_parmBlk_C            =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   229
      _EncryptedDEA_parmBlk_C       =  40,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   230
      _EncryptedDEA128_parmBlk_C    =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   231
      _EncryptedDEA192_parmBlk_C    =  56,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   232
      _AES128_parmBlk_C             =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   233
      _AES192_parmBlk_C             =  40,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   234
      _AES256_parmBlk_C             =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   235
      _EnccryptedAES128_parmBlk_C   =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   236
      _EnccryptedAES192_parmBlk_C   =  72,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   237
      _EnccryptedAES256_parmBlk_C   =  80,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   238
      _XTSAES128_parmBlk_C          =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   239
      _XTSAES256_parmBlk_C          =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   240
      _EncryptedXTSAES128_parmBlk_C =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   241
      _EncryptedXTSAES256_parmBlk_C =  80,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   242
      _PRNG_parmBlk_C               =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   243
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   244
      // Data block sizes (in bytes).
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   245
      _Query_dataBlk              =   0,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   246
      _DEA_dataBlk                =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   247
      _TDEA128_dataBlk            =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   248
      _TDEA192_dataBlk            =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   249
      _EncryptedDEA_dataBlk       =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   250
      _EncryptedDEA128_dataBlk    =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   251
      _EncryptedDEA192_dataBlk    =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   252
      _AES128_dataBlk             =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   253
      _AES192_dataBlk             =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   254
      _AES256_dataBlk             =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   255
      _EnccryptedAES128_dataBlk   =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   256
      _EnccryptedAES192_dataBlk   =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   257
      _EnccryptedAES256_dataBlk   =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   258
      _XTSAES128_dataBlk          =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   259
      _XTSAES256_dataBlk          =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   260
      _EncryptedXTSAES128_dataBlk =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   261
      _EncryptedXTSAES256_dataBlk =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   262
      _PRNG_dataBlk               =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   263
    };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   264
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   265
  class MsgDigest {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   266
    public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   267
      enum {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   268
        _Query            =   0,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   269
        _SHA1             =   1,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   270
        _SHA256           =   2,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   271
        _SHA512           =   3,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   272
        _GHASH            =  65,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   273
        _featureBits      = 128,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   274
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   275
        // Parameter block sizes (in bytes) for KIMD.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   276
        _Query_parmBlk_I  =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   277
        _SHA1_parmBlk_I   =  20,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   278
        _SHA256_parmBlk_I =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   279
        _SHA512_parmBlk_I =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   280
        _GHASH_parmBlk_I  =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   281
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   282
        // Parameter block sizes (in bytes) for KLMD.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   283
        _Query_parmBlk_L  =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   284
        _SHA1_parmBlk_L   =  28,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   285
        _SHA256_parmBlk_L =  40,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   286
        _SHA512_parmBlk_L =  80,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   287
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   288
        // Data block sizes (in bytes).
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   289
        _Query_dataBlk    =   0,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   290
        _SHA1_dataBlk     =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   291
        _SHA256_dataBlk   =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   292
        _SHA512_dataBlk   = 128,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   293
        _GHASH_dataBlk    =  16
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   294
      };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   295
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   296
  class MsgAuthent {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   297
    public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   298
      enum {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   299
        _Query              =   0,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   300
        _DEA                =   1,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   301
        _TDEA128            =   2,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   302
        _TDEA192            =   3,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   303
        _EncryptedDEA       =   9,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   304
        _EncryptedDEA128    =  10,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   305
        _EncryptedDEA192    =  11,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   306
        _AES128             =  18,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   307
        _AES192             =  19,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   308
        _AES256             =  20,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   309
        _EnccryptedAES128   =  26,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   310
        _EnccryptedAES192   =  27,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   311
        _EnccryptedAES256   =  28,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   312
        _featureBits        = 128,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   313
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   314
        _Query_parmBlk            =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   315
        _DEA_parmBlk              =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   316
        _TDEA128_parmBlk          =  24,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   317
        _TDEA192_parmBlk          =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   318
        _EncryptedDEA_parmBlk     =  40,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   319
        _EncryptedDEA128_parmBlk  =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   320
        _EncryptedDEA192_parmBlk  =  56,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   321
        _AES128_parmBlk           =  32,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   322
        _AES192_parmBlk           =  40,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   323
        _AES256_parmBlk           =  48,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   324
        _EnccryptedAES128_parmBlk =  64,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   325
        _EnccryptedAES192_parmBlk =  72,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   326
        _EnccryptedAES256_parmBlk =  80,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   327
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   328
        _Query_dataBlk            =   0,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   329
        _DEA_dataBlk              =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   330
        _TDEA128_dataBlk          =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   331
        _TDEA192_dataBlk          =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   332
        _EncryptedDEA_dataBlk     =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   333
        _EncryptedDEA128_dataBlk  =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   334
        _EncryptedDEA192_dataBlk  =   8,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   335
        _AES128_dataBlk           =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   336
        _AES192_dataBlk           =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   337
        _AES256_dataBlk           =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   338
        _EnccryptedAES128_dataBlk =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   339
        _EnccryptedAES192_dataBlk =  16,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   340
        _EnccryptedAES256_dataBlk =  16
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   341
      };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   342
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   343
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   344
  // Initialization
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   345
  static void initialize();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   346
  static void print_features();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   347
  static bool is_determine_features_test_running() { return _is_determine_features_test_running; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   348
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   349
  // CPU feature query functions
51034
9937ef7499dc 8206919: s390: add missing info to vm_version_ext_s390
ghaug
parents: 47607
diff changeset
   350
  static const char* get_model_string()       { return _model_string; }
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   351
  static bool has_StoreFacilityListExtended() { return  (_features[0] & StoreFacilityListExtendedMask) == StoreFacilityListExtendedMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   352
  static bool has_Crypto()                    { return  (_features[0] & CryptoFacilityMask)            == CryptoFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   353
  static bool has_ETF2()                      { return  (_features[0] & ETF2Mask)                      == ETF2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   354
  static bool has_ETF3()                      { return  (_features[0] & ETF3Mask)                      == ETF3Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   355
  static bool has_ETF2Enhancements()          { return  (_features[0] & ETF2EnhancementMask)           == ETF2EnhancementMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   356
  static bool has_ETF3Enhancements()          { return  (_features[0] & ETF3EnhancementMask)           == ETF3EnhancementMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   357
  static bool has_ParsingEnhancements()       { return  (_features[0] & ParsingEnhancementsMask)       == ParsingEnhancementsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   358
  static bool has_long_displacement()         { return  (_features[0] & LongDispFacilityMask)          == LongDispFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   359
  static bool has_long_displacement_fast()    { return  (_features[0] & LongDispFacilityHighPerfMask)  == LongDispFacilityHighPerfMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   360
  static bool has_extended_immediate()        { return  (_features[0] & ExtImmedFacilityMask)          == ExtImmedFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   361
  static bool has_StoreClockFast()            { return  (_features[0] & StoreClockFastMask)            == StoreClockFastMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   362
  static bool has_ExtractCPUtime()            { return  (_features[0] & ExtractCPUTimeMask)            == ExtractCPUTimeMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   363
  static bool has_CompareSwapStore()          { return  (_features[0] & CompareSwapStoreMask)          == CompareSwapStoreMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   364
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   365
  static bool has_HFPMultiplyAndAdd()         { return  (_features[0] & HFPMultiplyAndAddMask)         == HFPMultiplyAndAddMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   366
  static bool has_HFPUnnormalized()           { return  (_features[0] & HFPUnnormalizedMask)           == HFPUnnormalizedMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   367
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   368
  // Make sure we don't run on older ...
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   369
  static bool has_GnrlInstrExtensions()       { guarantee((_features[0] & GnrlInstrExtFacilityMask)    == GnrlInstrExtFacilityMask, "We no more support older than z10."); return true; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   370
  static bool has_CompareBranch()             { return  has_GnrlInstrExtensions() && is_z10(); } // Only z10 benefits from these.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   371
  static bool has_CompareTrap()               { return  has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   372
  static bool has_RelativeLoadStore()         { return  has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   373
  static bool has_MultiplySingleImm32()       { return  has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   374
  static bool has_Prefetch()                  { return  has_GnrlInstrExtensions() && (AllocatePrefetchStyle > 0); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   375
  static bool has_PrefetchRaw()               { return  has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   376
  static bool has_MoveImmToMem()              { return  has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   377
  static bool has_ExtractCPUAttributes()      { return  has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   378
  static bool has_ExecuteExtensions()         { return  (_features[0] & ExecuteExtensionsMask)         == ExecuteExtensionsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   379
  // Memory-immediate arithmetic instructions. There is no performance penalty in using them.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   380
  // Moreover, these memory-immediate instructions are quasi-atomic (>99.99%) on z10
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   381
  // and 100% atomic from z196 onwards, thanks to the specific operand serialization that comes new with z196.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   382
  static bool has_MemWithImmALUOps()          { return  has_GnrlInstrExtensions(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   383
  static bool has_AtomicMemWithImmALUOps()    { return   has_MemWithImmALUOps() && has_InterlockedAccessV1(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   384
  static bool has_FPExtensions()              { return  (_features[0] & FPExtensionsMask)              == FPExtensionsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   385
  static bool has_FPSupportEnhancements()     { return  (_features[0] & FPSupportEnhancementsMask)     == FPSupportEnhancementsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   386
  static bool has_DecimalFloatingPoint()      { return  (_features[0] & DecimalFloatingPointMask)      == DecimalFloatingPointMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   387
  static bool has_InterlockedAccessV1()       { return  (_features[0] & InterlockedAccess1Mask)        == InterlockedAccess1Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   388
  static bool has_LoadAndALUAtomicV1()        { return  (_features[0] & InterlockedAccess1Mask)        == InterlockedAccess1Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   389
  static bool has_PopCount()                  { return  (_features[0] & PopulationCountMask)           == PopulationCountMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   390
  static bool has_LoadStoreConditional()      { return  (_features[0] & LoadStoreConditionalMask)      == LoadStoreConditionalMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   391
  static bool has_HighWordInstr()             { return  (_features[0] & HighWordMask)                  == HighWordMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   392
  static bool has_FastSync()                  { return  (_features[0] & FastBCRSerializationMask)      == FastBCRSerializationMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   393
  static bool has_DistinctOpnds()             { return  (_features[0] & DistinctOpndsMask)             == DistinctOpndsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   394
  static bool has_CryptoExt3()                { return  (_features[1] & CryptoExtension3Mask)          == CryptoExtension3Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   395
  static bool has_CryptoExt4()                { return  (_features[1] & CryptoExtension4Mask)          == CryptoExtension4Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   396
  static bool has_DFPZonedConversion()        { return  (_features[0] & DFPZonedConversionMask)        == DFPZonedConversionMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   397
  static bool has_DFPPackedConversion()       { return  (_features[1] & DFPPackedConversionMask)       == DFPPackedConversionMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   398
  static bool has_MiscInstrExt()              { return  (_features[0] & MiscInstrExtMask)              == MiscInstrExtMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   399
  static bool has_ExecutionHint()             { return  (_features[0] & ExecutionHintMask)             == ExecutionHintMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   400
  static bool has_LoadAndTrap()               { return  (_features[0] & LoadAndTrapMask)               == LoadAndTrapMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   401
  static bool has_ProcessorAssist()           { return  (_features[0] & ProcessorAssistMask)           == ProcessorAssistMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   402
  static bool has_InterlockedAccessV2()       { return  (_features[0] & InterlockedAccess2Mask)        == InterlockedAccess2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   403
  static bool has_LoadAndALUAtomicV2()        { return  (_features[0] & InterlockedAccess2Mask)        == InterlockedAccess2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   404
  static bool has_TxMem()                     { return ((_features[1] & TransactionalExecutionMask)    == TransactionalExecutionMask) &&
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   405
                                                       ((_features[0] & ConstrainedTxExecutionMask)    == ConstrainedTxExecutionMask); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   406
  static bool has_CryptoExt5()                { return  (_features[0] & CryptoExtension5Mask)          == CryptoExtension5Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   407
  static bool has_LoadStoreConditional2()     { return  (_features[0] & LoadStoreConditional2Mask)     == LoadStoreConditional2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   408
  static bool has_VectorFacility()            { return  (_features[2] & VectorFacilityMask)            == VectorFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   409
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   410
  static bool has_TestFeatureImpl()           { return  (_features[0] & TestFeature1ImplMask)          == TestFeature1ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   411
  static bool has_TestFeature1Impl()          { return  (_features[0] & TestFeature1ImplMask)          == TestFeature1ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   412
  static bool has_TestFeature2Impl()          { return  (_features[0] & TestFeature2ImplMask)          == TestFeature2ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   413
  static bool has_TestFeature4Impl()          { return  (_features[0] & TestFeature4ImplMask)          == TestFeature4ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   414
  static bool has_TestFeature8Impl()          { return  (_features[0] & TestFeature8ImplMask)          == TestFeature8ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   415
  static bool has_TestFeaturesImpl()          { return  has_TestFeature1Impl() || has_TestFeature2Impl() || has_TestFeature4Impl() || has_TestFeature8Impl(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   416
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   417
  // Crypto features query functions.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   418
  static bool has_Crypto_AES128()             { return has_Crypto() && test_feature_bit(&_cipher_features[0], Cipher::_AES128, Cipher::_featureBits); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   419
  static bool has_Crypto_AES192()             { return has_Crypto() && test_feature_bit(&_cipher_features[0], Cipher::_AES192, Cipher::_featureBits); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   420
  static bool has_Crypto_AES256()             { return has_Crypto() && test_feature_bit(&_cipher_features[0], Cipher::_AES256, Cipher::_featureBits); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   421
  static bool has_Crypto_AES()                { return has_Crypto_AES128() || has_Crypto_AES192() || has_Crypto_AES256(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   422
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   423
  static bool has_Crypto_SHA1()               { return has_Crypto() && test_feature_bit(&_msgdigest_features[0], MsgDigest::_SHA1,   MsgDigest::_featureBits); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   424
  static bool has_Crypto_SHA256()             { return has_Crypto() && test_feature_bit(&_msgdigest_features[0], MsgDigest::_SHA256, MsgDigest::_featureBits); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   425
  static bool has_Crypto_SHA512()             { return has_Crypto() && test_feature_bit(&_msgdigest_features[0], MsgDigest::_SHA512, MsgDigest::_featureBits); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   426
  static bool has_Crypto_GHASH()              { return has_Crypto() && test_feature_bit(&_msgdigest_features[0], MsgDigest::_GHASH,  MsgDigest::_featureBits); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   427
  static bool has_Crypto_SHA()                { return has_Crypto_SHA1() || has_Crypto_SHA256() || has_Crypto_SHA512() || has_Crypto_GHASH(); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   428
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   429
  // CPU feature setters (to force model-specific behaviour). Test/debugging only.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   430
  static void set_has_TestFeature1Impl()          { _features[0] |= TestFeature1ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   431
  static void set_has_TestFeature2Impl()          { _features[0] |= TestFeature2ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   432
  static void set_has_TestFeature4Impl()          { _features[0] |= TestFeature4ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   433
  static void set_has_TestFeature8Impl()          { _features[0] |= TestFeature8ImplMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   434
  static void set_has_DecimalFloatingPoint()      { _features[0] |= DecimalFloatingPointMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   435
  static void set_has_FPSupportEnhancements()     { _features[0] |= FPSupportEnhancementsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   436
  static void set_has_ExecuteExtensions()         { _features[0] |= ExecuteExtensionsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   437
  static void set_has_MemWithImmALUOps()          { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   438
  static void set_has_MoveImmToMem()              { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   439
  static void set_has_Prefetch()                  { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   440
  static void set_has_MultiplySingleImm32()       { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   441
  static void set_has_CompareBranch()             { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   442
  static void set_has_CompareTrap()               { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   443
  static void set_has_RelativeLoadStore()         { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   444
  static void set_has_GnrlInstrExtensions()       { _features[0] |= GnrlInstrExtFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   445
  static void set_has_CompareSwapStore()          { _features[0] |= CompareSwapStoreMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   446
  static void set_has_HFPMultiplyAndAdd()         { _features[0] |= HFPMultiplyAndAddMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   447
  static void set_has_HFPUnnormalized()           { _features[0] |= HFPUnnormalizedMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   448
  static void set_has_ExtractCPUtime()            { _features[0] |= ExtractCPUTimeMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   449
  static void set_has_StoreClockFast()            { _features[0] |= StoreClockFastMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   450
  static void set_has_extended_immediate()        { _features[0] |= ExtImmedFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   451
  static void set_has_long_displacement_fast()    { _features[0] |= LongDispFacilityHighPerfMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   452
  static void set_has_long_displacement()         { _features[0] |= LongDispFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   453
  static void set_has_ETF2()                      { _features[0] |= ETF2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   454
  static void set_has_ETF3()                      { _features[0] |= ETF3Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   455
  static void set_has_ETF2Enhancements()          { _features[0] |= ETF2EnhancementMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   456
  static void set_has_ETF3Enhancements()          { _features[0] |= ETF3EnhancementMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   457
  static void set_has_Crypto()                    { _features[0] |= CryptoFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   458
  static void set_has_StoreFacilityListExtended() { _features[0] |= StoreFacilityListExtendedMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   459
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   460
  static void set_has_InterlockedAccessV1()       { _features[0] |= InterlockedAccess1Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   461
  static void set_has_PopCount()                  { _features[0] |= PopulationCountMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   462
  static void set_has_LoadStoreConditional()      { _features[0] |= LoadStoreConditionalMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   463
  static void set_has_HighWordInstr()             { _features[0] |= HighWordMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   464
  static void set_has_FastSync()                  { _features[0] |= FastBCRSerializationMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   465
  static void set_has_DistinctOpnds()             { _features[0] |= DistinctOpndsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   466
  static void set_has_FPExtensions()              { _features[0] |= FPExtensionsMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   467
  static void set_has_MiscInstrExt()              { _features[0] |= MiscInstrExtMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   468
  static void set_has_ProcessorAssist()           { _features[0] |= ProcessorAssistMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   469
  static void set_has_InterlockedAccessV2()       { _features[0] |= InterlockedAccess2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   470
  static void set_has_LoadAndALUAtomicV2()        { _features[0] |= InterlockedAccess2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   471
  static void set_has_TxMem()                     { _features[0] |= ConstrainedTxExecutionMask; _features[1] |= TransactionalExecutionMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   472
  static void set_has_CryptoExt3()                { _features[1] |= CryptoExtension3Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   473
  static void set_has_CryptoExt4()                { _features[1] |= CryptoExtension4Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   474
  static void set_has_LoadStoreConditional2()     { _features[0] |= LoadStoreConditional2Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   475
  static void set_has_CryptoExt5()                { _features[0] |= CryptoExtension5Mask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   476
  static void set_has_VectorFacility()            { _features[2] |= VectorFacilityMask; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   477
47607
c2ff34932cbd 8188857: [s390]: CPU feature detection incomplete
lucy
parents: 47216
diff changeset
   478
  static void reset_has_VectorFacility()          { _features[2] &= ~VectorFacilityMask; }
c2ff34932cbd 8188857: [s390]: CPU feature detection incomplete
lucy
parents: 47216
diff changeset
   479
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   480
  // Assembler testing.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   481
  static void allow_all();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   482
  static void revert();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   483
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   484
  // Generate trapping instructions into C-code.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   485
  // Sometimes helpful for debugging.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   486
  static unsigned long z_SIGILL();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   487
  static unsigned long z_SIGSEGV();
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   488
};
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   489
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   490
#endif // CPU_S390_VM_VM_VERSION_S390_HPP