hotspot/src/cpu/ppc/vm/c2_init_ppc.cpp
author goetz
Wed, 11 Dec 2013 00:06:11 +0100
changeset 22861 f5c393d456fc
child 35085 839c8ba29724
permissions -rw-r--r--
8029940: PPC64 (part 122): C2 compiler port Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     1
/*
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     2
 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
     3
 * Copyright 2012, 2013 SAP AG. All rights reserved.
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
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    32
// processor dependent initialization for ppc
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
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    36
  // Power7 and later
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)) {
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    39
      FLAG_SET_ERGO(bool, UsePopCountInstruction, true);
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)) {
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    45
      FLAG_SET_ERGO(bool, InsertEndGroupPPC64, true);
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
  }
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
    48
}