Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a18d19c
8339783: Implementation of JEP 479: Remove the Windows 32-bit x86 Port
magicus Oct 28, 2024
5c98695
Remove FIXME for issue resolved in JDK-8343167
magicus Oct 29, 2024
d5280f6
Remove FIXMEs on x86 code that will soon go away anyway
magicus Oct 29, 2024
bcf821d
Restore PLATFORM_CHECK_DEPRECATION
magicus Oct 29, 2024
c6b8771
Use #error for unknown CPU
magicus Oct 29, 2024
6b07b7d
Merge branch 'master' into impl-JEP-479
magicus Oct 29, 2024
0167582
Update VirtualMachineImpl_openProcess since it only needs to care abo…
magicus Oct 29, 2024
bfca62e
Fix NativeLookup::lookup_entry
magicus Oct 29, 2024
d7ceff4
Remove windows-only code guarded by _LP64.
magicus Oct 29, 2024
c69e804
Remove win32-specific implementation of MacroAssembler::get_thread
magicus Oct 29, 2024
fdec8b1
Remove thread_ptr_offset remnants
magicus Oct 29, 2024
e567307
Clean up old Windows workarounds in adlc
magicus Oct 29, 2024
afb5097
adlc build were missing _CRT_DECLARE_NONSTDC_NAMES
magicus Oct 29, 2024
9df6cb9
IS_WIN64 is never used and can be completely removed
magicus Oct 29, 2024
7eb46c3
adlc need _CRT_NONSTDC_NO_WARNINGS as well... *sigh*
magicus Oct 29, 2024
3556bec
Fix 32/64-bit confusion in comment in VirtualMachineImpl.c
magicus Oct 29, 2024
341de0b
Restore comment on calling conventions
magicus Oct 30, 2024
0fff097
Error in os_windows.cpp for unknown cpu
magicus Oct 30, 2024
fe8ba08
No need to check for LP64 inside a #ifdef _WINDOWS anymore
magicus Nov 1, 2024
ec7e19b
Remove windows-32-bit code in CompilerConfig::ergo_initialize
magicus Nov 1, 2024
68d6fe5
Remove superfluous check for 64-bit on Windows in MacroAssembler::cal…
magicus Nov 1, 2024
c6dce38
Restore code in adlc.hpp
magicus Nov 4, 2024
d89bc56
Make JNICALL an empty define on all platforms
magicus Nov 4, 2024
fbd91ad
Remove __stdcall notation
magicus Nov 4, 2024
dccf1a1
Replace WIN32 with _WINDOWS in sharedRuntimeTrans.cpp
magicus Nov 4, 2024
6432343
Also remove __stdcall on tests
magicus Nov 4, 2024
82fbc51
Also remove __cdecl
magicus Nov 4, 2024
b5a481d
Also restore ADLC_CFLAGS_WARNINGS changes that are not needed any longer
magicus Nov 4, 2024
466a1a7
buildJniFunctionName is now identical on Windows and Unix, so unify it
magicus Nov 4, 2024
88d89e7
Fix build_agent_function_name to not handle "@"-stdcall style names
magicus Nov 4, 2024
6f690d0
[JNI/JVM/AGENT]_[ONLOAD/ONUNLOAD/ONATTACH]_SYMBOLS are now identical …
magicus Nov 4, 2024
48d722b
JVM_EnqueueOperation do not need __stdcall name lookup anymore
magicus Nov 4, 2024
699c641
Merge branch 'master' into impl-JEP-479
magicus Nov 4, 2024
40291b9
Update copyright years
magicus Nov 4, 2024
9b10e74
fix: jvm_md.h was included, but not jvm.h...
magicus Nov 4, 2024
de3c773
Remove FIXME
magicus Nov 6, 2024
a9d56f2
Merge branch 'master' into impl-JEP-479
magicus Nov 8, 2024
445515e
Inline buildJniFunctionName
magicus Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
fi

if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
AC_MSG_ERROR([32-bit Windows builds are not supported])
fi
BASIC_SETUP_PATHS_WINDOWS
fi

Expand Down
18 changes: 9 additions & 9 deletions make/autoconf/platform.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -666,14 +666,14 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
[
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
if test "x$enable_deprecated_ports" = "xyes"; then
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
else
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
Use --enable-deprecated-ports=yes to suppress this error.]))
fi
fi
# if test "x$OPENJDK_TARGET_CPU" = xx86; then
# if test "x$enable_deprecated_ports" = "xyes"; then
# AC_MSG_WARN([The x86 port is deprecated and may be removed in a future release.])
# else
# AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
# Use --enable-deprecated-ports=yes to suppress this error.]))
# fi
# fi
])

AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
Expand Down
32 changes: 7 additions & 25 deletions make/autoconf/toolchain_microsoft.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -82,9 +82,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
fi

AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$TARGET_CPU" = xx86; then
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
elif test "x$TARGET_CPU" = xx86_64; then
if test "x$TARGET_CPU" = xx86_64; then
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
elif test "x$TARGET_CPU" = xaarch64; then
# for host x86-64, target aarch64
Expand Down Expand Up @@ -132,9 +130,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
if test "x$TARGET_CPU" = xx86; then
VS_ENV_ARGS="/x86"
elif test "x$TARGET_CPU" = xx86_64; then
if test "x$TARGET_CPU" = xx86_64; then
VS_ENV_ARGS="/x64"
elif test "x$TARGET_CPU" = xaarch64; then
VS_ENV_ARGS="/arm64"
Expand Down Expand Up @@ -438,9 +434,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
# Need to check if the found msvcr is correct architecture
AC_MSG_CHECKING([found $DLL_NAME architecture])
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
if test "x$OPENJDK_TARGET_CPU" = xx86; then
CORRECT_MSVCR_ARCH=386
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
CORRECT_MSVCR_ARCH=x86-64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
Expand All @@ -466,9 +460,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
DLL_HELP="$2"
MSVC_DLL=

