src/hotspot/cpu/ppc/c2_init_ppc.cpp
author coleenp
Wed, 14 Aug 2019 10:07:00 -0400
changeset 57745 789e967c2731
parent 54983 81becad91321
permissions -rw-r--r--
5103339: Strengthen NoSafepointVerifier Summary: Add NSV check at possible safepoint transition or places that could take out locks. Consolidate with clearing unhandled oops. Reviewed-by: dholmes, rehn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     1
/*
48626
9f6f48d4f9a1 8194814: [ppc, s390] A row of minor fixes and cleanups
goetz
parents: 47216
diff changeset
     2
 * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
9f6f48d4f9a1 8194814: [ppc, s390] A row of minor fixes and cleanups
goetz
parents: 47216
diff changeset
     3
 * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     5
 *
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     8
 * published by the Free Software Foundation.
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     9
 *
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    14
 * accompanied this code).
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    15
 *
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    19
 *
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    22
 * questions.
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    23
 *
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    24
 */
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    25
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    26
#include "precompiled.hpp"
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    27
#include "opto/compile.hpp"
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    28
#include "opto/node.hpp"
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    29
#include "runtime/globals.hpp"
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    30
#include "utilities/debug.hpp"
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    31
48626
9f6f48d4f9a1 8194814: [ppc, s390] A row of minor fixes and cleanups
goetz
parents: 47216
diff changeset
    32
// Processor dependent initialization of C2 compiler for ppc.
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    33
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    34
void Compile::pd_compiler2_init() {
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    35
48626
9f6f48d4f9a1 8194814: [ppc, s390] A row of minor fixes and cleanups
goetz
parents: 47216
diff changeset
    36
  // Power7 and later.
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    37
  if (PowerArchitecturePPC64 > 6) {
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    38
    if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
54983
81becad91321 8224203: Remove need to specify type when using FLAG_SET macros
stefank
parents: 48626
diff changeset
    39
      FLAG_SET_ERGO(UsePopCountInstruction, true);
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    40
    }
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    41
  }
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    42
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    43
  if (PowerArchitecturePPC64 == 6) {
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    44
    if (FLAG_IS_DEFAULT(InsertEndGroupPPC64)) {
54983
81becad91321 8224203: Remove need to specify type when using FLAG_SET macros
stefank
parents: 48626
diff changeset
    45
      FLAG_SET_ERGO(InsertEndGroupPPC64, true);
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    46
    }
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    47
  }
35085
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 22861
diff changeset
    48
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 22861
diff changeset
    49
  if (!VM_Version::has_isel() && FLAG_IS_DEFAULT(ConditionalMoveLimit)) {
54983
81becad91321 8224203: Remove need to specify type when using FLAG_SET macros
stefank
parents: 48626
diff changeset
    50
    FLAG_SET_ERGO(ConditionalMoveLimit, 0);
35085
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 22861
diff changeset
    51
  }
35156
a06b3d7455d6 8145913: PPC64: add Montgomery multiply intrinsic
mdoerr
parents: 35085
diff changeset
    52
a06b3d7455d6 8145913: PPC64: add Montgomery multiply intrinsic
mdoerr
parents: 35085
diff changeset
    53
  if (OptimizeFill) {
a06b3d7455d6 8145913: PPC64: add Montgomery multiply intrinsic
mdoerr
parents: 35085
diff changeset
    54
    warning("OptimizeFill is not supported on this CPU.");
a06b3d7455d6 8145913: PPC64: add Montgomery multiply intrinsic
mdoerr
parents: 35085
diff changeset
    55
    FLAG_SET_DEFAULT(OptimizeFill, false);
a06b3d7455d6 8145913: PPC64: add Montgomery multiply intrinsic
mdoerr
parents: 35085
diff changeset
    56
  }
a06b3d7455d6 8145913: PPC64: add Montgomery multiply intrinsic
mdoerr
parents: 35085
diff changeset
    57
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    58
}