Tue, 20 Dec 2011 00:55:02 -0800
7121648: Use 3-operands SIMD instructions on x86 with AVX
Summary: Use 3-operands SIMD instructions in C2 generated code for machines with AVX.
Reviewed-by: never
1 #
2 # Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation.
8 #
9 # This code is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # version 2 for more details (a copy is included in the LICENSE file that
13 # accompanied this code).
14 #
15 # You should have received a copy of the GNU General Public License version
16 # 2 along with this work; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
23 #
25 # Resource file containing VERSIONINFO
26 Res_Files=.\version.res
28 !include ..\generated\objfiles.make
30 COMMONSRC=$(WorkSpace)\src
31 ALTSRC=$(WorkSpace)\src\closed
33 !ifdef RELEASE
34 !ifdef DEVELOP
35 CPP_FLAGS=$(CPP_FLAGS) /D "DEBUG"
36 !else
37 CPP_FLAGS=$(CPP_FLAGS) /D "PRODUCT"
38 !endif
39 !else
40 CPP_FLAGS=$(CPP_FLAGS) /D "ASSERT"
41 !endif
43 !if "$(Variant)" == "core"
44 # No need to define anything, CORE is defined as !COMPILER1 && !COMPILER2
45 !endif
47 !if "$(Variant)" == "kernel"
48 CPP_FLAGS=$(CPP_FLAGS) /D "KERNEL"
49 !endif
51 !if "$(Variant)" == "compiler1"
52 CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER1"
53 !endif
55 !if "$(Variant)" == "compiler2"
56 CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER2"
57 !endif
59 !if "$(Variant)" == "tiered"
60 CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER1" /D "COMPILER2"
61 !endif
63 !if "$(BUILDARCH)" == "i486"
64 HOTSPOT_LIB_ARCH=i386
65 !else
66 HOTSPOT_LIB_ARCH=$(BUILDARCH)
67 !endif
69 # The following variables are defined in the generated local.make file.
70 CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_RELEASE_VERSION=\"$(HS_BUILD_VER)\""
71 CPP_FLAGS=$(CPP_FLAGS) /D "JRE_RELEASE_VERSION=\"$(JRE_RELEASE_VER)\""
72 CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\""
73 CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
74 CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
75 CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_VM_DISTRO=\"$(HOTSPOT_VM_DISTRO)\""
77 CPP_FLAGS=$(CPP_FLAGS) $(CPP_INCLUDE_DIRS)
79 # Define that so jni.h is on correct side
80 CPP_FLAGS=$(CPP_FLAGS) /D "_JNI_IMPLEMENTATION_"
82 !if "$(BUILDARCH)" == "ia64"
83 STACK_SIZE="/STACK:1048576,262144"
84 !else
85 STACK_SIZE=
86 !endif
88 !if "$(BUILDARCH)" == "ia64"
89 # AsyncGetCallTrace is not supported on IA64 yet
90 AGCT_EXPORT=
91 !else
92 !if "$(Variant)" == "kernel"
93 AGCT_EXPORT=
94 !else
95 AGCT_EXPORT=/export:AsyncGetCallTrace
96 !endif
97 !endif
99 # If you modify exports below please do the corresponding changes in
100 # src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
101 LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
102 /export:JNI_GetDefaultJavaVMInitArgs \
103 /export:JNI_CreateJavaVM \
104 /export:JVM_FindClassFromBootLoader \
105 /export:JNI_GetCreatedJavaVMs \
106 /export:jio_snprintf \
107 /export:jio_printf \
108 /export:jio_fprintf \
109 /export:jio_vfprintf \
110 /export:jio_vsnprintf \
111 $(AGCT_EXPORT) \
112 /export:JVM_GetVersionInfo \
113 /export:JVM_GetThreadStateNames \
114 /export:JVM_GetThreadStateValues \
115 /export:JVM_InitAgentProperties
117 CPP_INCLUDE_DIRS=/I "..\generated"
119 !if exists($(ALTSRC)\share\vm)
120 CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\share\vm"
121 !endif
123 !if exists($(ALTSRC)\os\windows\vm)
124 CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os\windows\vm"
125 !endif
127 !if exists($(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm)
128 CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm"
129 !endif
131 !if exists($(ALTSRC)\cpu\$(Platform_arch)\vm)
132 CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\cpu\$(Platform_arch)\vm"
133 !endif
135 CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) \
136 /I "$(COMMONSRC)\share\vm" \
137 /I "$(COMMONSRC)\share\vm\precompiled" \
138 /I "$(COMMONSRC)\share\vm\prims" \
139 /I "$(COMMONSRC)\os\windows\vm" \
140 /I "$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm" \
141 /I "$(COMMONSRC)\cpu\$(Platform_arch)\vm"
143 CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
145 !if "$(USE_PRECOMPILED_HEADER)" != "0"
146 CPP_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
147 !else
148 CPP_USE_PCH=$(CPP_DONT_USE_PCH)
149 !endif
151 # Where to find the source code for the virtual machine (is this used?)
152 VM_PATH=../generated
153 VM_PATH=$(VM_PATH);../generated/adfiles
154 VM_PATH=$(VM_PATH);../generated/jvmtifiles
155 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/c1
156 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/compiler
157 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/code
158 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/interpreter
159 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/ci
160 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/classfile
161 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/parallelScavenge
162 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/shared
163 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/parNew
164 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/concurrentMarkSweep
165 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/g1
166 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_interface
167 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/asm
168 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/memory
169 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/oops
170 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/prims
171 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/runtime
172 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/services
173 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/utilities
174 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/libadt
175 VM_PATH=$(VM_PATH);$(WorkSpace)/src/os/windows/vm
176 VM_PATH=$(VM_PATH);$(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm
177 VM_PATH=$(VM_PATH);$(WorkSpace)/src/cpu/$(Platform_arch)/vm
178 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/opto
180 VM_PATH={$(VM_PATH)}
182 # Special case files not using precompiled header files.
184 c1_RInfo_$(Platform_arch).obj: $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
185 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
187 os_windows.obj: $(WorkSpace)\src\os\windows\vm\os_windows.cpp
188 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp
190 os_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
191 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
193 osThread_windows.obj: $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
194 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
196 conditionVar_windows.obj: $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
197 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
199 getThread_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
200 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
202 opcodes.obj: $(WorkSpace)\src\share\vm\opto\opcodes.cpp
203 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp
205 bytecodeInterpreter.obj: $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
206 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
208 bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
209 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
211 # Default rules for the Virtual Machine
212 {$(COMMONSRC)\share\vm\c1}.cpp.obj::
213 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
215 {$(COMMONSRC)\share\vm\compiler}.cpp.obj::
216 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
218 {$(COMMONSRC)\share\vm\code}.cpp.obj::
219 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
221 {$(COMMONSRC)\share\vm\interpreter}.cpp.obj::
222 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
224 {$(COMMONSRC)\share\vm\ci}.cpp.obj::
225 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
227 {$(COMMONSRC)\share\vm\classfile}.cpp.obj::
228 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
230 {$(COMMONSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
231 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
233 {$(COMMONSRC)\share\vm\gc_implementation\shared}.cpp.obj::
234 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
236 {$(COMMONSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
237 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
239 {$(COMMONSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
240 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
242 {$(COMMONSRC)\share\vm\gc_implementation\g1}.cpp.obj::
243 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
245 {$(COMMONSRC)\share\vm\gc_interface}.cpp.obj::
246 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
248 {$(COMMONSRC)\share\vm\asm}.cpp.obj::
249 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
251 {$(COMMONSRC)\share\vm\memory}.cpp.obj::
252 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
254 {$(COMMONSRC)\share\vm\oops}.cpp.obj::
255 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
257 {$(COMMONSRC)\share\vm\prims}.cpp.obj::
258 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
260 {$(COMMONSRC)\share\vm\runtime}.cpp.obj::
261 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
263 {$(COMMONSRC)\share\vm\services}.cpp.obj::
264 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
266 {$(COMMONSRC)\share\vm\utilities}.cpp.obj::
267 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
269 {$(COMMONSRC)\share\vm\libadt}.cpp.obj::
270 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
272 {$(COMMONSRC)\share\vm\opto}.cpp.obj::
273 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
275 {$(COMMONSRC)\os\windows\vm}.cpp.obj::
276 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
278 # This guy should remain a single colon rule because
279 # otherwise we can't specify the output filename.
280 {$(COMMONSRC)\os\windows\vm}.rc.res:
281 @$(RC) $(RC_FLAGS) /fo"$@" $<
283 {$(COMMONSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
284 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
286 {$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
287 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
289 {$(ALTSRC)\share\vm\c1}.cpp.obj::
290 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
292 {$(ALTSRC)\share\vm\compiler}.cpp.obj::
293 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
295 {$(ALTSRC)\share\vm\code}.cpp.obj::
296 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
298 {$(ALTSRC)\share\vm\interpreter}.cpp.obj::
299 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
301 {$(ALTSRC)\share\vm\ci}.cpp.obj::
302 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
304 {$(ALTSRC)\share\vm\classfile}.cpp.obj::
305 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
307 {$(ALTSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
308 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
310 {$(ALTSRC)\share\vm\gc_implementation\shared}.cpp.obj::
311 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
313 {$(ALTSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
314 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
316 {$(ALTSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
317 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
319 {$(ALTSRC)\share\vm\gc_implementation\g1}.cpp.obj::
320 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
322 {$(ALTSRC)\share\vm\gc_interface}.cpp.obj::
323 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
325 {$(ALTSRC)\share\vm\asm}.cpp.obj::
326 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
328 {$(ALTSRC)\share\vm\memory}.cpp.obj::
329 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
331 {$(ALTSRC)\share\vm\oops}.cpp.obj::
332 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
334 {$(ALTSRC)\share\vm\prims}.cpp.obj::
335 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
337 {$(ALTSRC)\share\vm\runtime}.cpp.obj::
338 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
340 {$(ALTSRC)\share\vm\services}.cpp.obj::
341 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
343 {$(ALTSRC)\share\vm\utilities}.cpp.obj::
344 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
346 {$(ALTSRC)\share\vm\libadt}.cpp.obj::
347 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
349 {$(ALTSRC)\share\vm\opto}.cpp.obj::
350 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
352 {$(ALTSRC)\os\windows\vm}.cpp.obj::
353 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
355 # otherwise we can't specify the output filename.
356 {$(ALTSRC)\os\windows\vm}.rc.res:
357 @$(RC) $(RC_FLAGS) /fo"$@" $<
359 {$(ALTSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
360 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
362 {$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
363 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
365 {..\generated\incls}.cpp.obj::
366 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
368 {..\generated\adfiles}.cpp.obj::
369 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
371 {..\generated\jvmtifiles}.cpp.obj::
372 $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
374 default::
376 _build_pch_file.obj:
377 @echo #include "precompiled.hpp" > ../generated/_build_pch_file.cpp
378 $(CPP) $(CPP_FLAGS) /Fp"vm.pch" /Yc"precompiled.hpp" /c ../generated/_build_pch_file.cpp