if test "x$OPENJDK_TARGET_CPU" = xx86; then
vs_target_cpu=x86
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
vs_target_cpu=x64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
vs_target_cpu=arm64
Expand Down Expand Up @@ -522,18 +514,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
# (This was the original behaviour; kept since it might turn something up)
if test "x$VCINSTALLDIR" != x; then
if test "x$OPENJDK_TARGET_CPU" = xx86; then
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVC_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $HEAD --lines 1`
fi
else
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`
fi
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`

TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[search of VCINSTALLDIR])
Expand Down
4 changes: 1 addition & 3 deletions make/hotspot/gensrc/GensrcAdlc.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
ADLCFLAGS += -DR18_RESERVED
endif
else ifeq ($(call isTargetOs, windows), true)
ifeq ($(call isTargetCpuBits, 64), true)
ADLCFLAGS += -D_WIN64=1
endif
ADLCFLAGS += -D_WIN64=1
ifeq ($(HOTSPOT_TARGET_CPU_ARCH), aarch64)
ADLCFLAGS += -DR18_RESERVED
endif
Expand Down
6 changes: 1 addition & 5 deletions make/modules/java.desktop/lib/AwtLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ LIBAWT_EXTRA_HEADER_DIRS := \
LIBAWT_CFLAGS := -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES -DMLIB_NO_LIBSUNMATH

ifeq ($(call isTargetOs, windows), true)
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
ifeq ($(call isTargetCpuBits, 64), true)
LIBAWT_CFLAGS += -DMLIB_OS64BIT
endif

LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE -DMLIB_OS64BIT
LIBAWT_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
LIBAWT_VERSIONINFO_RESOURCE := \
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
Expand Down
85 changes: 33 additions & 52 deletions make/modules/jdk.accessibility/Launcher.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -48,63 +48,44 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(BUILD_JABSWITCH)

##############################################################################
# Setup rules to create 32/64 bit version of jaccessinspector
#
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
# Build jaccessinspector
##############################################################################
define SetupInspector
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR$1, \
NAME := jaccessinspector$1, \
SRC := jaccessinspector, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
))

TARGETS += $$(BUILD_JACCESSINSPECTOR$1)
endef
$(eval $(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR, \
NAME := jaccessinspector, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
))

TARGETS += $(BUILD_JACCESSINSPECTOR)

##############################################################################
# Setup rules to create 32/64 bit version of jaccesswalker
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
# Build jaccesswalker
##############################################################################
define SetupWalker
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSWALKER$1, \
NAME := jaccesswalker$1, \
SRC := jaccesswalker, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
))

TARGETS += $$(BUILD_JACCESSWALKER$1)
endef
$(eval $(call SetupJdkExecutable, BUILD_JACCESSWALKER, \
NAME := jaccesswalker, \
EXTRA_SRC := \
bridge \
common \
toolscommon, \
EXTRA_HEADER_DIRS := include/bridge, \
CFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
LDFLAGS_windows := -stack:655360, \
LIBS_windows := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
))

ifeq ($(call isTargetCpuBits, 32), true)
$(eval $(call SetupInspector,-32,32))
$(eval $(call SetupWalker,-32,32))
$(eval $(call SetupInspector,,LEGACY))
$(eval $(call SetupWalker,,LEGACY))
else
$(eval $(call SetupInspector,,64))
$(eval $(call SetupWalker,,64))
endif
TARGETS += $(BUILD_JACCESSWALKER)
endif
112 changes: 39 additions & 73 deletions make/modules/jdk.accessibility/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -31,84 +31,50 @@ ifeq ($(call isTargetOs, windows), true)
ACCESSIBILITY_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native

##############################################################################
# Setup rules to create 32/64 bit version of javaaccessbridge
#
# Parameter 1 Suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
## Build libjavaaccessbridge
##############################################################################
define SetupJavaDLL
$(call SetupJdkLibrary, BUILD_LIBJAVAACCESSBRIDGE$1, \
NAME := javaaccessbridge$1, \
SRC := libjavaaccessbridge, \
EXTRA_SRC := common, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
CXXFLAGS_FILTER_OUT := -MD, \
CXXFLAGS := -MT -DACCESSBRIDGE_ARCH_$2, \
EXTRA_HEADER_DIRS := \
include/bridge \
java.desktop:include, \
JDK_LIBS := java.desktop:libjawt, \
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
user32.lib uuid.lib winspool.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)

TARGETS += $$(BUILD_LIBJAVAACCESSBRIDGE$1)
endef
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVAACCESSBRIDGE, \
NAME := javaaccessbridge, \
EXTRA_SRC := common, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
CXXFLAGS_FILTER_OUT := -MD, \
CXXFLAGS := -MT -DACCESSBRIDGE_ARCH_64, \
EXTRA_HEADER_DIRS := \
include/bridge \
java.desktop:include, \
JDK_LIBS := java.desktop:libjawt, \
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
user32.lib uuid.lib winspool.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
))

TARGETS += $(BUILD_LIBJAVAACCESSBRIDGE)

##############################################################################
# Setup rules to create 32/64 bit version of windowsaccessbridge
#
# Parameter 1 Suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
## Build libwindowsaccessbridge
##############################################################################
define SetupWinDLL
$(call SetupJdkLibrary, BUILD_LIBWINDOWSACCESSBRIDGE$1, \
NAME := windowsaccessbridge$1, \
SRC := libwindowsaccessbridge, \
EXTRA_SRC := common, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_microsoft_WinAccessBridge.cpp := 4302 4311, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2, \
EXTRA_HEADER_DIRS := \
include/bridge, \
LDFLAGS := \
-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
user32.lib uuid.lib winspool.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)

TARGETS += $$(BUILD_LIBWINDOWSACCESSBRIDGE$1)
endef

ifeq ($(call isTargetCpuBits, 32), true)
############################################################################
# Build libjabsysinfo
############################################################################

$(eval $(call SetupJdkLibrary, BUILD_LIBJABSYSINFO, \
NAME := jabsysinfo, \
OPTIMIZATION := LOW, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)

TARGETS += $(BUILD_LIBJABSYSINFO)
endif
$(eval $(call SetupJdkLibrary, BUILD_LIBWINDOWSACCESSBRIDGE, \
NAME := windowsaccessbridge-64, \
SRC := libwindowsaccessbridge, \
EXTRA_SRC := common, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_microsoft_WinAccessBridge.cpp := 4302 4311, \
CXXFLAGS := -DACCESSBRIDGE_ARCH_64, \
EXTRA_HEADER_DIRS := \
include/bridge, \
LDFLAGS := \
-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
user32.lib uuid.lib winspool.lib, \
VERSIONINFO_RESOURCE := \
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
))

ifeq ($(call isTargetCpuBits, 32), true)
$(eval $(call SetupJavaDLL,-32,32))
$(eval $(call SetupJavaDLL,,LEGACY))
$(eval $(call SetupWinDLL,-32,32))
$(eval $(call SetupWinDLL,,LEGACY))
else
$(eval $(call SetupJavaDLL,,64))
$(eval $(call SetupWinDLL,-64,64))
endif
TARGETS += $(BUILD_LIBWINDOWSACCESSBRIDGE)
endif
Loading