hotspot/src/cpu/ppc/vm/vm_version_ppc.hpp
author mdoerr
Mon, 28 Dec 2015 10:32:20 +0100
changeset 35151 9b858be6cd3c
parent 35148 5cfafc99d791
child 35594 cc13089c6327
permissions -rw-r--r--
8146231: ppc64/gcc 4.1.2: fix build after "8143072: [JVMCI] Port JVMCI to AArch64" Reviewed-by: goetz
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     1
/*
30303
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
     2
 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
     3
 * Copyright 2012, 2015 SAP AG. All rights reserved.
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     5
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     8
 * published by the Free Software Foundation.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     9
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    14
 * accompanied this code).
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    15
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    19
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    22
 * questions.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    23
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    24
 */
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    25
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    26
#ifndef CPU_PPC_VM_VM_VERSION_PPC_HPP
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    27
#define CPU_PPC_VM_VM_VERSION_PPC_HPP
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    28
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    29
#include "runtime/globals_extension.hpp"
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    30
#include "runtime/vm_version.hpp"
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    31
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    32
class VM_Version: public Abstract_VM_Version {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    33
protected:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    34
  enum Feature_Flag {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    35
    fsqrt,
23492
af5352f40e65 8037915: PPC64/AIX: Several smaller fixes
goetz
parents: 22824
diff changeset
    36
    fsqrts,
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    37
    isel,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    38
    lxarxeh,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    39
    cmpb,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    40
    popcntb,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    41
    popcntw,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    42
    fcfids,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    43
    vand,
30303
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    44
    lqarx,
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    45
    vcipher,
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    46
    vpmsumb,
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    47
    tcheck,
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    48
    num_features // last entry to count features
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    49
  };
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    50
  enum Feature_Flag_Set {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    51
    unknown_m             = 0,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    52
    fsqrt_m               = (1 << fsqrt  ),
23492
af5352f40e65 8037915: PPC64/AIX: Several smaller fixes
goetz
parents: 22824
diff changeset
    53
    fsqrts_m              = (1 << fsqrts ),
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    54
    isel_m                = (1 << isel   ),
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    55
    lxarxeh_m             = (1 << lxarxeh),
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    56
    cmpb_m                = (1 << cmpb   ),
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    57
    popcntb_m             = (1 << popcntb),
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    58
    popcntw_m             = (1 << popcntw),
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    59
    fcfids_m              = (1 << fcfids ),
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    60
    vand_m                = (1 << vand   ),
30303
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    61
    lqarx_m               = (1 << lqarx  ),
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    62
    vcipher_m             = (1 << vcipher),
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    63
    vpmsumb_m             = (1 << vpmsumb),
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    64
    tcheck_m              = (1 << tcheck ),
35151
9b858be6cd3c 8146231: ppc64/gcc 4.1.2: fix build after "8143072: [JVMCI] Port JVMCI to AArch64"
mdoerr
parents: 35148
diff changeset
    65
    all_features_m        = (unsigned long)-1
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    66
  };
35148
5cfafc99d791 8143072: [JVMCI] Port JVMCI to AArch64
twisti
parents: 35085
diff changeset
    67
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    68
  static bool _is_determine_features_test_running;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    69
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    70
  static void print_features();
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    71
  static void determine_features(); // also measures cache line size
30303
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    72
  static void config_dscr(); // Power 8: Configure Data Stream Control Register.
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    73
  static void determine_section_size();
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    74
  static void power6_micro_bench();
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    75
public:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    76
  // Initialization
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    77
  static void initialize();
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    78
30303
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    79
  // Override Abstract_VM_Version implementation
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    80
  static bool use_biased_locking();
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    81
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    82
  static bool is_determine_features_test_running() { return _is_determine_features_test_running; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    83
  // CPU instruction support
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    84
  static bool has_fsqrt()   { return (_features & fsqrt_m) != 0; }
23492
af5352f40e65 8037915: PPC64/AIX: Several smaller fixes
goetz
parents: 22824
diff changeset
    85
  static bool has_fsqrts()  { return (_features & fsqrts_m) != 0; }
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    86
  static bool has_isel()    { return (_features & isel_m) != 0; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    87
  static bool has_lxarxeh() { return (_features & lxarxeh_m) !=0; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    88
  static bool has_cmpb()    { return (_features & cmpb_m) != 0; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    89
  static bool has_popcntb() { return (_features & popcntb_m) != 0; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    90
  static bool has_popcntw() { return (_features & popcntw_m) != 0; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    91
  static bool has_fcfids()  { return (_features & fcfids_m) != 0; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    92
  static bool has_vand()    { return (_features & vand_m) != 0; }
30303
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    93
  static bool has_lqarx()   { return (_features & lqarx_m) != 0; }
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    94
  static bool has_vcipher() { return (_features & vcipher_m) != 0; }
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    95
  static bool has_vpmsumb() { return (_features & vpmsumb_m) != 0; }
c703c89fddbf 8077838: Recent developments for ppc.
goetz
parents: 23492
diff changeset
    96
  static bool has_tcheck()  { return (_features & tcheck_m) != 0; }
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    97
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    98
  // Assembler testing
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    99
  static void allow_all();
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   100
  static void revert();
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   101
};
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   102
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   103
#endif // CPU_PPC_VM_VM_VERSION_PPC_HPP