author | simonis |
Fri, 06 Sep 2013 20:08:29 +0200 | |
changeset 22830 | df1bb606b2ca |
child 28366 | de66d915b262 |
permissions | -rw-r--r-- |
22830
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
1 |
# |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
2 |
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
3 |
# Copyright 2012, 2013 SAP AG. All rights reserved. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
5 |
# |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
6 |
# This code is free software; you can redistribute it and/or modify it |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
8 |
# published by the Free Software Foundation. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
9 |
# |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
14 |
# accompanied this code). |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
15 |
# |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
16 |
# You should have received a copy of the GNU General Public License version |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
19 |
# |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
21 |
# or visit www.oracle.com if you need additional information or have any |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
22 |
# questions. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
23 |
# |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
24 |
# |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
25 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
26 |
# Produce 64 bits object files. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
27 |
CFLAGS += -q64 |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
28 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
29 |
# Balanced tuning for recent versions of the POWER architecture (if supported by xlc). |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
30 |
QTUNE=$(if $(CXX_SUPPORTS_BALANCED_TUNING),balanced,pwr5) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
31 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
32 |
# Try to speed up the interpreter: use ppc64 instructions and inline |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
33 |
# glue code for external functions. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
34 |
OPT_CFLAGS += -qarch=ppc64 -qtune=$(QTUNE) -qinlglue |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
35 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
36 |
# We need variable length arrays |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
37 |
CFLAGS += -qlanglvl=c99vla |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
38 |
# Just to check for unwanted macro redefinitions |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
39 |
CFLAGS += -qlanglvl=noredefmac |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
40 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
41 |
# Suppress those "implicit private" warnings xlc gives. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
42 |
# - The omitted keyword "private" is assumed for base class "...". |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
43 |
CFLAGS += -qsuppress=1540-0198 |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
44 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
45 |
# Suppress the following numerous warning: |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
46 |
# - 1540-1090 (I) The destructor of "..." might not be called. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
47 |
# - 1500-010: (W) WARNING in ...: Infinite loop. Program may not stop. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
48 |
# There are several infinite loops in the vm, suppress. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
49 |
CFLAGS += -qsuppress=1540-1090 -qsuppress=1500-010 |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
50 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
51 |
# Suppress |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
52 |
# - 540-1088 (W) The exception specification is being ignored. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
53 |
# caused by throw() in declaration of new() in nmethod.hpp. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
54 |
CFLAGS += -qsuppress=1540-1088 |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
55 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
56 |
# Turn off floating-point optimizations that may alter program semantics |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
57 |
OPT_CFLAGS += -qstrict |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
58 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
59 |
# Disable aggressive optimizations for functions in sharedRuntimeTrig.cpp |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
60 |
# and sharedRuntimeTrans.cpp on ppc64. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
61 |
# -qstrict turns off the following optimizations: |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
62 |
# * Performing code motion and scheduling on computations such as loads |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
63 |
# and floating-point computations that may trigger an exception. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
64 |
# * Relaxing conformance to IEEE rules. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
65 |
# * Reassociating floating-point expressions. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
66 |
# When using '-qstrict' there still remains one problem |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
67 |
# in javasoft.sqe.tests.api.java.lang.Math.sin5Tests when run in compile-all |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
68 |
# mode, so don't optimize sharedRuntimeTrig.cpp at all. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
69 |
OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
70 |
OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
71 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
72 |
# xlc 10.01 parameters for ipa compile. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
73 |
QIPA_COMPILE=$(if $(CXX_IS_V10),-qipa) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
74 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
75 |
# Xlc 10.1 parameters for aggressive optimization: |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
76 |
# - qhot=level=1: Most aggressive loop optimizations. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
77 |
# - qignerrno: Assume errno is not modified by system calls. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
78 |
# - qinline: Inline method calls. No suboptions for c++ compiles. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
79 |
# - qxflag=ASMMIDCOALFIX: Activate fix for -O3 problem in interpreter loop. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
80 |
# - qxflag=asmfastsync: Activate fix for performance problem with inline assembler with memory clobber. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
81 |
QV10_OPT=$(if $(CXX_IS_V10),-qxflag=ASMMIDCOALFIX -qxflag=asmfastsync) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
82 |
QV10_OPT_AGGRESSIVE=$(if $(CXX_IS_V10),-qhot=level=1 -qignerrno -qinline) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
83 |
QV10_OPT_CONSERVATIVE=$(if $(CXX_IS_V10),-qhot=level=1 -qignerrno -qinline) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
84 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
85 |
# Disallow inlining for synchronizer.cpp, but perform O3 optimizations. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
86 |
OPT_CFLAGS/synchronizer.o = $(OPT_CFLAGS) -qnoinline |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
87 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
88 |
# Set all the xlC V10.1 options here. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
89 |
OPT_CFLAGS += $(QIPA_COMPILE) $(QV10_OPT) $(QV10_OPT_AGGRESSIVE) |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
90 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
91 |
export OBJECT_MODE=64 |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
92 |
|
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
93 |
# Also build launcher as 64 bit executable. |
df1bb606b2ca
8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
simonis
parents:
diff
changeset
|
94 |
LAUNCHERFLAGS += -q64 |