mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-20 00:09:39 +01:00
Compare commits
80 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
998d0baab0 | ||
|
|
0735c8ab26 | ||
|
|
5fa2bdc6c7 | ||
|
|
be2b92bd8b | ||
|
|
38ad514589 | ||
|
|
b938a5c9ed | ||
|
|
a93605f7fb | ||
|
|
41242cbe5d | ||
|
|
5db50aca69 | ||
|
|
eb4b6fa621 | ||
|
|
e7e8083139 | ||
|
|
e6b3bda2c3 | ||
|
|
1ab6bd434f | ||
|
|
3b90ddfefe | ||
|
|
9b1f1e5294 | ||
|
|
6cad07c23b | ||
|
|
4dd6c44cbd | ||
|
|
33f2382767 | ||
|
|
419191c653 | ||
|
|
349df0a0e5 | ||
|
|
552411f832 | ||
|
|
9f0e7da64e | ||
|
|
81b065a95d | ||
|
|
4fcae1aef5 | ||
|
|
c5c866aafe | ||
|
|
ac3ce2aa15 | ||
|
|
bceaed6d4d | ||
|
|
16d917a85f | ||
|
|
60cbf29250 | ||
|
|
da14aa463b | ||
|
|
d482c1af28 | ||
|
|
e85355ada4 | ||
|
|
5d3d40d962 | ||
|
|
7583419d88 | ||
|
|
c5f1dcccfc | ||
|
|
4d82ea102a | ||
|
|
a48f5966be | ||
|
|
5daf63b717 | ||
|
|
97aca09e58 | ||
|
|
ec9437dbcc | ||
|
|
0901dedefe | ||
|
|
d22d890cac | ||
|
|
93feda3d9a | ||
|
|
fc67c2b4f1 | ||
|
|
b87d9cf2c9 | ||
|
|
0963a4e9a1 | ||
|
|
bf13a4e281 | ||
|
|
f62b5789ad | ||
|
|
9a9cfbe0ba | ||
|
|
3780ad3133 | ||
|
|
2d3c9c5e67 | ||
|
|
20c71ceacd | ||
|
|
c042f08632 | ||
|
|
bb6b04897b | ||
|
|
490825fb91 | ||
|
|
3a00fc732a | ||
|
|
f32f574004 | ||
|
|
09f755a64d | ||
|
|
1799ffeaa9 | ||
|
|
d10f277bd3 | ||
|
|
63f6a563a3 | ||
|
|
27574b384c | ||
|
|
c26c5833cc | ||
|
|
09a78b5da9 | ||
|
|
ef2d5c40c0 | ||
|
|
11fdca0634 | ||
|
|
5d414da504 | ||
|
|
93a2e773a5 | ||
|
|
336bbbe389 | ||
|
|
cb809f8e04 | ||
|
|
c4409eafc4 | ||
|
|
54f09d7345 | ||
|
|
00ffc42cef | ||
|
|
d695af89f6 | ||
|
|
9f9a732c38 | ||
|
|
864cf22241 | ||
|
|
8e5c0ee402 | ||
|
|
724a2a2c4a | ||
|
|
f365d807e5 | ||
|
|
4406915ebc |
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -38,7 +38,7 @@ HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
|
|||||||
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
|
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
|
||||||
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
|
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
|
||||||
|
|
||||||
HSDIS_TOOLCHAIN := TOOLCHAIN_DEFAULT
|
HSDIS_LINK_TYPE := C
|
||||||
HSDIS_TOOLCHAIN_CFLAGS := $(CFLAGS_JDKLIB)
|
HSDIS_TOOLCHAIN_CFLAGS := $(CFLAGS_JDKLIB)
|
||||||
HSDIS_TOOLCHAIN_LDFLAGS := $(LDFLAGS_JDKLIB)
|
HSDIS_TOOLCHAIN_LDFLAGS := $(LDFLAGS_JDKLIB)
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ endif
|
|||||||
|
|
||||||
ifeq ($(HSDIS_BACKEND), llvm)
|
ifeq ($(HSDIS_BACKEND), llvm)
|
||||||
# Use C++ instead of C
|
# Use C++ instead of C
|
||||||
|
HSDIS_LINK_TYPE := C++
|
||||||
HSDIS_TOOLCHAIN_CFLAGS := $(CXXFLAGS_JDKLIB)
|
HSDIS_TOOLCHAIN_CFLAGS := $(CXXFLAGS_JDKLIB)
|
||||||
HSDIS_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
|
||||||
|
|
||||||
ifeq ($(call isTargetOs, linux), true)
|
ifeq ($(call isTargetOs, linux), true)
|
||||||
LLVM_OS := pc-linux-gnu
|
LLVM_OS := pc-linux-gnu
|
||||||
@@ -91,14 +91,11 @@ ifeq ($(HSDIS_BACKEND), binutils)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_MINGW, \
|
BUILD_HSDIS_CC := $(MINGW_BASE)-gcc
|
||||||
CC := $(MINGW_BASE)-gcc, \
|
BUILD_HSDIS_LD := $(MINGW_BASE)-ld
|
||||||
LD := $(MINGW_BASE)-ld, \
|
BUILD_HSDIS_OBJCOPY := $(MINGW_BASE)-objcopy
|
||||||
OBJCOPY := $(MINGW_BASE)-objcopy, \
|
BUILD_HSDIS_SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT)
|
||||||
RC := $(RC), \
|
BUILD_HSDIS_SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT)
|
||||||
SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
|
||||||
SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
|
||||||
))
|
|
||||||
|
|
||||||
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/mingw/lib
|
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/mingw/lib
|
||||||
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
|
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
|
||||||
@@ -122,8 +119,8 @@ ifeq ($(HSDIS_BACKEND), binutils)
|
|||||||
|
|
||||||
TOOLCHAIN_TYPE := gcc
|
TOOLCHAIN_TYPE := gcc
|
||||||
OPENJDK_TARGET_OS := linux
|
OPENJDK_TARGET_OS := linux
|
||||||
|
OPENJDK_TARGET_OS_TYPE := unix
|
||||||
CC_OUT_OPTION := -o$(SPACE)
|
CC_OUT_OPTION := -o$(SPACE)
|
||||||
LD_OUT_OPTION := -o$(SPACE)
|
|
||||||
GENDEPS_FLAGS := -MMD -MF
|
GENDEPS_FLAGS := -MMD -MF
|
||||||
CFLAGS_DEBUG_SYMBOLS := -g
|
CFLAGS_DEBUG_SYMBOLS := -g
|
||||||
DISABLED_WARNINGS :=
|
DISABLED_WARNINGS :=
|
||||||
@@ -131,7 +128,6 @@ ifeq ($(HSDIS_BACKEND), binutils)
|
|||||||
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
|
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
|
||||||
SHARED_LIBRARY_FLAGS := -shared
|
SHARED_LIBRARY_FLAGS := -shared
|
||||||
|
|
||||||
HSDIS_TOOLCHAIN := TOOLCHAIN_MINGW
|
|
||||||
HSDIS_TOOLCHAIN_CFLAGS :=
|
HSDIS_TOOLCHAIN_CFLAGS :=
|
||||||
HSDIS_TOOLCHAIN_LDFLAGS := -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
|
HSDIS_TOOLCHAIN_LDFLAGS := -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
|
||||||
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
|
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
|
||||||
@@ -144,9 +140,9 @@ endif
|
|||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
|
$(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
|
||||||
NAME := hsdis, \
|
NAME := hsdis, \
|
||||||
|
LINK_TYPE := $(HSDIS_LINK_TYPE), \
|
||||||
SRC := $(TOPDIR)/src/utils/hsdis/$(HSDIS_BACKEND), \
|
SRC := $(TOPDIR)/src/utils/hsdis/$(HSDIS_BACKEND), \
|
||||||
EXTRA_HEADER_DIRS := $(TOPDIR)/src/utils/hsdis, \
|
EXTRA_HEADER_DIRS := $(TOPDIR)/src/utils/hsdis, \
|
||||||
TOOLCHAIN := $(HSDIS_TOOLCHAIN), \
|
|
||||||
OUTPUT_DIR := $(HSDIS_OUTPUT_DIR), \
|
OUTPUT_DIR := $(HSDIS_OUTPUT_DIR), \
|
||||||
OBJECT_DIR := $(HSDIS_OUTPUT_DIR), \
|
OBJECT_DIR := $(HSDIS_OUTPUT_DIR), \
|
||||||
DISABLED_WARNINGS_gcc := undef format-nonliteral sign-compare, \
|
DISABLED_WARNINGS_gcc := undef format-nonliteral sign-compare, \
|
||||||
|
|||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -427,8 +427,9 @@ else # $(HAS_SPEC)=true
|
|||||||
|
|
||||||
# Cleanup after a compare build
|
# Cleanup after a compare build
|
||||||
define CleanupCompareBuild
|
define CleanupCompareBuild
|
||||||
# If running with a COMPARE_BUILD patch, reverse-apply it
|
# If running with a COMPARE_BUILD patch, reverse-apply it, but continue
|
||||||
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
|
# even if that fails (can happen with removed files).
|
||||||
|
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true)
|
||||||
# Move this build away and restore the original build
|
# Move this build away and restore the original build
|
||||||
$(MKDIR) -p $(topdir)/build/compare-build
|
$(MKDIR) -p $(topdir)/build/compare-build
|
||||||
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
|
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -40,6 +40,7 @@ LDCXX := @BUILD_LDCXX@
|
|||||||
AS := @BUILD_AS@
|
AS := @BUILD_AS@
|
||||||
NM := @BUILD_NM@
|
NM := @BUILD_NM@
|
||||||
AR := @BUILD_AR@
|
AR := @BUILD_AR@
|
||||||
|
LIB := @BUILD_LIB@
|
||||||
OBJCOPY := @BUILD_OBJCOPY@
|
OBJCOPY := @BUILD_OBJCOPY@
|
||||||
STRIP := @BUILD_STRIP@
|
STRIP := @BUILD_STRIP@
|
||||||
SYSROOT_CFLAGS := @BUILD_SYSROOT_CFLAGS@
|
SYSROOT_CFLAGS := @BUILD_SYSROOT_CFLAGS@
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
|||||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||||
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
||||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
|
||||||
|
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
@@ -49,7 +48,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
|||||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
|
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
|
||||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||||
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
|
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
|
||||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
|
|
||||||
|
|
||||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||||
# Linking is different on aix
|
# Linking is different on aix
|
||||||
@@ -57,14 +55,12 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
|||||||
SET_EXECUTABLE_ORIGIN=""
|
SET_EXECUTABLE_ORIGIN=""
|
||||||
SET_SHARED_LIBRARY_ORIGIN=''
|
SET_SHARED_LIBRARY_ORIGIN=''
|
||||||
SET_SHARED_LIBRARY_NAME=''
|
SET_SHARED_LIBRARY_NAME=''
|
||||||
SET_SHARED_LIBRARY_MAPFILE=''
|
|
||||||
|
|
||||||
else
|
else
|
||||||
# Default works for linux, might work on other platforms as well.
|
# Default works for linux, might work on other platforms as well.
|
||||||
SHARED_LIBRARY_FLAGS='-shared'
|
SHARED_LIBRARY_FLAGS='-shared'
|
||||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
|
||||||
|
|
||||||
# arm specific settings
|
# arm specific settings
|
||||||
if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
|
if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
|
||||||
@@ -80,20 +76,17 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
|||||||
SET_EXECUTABLE_ORIGIN=""
|
SET_EXECUTABLE_ORIGIN=""
|
||||||
SET_SHARED_LIBRARY_ORIGIN=''
|
SET_SHARED_LIBRARY_ORIGIN=''
|
||||||
SET_SHARED_LIBRARY_NAME=''
|
SET_SHARED_LIBRARY_NAME=''
|
||||||
SET_SHARED_LIBRARY_MAPFILE=''
|
|
||||||
|
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
SHARED_LIBRARY_FLAGS="-dll"
|
SHARED_LIBRARY_FLAGS="-dll"
|
||||||
SET_EXECUTABLE_ORIGIN=''
|
SET_EXECUTABLE_ORIGIN=''
|
||||||
SET_SHARED_LIBRARY_ORIGIN=''
|
SET_SHARED_LIBRARY_ORIGIN=''
|
||||||
SET_SHARED_LIBRARY_NAME=''
|
SET_SHARED_LIBRARY_NAME=''
|
||||||
SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
||||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||||
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
|
|
||||||
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -122,6 +115,11 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
|||||||
# Add debug prefix map gcc system include paths, as they cause
|
# Add debug prefix map gcc system include paths, as they cause
|
||||||
# non-deterministic debug paths depending on gcc path location.
|
# non-deterministic debug paths depending on gcc path location.
|
||||||
DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS
|
DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS
|
||||||
|
|
||||||
|
# Add debug prefix map for OUTPUTDIR to handle the scenario when
|
||||||
|
# it is not located within WORKSPACE_ROOT
|
||||||
|
outputdir_slash="${OUTPUTDIR%/}/"
|
||||||
|
DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS -fdebug-prefix-map=${outputdir_slash}="
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -93,7 +93,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
|||||||
BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r -bbigtoc"
|
BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r -bbigtoc"
|
||||||
|
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
BASIC_LDFLAGS="-nologo -opt:ref"
|
BASIC_LDFLAGS="-opt:ref"
|
||||||
BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
|
BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
|
||||||
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows"
|
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -33,9 +33,6 @@ AC_DEFUN([FLAGS_SETUP_ARFLAGS],
|
|||||||
# FIXME: figure out if we should select AR flags depending on OS or toolchain.
|
# FIXME: figure out if we should select AR flags depending on OS or toolchain.
|
||||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||||
ARFLAGS="-X64"
|
ARFLAGS="-X64"
|
||||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
|
||||||
# lib.exe is used as AR to create static libraries.
|
|
||||||
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
|
|
||||||
else
|
else
|
||||||
ARFLAGS=""
|
ARFLAGS=""
|
||||||
fi
|
fi
|
||||||
@@ -43,6 +40,18 @@ AC_DEFUN([FLAGS_SETUP_ARFLAGS],
|
|||||||
AC_SUBST(ARFLAGS)
|
AC_SUBST(ARFLAGS)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([FLAGS_SETUP_LIBFLAGS],
|
||||||
|
[
|
||||||
|
# LIB is used to create static libraries on Windows
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||||
|
LIBFLAGS="-nodefaultlib:msvcrt"
|
||||||
|
else
|
||||||
|
LIBFLAGS=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(LIBFLAGS)
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
|
AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
|
||||||
[
|
[
|
||||||
## Setup strip.
|
## Setup strip.
|
||||||
|
|||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -364,24 +364,12 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
|||||||
|
|
||||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
CC_OUT_OPTION=-Fo
|
CC_OUT_OPTION=-Fo
|
||||||
LD_OUT_OPTION=-out:
|
|
||||||
AR_OUT_OPTION=-out:
|
|
||||||
else
|
else
|
||||||
# The option used to specify the target .o,.a or .so file.
|
# The option used to specify the target .o,.a or .so file.
|
||||||
# When compiling, how to specify the to be created object file.
|
# When compiling, how to specify the to be created object file.
|
||||||
CC_OUT_OPTION='-o$(SPACE)'
|
CC_OUT_OPTION='-o$(SPACE)'
|
||||||
# When linking, how to specify the output
|
|
||||||
LD_OUT_OPTION='-o$(SPACE)'
|
|
||||||
# When archiving, how to specify the destination static archive.
|
|
||||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
|
||||||
AR_OUT_OPTION='-r -cs$(SPACE)'
|
|
||||||
else
|
|
||||||
AR_OUT_OPTION='-rcs$(SPACE)'
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
AC_SUBST(CC_OUT_OPTION)
|
AC_SUBST(CC_OUT_OPTION)
|
||||||
AC_SUBST(LD_OUT_OPTION)
|
|
||||||
AC_SUBST(AR_OUT_OPTION)
|
|
||||||
|
|
||||||
# Generate make dependency files
|
# Generate make dependency files
|
||||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||||
@@ -423,6 +411,7 @@ AC_DEFUN([FLAGS_SETUP_FLAGS],
|
|||||||
FLAGS_SETUP_LDFLAGS
|
FLAGS_SETUP_LDFLAGS
|
||||||
|
|
||||||
FLAGS_SETUP_ARFLAGS
|
FLAGS_SETUP_ARFLAGS
|
||||||
|
FLAGS_SETUP_LIBFLAGS
|
||||||
FLAGS_SETUP_STRIPFLAGS
|
FLAGS_SETUP_STRIPFLAGS
|
||||||
FLAGS_SETUP_RCFLAGS
|
FLAGS_SETUP_RCFLAGS
|
||||||
FLAGS_SETUP_NMFLAGS
|
FLAGS_SETUP_NMFLAGS
|
||||||
|
|||||||
@@ -498,8 +498,6 @@ COMPILER_COMMAND_FILE_FLAG := @COMPILER_COMMAND_FILE_FLAG@
|
|||||||
COMPILER_BINDCMD_FILE_FLAG := @COMPILER_BINDCMD_FILE_FLAG@
|
COMPILER_BINDCMD_FILE_FLAG := @COMPILER_BINDCMD_FILE_FLAG@
|
||||||
|
|
||||||
CC_OUT_OPTION := @CC_OUT_OPTION@
|
CC_OUT_OPTION := @CC_OUT_OPTION@
|
||||||
LD_OUT_OPTION := @LD_OUT_OPTION@
|
|
||||||
AR_OUT_OPTION := @AR_OUT_OPTION@
|
|
||||||
|
|
||||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||||
C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@
|
C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@
|
||||||
@@ -604,10 +602,10 @@ BUILD_SYSROOT_LDFLAGS := @BUILD_SYSROOT_LDFLAGS@
|
|||||||
|
|
||||||
AS := @AS@
|
AS := @AS@
|
||||||
|
|
||||||
# AR is used to create a static library (is ar in unix, lib.exe in windows)
|
|
||||||
AR := @AR@
|
AR := @AR@
|
||||||
ARFLAGS := @ARFLAGS@
|
ARFLAGS := @ARFLAGS@
|
||||||
|
LIB := @LIB@
|
||||||
|
LIBFLAGS := @LIBFLAGS@
|
||||||
NM := @NM@
|
NM := @NM@
|
||||||
NMFLAGS := @NMFLAGS@
|
NMFLAGS := @NMFLAGS@
|
||||||
STRIP := @STRIP@
|
STRIP := @STRIP@
|
||||||
@@ -619,10 +617,6 @@ INSTALL_NAME_TOOL := @INSTALL_NAME_TOOL@
|
|||||||
METAL := @METAL@
|
METAL := @METAL@
|
||||||
METALLIB := @METALLIB@
|
METALLIB := @METALLIB@
|
||||||
|
|
||||||
# Options to linker to specify a mapfile.
|
|
||||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
|
||||||
SET_SHARED_LIBRARY_MAPFILE = @SET_SHARED_LIBRARY_MAPFILE@
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options for generating debug symbols
|
# Options for generating debug symbols
|
||||||
COMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@
|
COMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@
|
||||||
|
|||||||
@@ -732,11 +732,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
|||||||
AC_SUBST(AS)
|
AC_SUBST(AS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Setup the archiver (AR)
|
# Setup tools for creating static libraries (AR/LIB)
|
||||||
#
|
#
|
||||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
# The corresponding ar tool is lib.exe (used to create static libraries)
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(LIB, lib)
|
||||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, lib)
|
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar gcc-ar)
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar gcc-ar)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ include native/CompileFile.gmk
|
|||||||
include native/DebugSymbols.gmk
|
include native/DebugSymbols.gmk
|
||||||
include native/Flags.gmk
|
include native/Flags.gmk
|
||||||
include native/Link.gmk
|
include native/Link.gmk
|
||||||
|
include native/LinkMicrosoft.gmk
|
||||||
include native/Paths.gmk
|
include native/Paths.gmk
|
||||||
include native/ToolchainDefinitions.gmk
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Setup make rules for creating a native binary (a shared library or an
|
# Setup make rules for creating a native binary (a shared library or an
|
||||||
@@ -54,7 +54,8 @@ include native/ToolchainDefinitions.gmk
|
|||||||
# NAME The base name for the resulting binary, excluding decorations (like *.exe)
|
# NAME The base name for the resulting binary, excluding decorations (like *.exe)
|
||||||
# TYPE Type of binary (EXECUTABLE, LIBRARY or STATIC_LIBRARY). Default is LIBRARY.
|
# TYPE Type of binary (EXECUTABLE, LIBRARY or STATIC_LIBRARY). Default is LIBRARY.
|
||||||
# SUFFIX Override the default suffix for the output file
|
# SUFFIX Override the default suffix for the output file
|
||||||
# TOOLCHAIN Name of toolchain setup to use. Defaults to TOOLCHAIN_DEFAULT.
|
# TARGET_TYPE The type to target, BUILD or TARGET. Defaults to TARGET.
|
||||||
|
# LINK_TYPE The language to use for the linker, C or C++. Defaults to C.
|
||||||
# SRC one or more directory roots to scan for C/C++ files.
|
# SRC one or more directory roots to scan for C/C++ files.
|
||||||
# CFLAGS the compiler flags to be used, used both for C and C++.
|
# CFLAGS the compiler flags to be used, used both for C and C++.
|
||||||
# CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
|
# CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
|
||||||
@@ -72,7 +73,8 @@ include native/ToolchainDefinitions.gmk
|
|||||||
# used both for C and C++.
|
# used both for C and C++.
|
||||||
# LIBS_<toolchain>_<OS> the libraries to link to for the specified target
|
# LIBS_<toolchain>_<OS> the libraries to link to for the specified target
|
||||||
# OS and toolchain, used both for C and C++.
|
# OS and toolchain, used both for C and C++.
|
||||||
# ARFLAGS the archiver flags to be used
|
# ARFLAGS the archiver flags to be used on unix platforms
|
||||||
|
# LIBFLAGS the flags for the lib tool used on windows
|
||||||
# OBJECT_DIR the directory where we store the object files
|
# OBJECT_DIR the directory where we store the object files
|
||||||
# OUTPUT_DIR the directory where the resulting binary is put
|
# OUTPUT_DIR the directory where the resulting binary is put
|
||||||
# SYMBOLS_DIR the directory where the debug symbols are put, defaults to OUTPUT_DIR
|
# SYMBOLS_DIR the directory where the debug symbols are put, defaults to OUTPUT_DIR
|
||||||
@@ -87,11 +89,18 @@ include native/ToolchainDefinitions.gmk
|
|||||||
# VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
|
# VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
|
||||||
# RCFLAGS flags for RC.
|
# RCFLAGS flags for RC.
|
||||||
# EMBED_MANIFEST if true, embed manifest on Windows.
|
# EMBED_MANIFEST if true, embed manifest on Windows.
|
||||||
# MAPFILE mapfile
|
# CC the C compiler to use
|
||||||
# USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the
|
# CXX the C++ compiler to use
|
||||||
# mapfile for the output symbols file
|
# LD the Linker to use
|
||||||
# CC the compiler to use, default is $(CC)
|
# AR the static linker to use
|
||||||
# LD the linker to use, default is $(LD)
|
# LIB the Windows lib tool to use for creating static libraries
|
||||||
|
# AS the assembler to use
|
||||||
|
# MT the Windows MT tool to use
|
||||||
|
# RC the Windows RC tool to use
|
||||||
|
# OBJCOPY the objcopy tool for debug symbol handling
|
||||||
|
# STRIP the tool to use for stripping debug symbols
|
||||||
|
# SYSROOT_CFLAGS the compiler flags for using the specific sysroot
|
||||||
|
# SYSROOT_LDFLAGS the linker flags for using the specific sysroot
|
||||||
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST, HIGHEST_JVM, SIZE
|
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST, HIGHEST_JVM, SIZE
|
||||||
# DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
|
# DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
|
||||||
# DISABLED_WARNINGS_<toolchain>_<OS> Disable the given warnings for the specified
|
# DISABLED_WARNINGS_<toolchain>_<OS> Disable the given warnings for the specified
|
||||||
@@ -198,12 +207,18 @@ define SetupNativeCompilationBody
|
|||||||
|
|
||||||
# Prepare for linking
|
# Prepare for linking
|
||||||
$$(eval $$(call SetupLinkerFlags,$1))
|
$$(eval $$(call SetupLinkerFlags,$1))
|
||||||
$$(eval $$(call SetupLinking,$1))
|
ifneq ($(TOOLCHAIN_TYPE), microsoft)
|
||||||
|
$$(eval $$(call SetupLinking,$1))
|
||||||
|
endif
|
||||||
|
|
||||||
$$(eval $$(call SetupObjectFileList,$1))
|
$$(eval $$(call SetupObjectFileList,$1))
|
||||||
|
|
||||||
# Link the individually compiled files into a single unit
|
# Link the individually compiled files into a single unit
|
||||||
$$(eval $$(call CreateLinkedResult,$1))
|
ifneq ($(TOOLCHAIN_TYPE), microsoft)
|
||||||
|
$$(eval $$(call CreateLinkedResult,$1))
|
||||||
|
else
|
||||||
|
$$(eval $$(call CreateLinkedResultMicrosoft,$1))
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||||
# Override all targets (this is a hack)
|
# Override all targets (this is a hack)
|
||||||
@@ -284,6 +299,44 @@ define SetupBasicVariables
|
|||||||
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
|
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Setup the toolchain variables
|
||||||
|
define SetupToolchain
|
||||||
|
ifeq ($$($1_TARGET_TYPE), BUILD)
|
||||||
|
$$(call SetIfEmpty, $1_CC, $(BUILD_CC))
|
||||||
|
$$(call SetIfEmpty, $1_CXX, $(BUILD_CXX))
|
||||||
|
$$(call SetIfEmpty, $1_AR, $(BUILD_AR))
|
||||||
|
$$(call SetIfEmpty, $1_LIB, $(BUILD_LIB))
|
||||||
|
$$(call SetIfEmpty, $1_AS, $(BUILD_AS))
|
||||||
|
$$(call SetIfEmpty, $1_OBJCOPY, $(BUILD_OBJCOPY))
|
||||||
|
$$(call SetIfEmpty, $1_STRIP, $(BUILD_STRIP))
|
||||||
|
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $(BUILD_SYSROOT_CFLAGS))
|
||||||
|
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $(BUILD_SYSROOT_LDFLAGS))
|
||||||
|
ifeq ($$($1_LINK_TYPE), C++)
|
||||||
|
$$(call SetIfEmpty, $1_LD, $(BUILD_LDCXX))
|
||||||
|
else
|
||||||
|
$$(call SetIfEmpty, $1_LD, $(BUILD_LD))
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$$(call SetIfEmpty, $1_CC, $(CC))
|
||||||
|
$$(call SetIfEmpty, $1_CXX, $(CXX))
|
||||||
|
$$(call SetIfEmpty, $1_AR, $(AR))
|
||||||
|
$$(call SetIfEmpty, $1_LIB, $(LIB))
|
||||||
|
$$(call SetIfEmpty, $1_AS, $(AS))
|
||||||
|
$$(call SetIfEmpty, $1_MT, $(MT))
|
||||||
|
$$(call SetIfEmpty, $1_RC, $(RC))
|
||||||
|
$$(call SetIfEmpty, $1_OBJCOPY, $(OBJCOPY))
|
||||||
|
$$(call SetIfEmpty, $1_STRIP, $(STRIP))
|
||||||
|
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $(SYSROOT_CFLAGS))
|
||||||
|
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $(SYSROOT_LDFLAGS))
|
||||||
|
ifeq ($$($1_LINK_TYPE), C++)
|
||||||
|
$$(call SetIfEmpty, $1_LD, $(LDCXX))
|
||||||
|
else
|
||||||
|
$$(call SetIfEmpty, $1_LD, $(LD))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Setup machinery needed by the build system
|
# Setup machinery needed by the build system
|
||||||
define SetupBuildSystemSupport
|
define SetupBuildSystemSupport
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -103,6 +103,7 @@ define SetupTestFilesCompilationBody
|
|||||||
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
|
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
|
||||||
NAME := $$(unprefixed_name), \
|
NAME := $$(unprefixed_name), \
|
||||||
TYPE := $$($1_COMPILATION_TYPE), \
|
TYPE := $$($1_COMPILATION_TYPE), \
|
||||||
|
LINK_TYPE := $(if $$(filter %.cpp, $$(file)), C++, C), \
|
||||||
EXTRA_FILES := $$(file) $$($1_EXTRA_FILES), \
|
EXTRA_FILES := $$(file) $$($1_EXTRA_FILES), \
|
||||||
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
|
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
|
||||||
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
|
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
|
||||||
@@ -113,7 +114,6 @@ define SetupTestFilesCompilationBody
|
|||||||
DISABLED_WARNINGS_clang := undef format-nonliteral \
|
DISABLED_WARNINGS_clang := undef format-nonliteral \
|
||||||
missing-field-initializers sometimes-uninitialized, \
|
missing-field-initializers sometimes-uninitialized, \
|
||||||
LIBS := $$($1_LIBS_$$(name)), \
|
LIBS := $$($1_LIBS_$$(name)), \
|
||||||
TOOLCHAIN := $(if $$(filter %.cpp, $$(file)), TOOLCHAIN_LINK_CXX, TOOLCHAIN_DEFAULT), \
|
|
||||||
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
|
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
|
||||||
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
|
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
|
||||||
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \
|
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
# This file contains functionality related to linking a native binary;
|
# This file contains functionality related to linking a native binary;
|
||||||
# creating either a dynamic library, a static library or an executable.
|
# creating either a dynamic library, a static library or an executable.
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# GetEntitlementsFile
|
# GetEntitlementsFile
|
||||||
# Find entitlements file for executable when signing on macosx. If no
|
# Find entitlements file for executable when signing on macosx. If no
|
||||||
@@ -49,24 +48,15 @@ GetEntitlementsFile = \
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
define SetupLinking
|
define SetupLinking
|
||||||
ifneq ($(DISABLE_MAPFILES), true)
|
|
||||||
$1_REAL_MAPFILE := $$($1_MAPFILE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($$($1_REAL_MAPFILE), )
|
|
||||||
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Unless specifically set, stripping should only happen if symbols are also
|
# Unless specifically set, stripping should only happen if symbols are also
|
||||||
# being copied.
|
# being copied.
|
||||||
$$(call SetIfEmpty, $1_STRIP_SYMBOLS, $$($1_COPY_DEBUG_SYMBOLS))
|
$$(call SetIfEmpty, $1_STRIP_SYMBOLS, $$($1_COPY_DEBUG_SYMBOLS))
|
||||||
|
|
||||||
ifneq ($$($1_STRIP_SYMBOLS), false)
|
ifneq ($$($1_STRIP_SYMBOLS), false)
|
||||||
ifneq ($$($1_STRIP), )
|
# Default to using the global STRIPFLAGS. Allow for overriding with an
|
||||||
# Default to using the global STRIPFLAGS. Allow for overriding with an empty value
|
# empty value
|
||||||
$1_STRIPFLAGS ?= $(STRIPFLAGS)
|
$1_STRIPFLAGS ?= $(STRIPFLAGS)
|
||||||
$1_STRIP_CMD := $$($1_STRIP) $$($1_STRIPFLAGS) $$($1_TARGET)
|
$1_STRIP_CMD := $$($1_STRIP) $$($1_STRIPFLAGS) $$($1_TARGET)
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -81,7 +71,7 @@ endef
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
define CreateStaticLibrary
|
define CreateStaticLibrary
|
||||||
# Include partial linking when building the static library with clang on linux.
|
# Include partial linking when building the static library with clang on linux
|
||||||
ifeq ($(call isTargetOs, linux), true)
|
ifeq ($(call isTargetOs, linux), true)
|
||||||
ifneq ($(findstring $(TOOLCHAIN_TYPE), clang), )
|
ifneq ($(findstring $(TOOLCHAIN_TYPE), clang), )
|
||||||
$1_ENABLE_PARTIAL_LINKING := true
|
$1_ENABLE_PARTIAL_LINKING := true
|
||||||
@@ -96,14 +86,7 @@ define CreateStaticLibrary
|
|||||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||||
|
|
||||||
# Generating a static library, ie object file archive.
|
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_VARDEPS_FILE)
|
||||||
ifeq ($(STATIC_BUILD), true)
|
|
||||||
ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true)
|
|
||||||
STATIC_MAPFILE_DEP := $$($1_MAPFILE)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP)
|
|
||||||
|
|
||||||
$1_AR_OBJ_ARG := $$($1_LD_OBJ_ARG)
|
$1_AR_OBJ_ARG := $$($1_LD_OBJ_ARG)
|
||||||
# With clang on linux, partial linking is enabled and 'AR' takes the output
|
# With clang on linux, partial linking is enabled and 'AR' takes the output
|
||||||
@@ -128,36 +111,19 @@ define CreateStaticLibrary
|
|||||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_partial_link, \
|
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_partial_link, \
|
||||||
$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||||
$$($1_LD) $(LDFLAGS_CXX_PARTIAL_LINKING) $$($1_SYSROOT_LDFLAGS) \
|
$$($1_LD) $(LDFLAGS_CXX_PARTIAL_LINKING) $$($1_SYSROOT_LDFLAGS) \
|
||||||
$(LD_OUT_OPTION)$$($1_TARGET_RELOCATABLE) \
|
-o $$($1_TARGET_RELOCATABLE) \
|
||||||
$$($1_LD_OBJ_ARG))
|
$$($1_LD_OBJ_ARG))
|
||||||
endif
|
endif
|
||||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||||
$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||||
$$($1_AR) $$(ARFLAGS) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_AR_OBJ_ARG) \
|
$$($1_AR) $$(ARFLAGS) $$($1_ARFLAGS) -r -cs $$($1_TARGET) \
|
||||||
$$($1_RES))
|
$$($1_AR_OBJ_ARG) $$($1_RES))
|
||||||
ifeq ($(STATIC_BUILD), true)
|
ifeq ($(STATIC_BUILD), true)
|
||||||
ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true)
|
$(RM) $$(@D)/$$(basename $$(@F)).symbols; \
|
||||||
$(CP) $$($1_MAPFILE) $$(@D)/$$(basename $$(@F)).symbols
|
$(ECHO) "Getting symbols from nm"; \
|
||||||
else
|
$(NM) $(NMFLAGS) -m $$($1_TARGET) | $(GREP) "__TEXT" | \
|
||||||
# get the exported symbols from mapfiles and if there
|
$(EGREP) -v "non-external|private extern|__TEXT,__eh_frame" | \
|
||||||
# is no mapfile, get them from the archive
|
$(SED) -e 's/.* //' > $$(@D)/$$(basename $$(@F)).symbols
|
||||||
$(RM) $$(@D)/$$(basename $$(@F)).symbols; \
|
|
||||||
if [ ! -z $$($1_MAPFILE) -a -e $$($1_MAPFILE) ]; then \
|
|
||||||
$(ECHO) "Getting symbols from mapfile $$($1_MAPFILE)"; \
|
|
||||||
$(AWK) '/global:/','/local:/' $$($1_MAPFILE) | \
|
|
||||||
$(SED) -e 's/#.*//;s/global://;s/local://;s/\;//;s/^[ ]*/_/;/^_$$$$/d' | \
|
|
||||||
$(EGREP) -v "JNI_OnLoad|JNI_OnUnload|Agent_OnLoad|Agent_OnUnload|Agent_OnAttach" > \
|
|
||||||
$$(@D)/$$(basename $$(@F)).symbols || true; \
|
|
||||||
$(NM) $(NMFLAGS) $$($1_TARGET) | $(GREP) " T " | \
|
|
||||||
$(EGREP) "JNI_OnLoad|JNI_OnUnload|Agent_OnLoad|Agent_OnUnload|Agent_OnAttach" | \
|
|
||||||
$(CUT) -d ' ' -f 3 >> $$(@D)/$$(basename $$(@F)).symbols || true;\
|
|
||||||
else \
|
|
||||||
$(ECHO) "Getting symbols from nm"; \
|
|
||||||
$(NM) $(NMFLAGS) -m $$($1_TARGET) | $(GREP) "__TEXT" | \
|
|
||||||
$(EGREP) -v "non-external|private extern|__TEXT,__eh_frame" | \
|
|
||||||
$(SED) -e 's/.* //' > $$(@D)/$$(basename $$(@F)).symbols; \
|
|
||||||
fi
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -174,39 +140,13 @@ define CreateDynamicLibraryOrExecutable
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(call isTargetOs, windows), true)
|
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) \
|
||||||
ifeq ($$($1_EMBED_MANIFEST), true)
|
$$($1_EXTRA_LDFLAGS) $$($1_LIBS) $$($1_EXTRA_LIBS) \
|
||||||
$1_EXTRA_LDFLAGS += -manifest:embed
|
$$($1_CREATE_DEBUGINFO_CMDS) $$($1_STRIP_CMD) $$($1_CREATE_DEBUGLINK_CMDS)
|
||||||
endif
|
|
||||||
|
|
||||||
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
|
|
||||||
$1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)"
|
|
||||||
ifeq ($$($1_TYPE), LIBRARY)
|
|
||||||
# To properly trigger downstream dependants of the import library, just as
|
|
||||||
# for debug files, we must have a recipe in the rule. To avoid rerunning
|
|
||||||
# the recipe every time have it touch the target. If an import library
|
|
||||||
# file is deleted by something external, explicitly delete the target to
|
|
||||||
# trigger a rebuild of both.
|
|
||||||
ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY))
|
|
||||||
$$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing)
|
|
||||||
$$(shell $(RM) $$($1_TARGET))
|
|
||||||
endif
|
|
||||||
$$($1_IMPORT_LIBRARY): $$($1_TARGET)
|
|
||||||
$(TOUCH) $$@
|
|
||||||
|
|
||||||
$1 += $$($1_IMPORT_LIBRARY)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
|
||||||
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
|
|
||||||
$$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
|
|
||||||
$$($1_STRIP_CMD) $$($1_CREATE_DEBUGLINK_CMDS)
|
|
||||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||||
|
|
||||||
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \
|
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_VARDEPS_FILE)
|
||||||
$$($1_REAL_MAPFILE) $$($1_VARDEPS_FILE)
|
|
||||||
|
|
||||||
$$($1_TARGET): $$($1_TARGET_DEPS)
|
$$($1_TARGET): $$($1_TARGET_DEPS)
|
||||||
ifneq ($$($1_OBJ_FILE_LIST), )
|
ifneq ($$($1_OBJ_FILE_LIST), )
|
||||||
@@ -216,47 +156,27 @@ define CreateDynamicLibraryOrExecutable
|
|||||||
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
# Keep as much as possible on one execution line for best performance
|
|
||||||
# on Windows
|
|
||||||
$$(call LogInfo, Linking $$($1_BASENAME))
|
$$(call LogInfo, Linking $$($1_BASENAME))
|
||||||
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||||
ifeq ($(call isTargetOs, windows), true)
|
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||||
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \
|
$$($1_SYSROOT_LDFLAGS) -o $$($1_TARGET) $$($1_LD_OBJ_ARG) \
|
||||||
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
|
$$($1_LIBS) $$($1_EXTRA_LIBS))
|
||||||
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
|
$$($1_CREATE_DEBUGINFO_CMDS)
|
||||||
test "$$$$?" = "1" ; \
|
$$($1_STRIP_CMD)
|
||||||
$$($1_CREATE_DEBUGINFO_CMDS)
|
$$($1_CREATE_DEBUGLINK_CMDS)
|
||||||
$$($1_STRIP_CMD)
|
|
||||||
$$($1_CREATE_DEBUGLINK_CMDS)
|
|
||||||
ifeq ($(call isBuildOsEnv, windows.wsl2), true)
|
|
||||||
$$(CHMOD) +x $$($1_TARGET)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
|
||||||
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
|
||||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
|
||||||
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \
|
|
||||||
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
|
|
||||||
$$($1_CREATE_DEBUGINFO_CMDS)
|
|
||||||
$$($1_STRIP_CMD)
|
|
||||||
$$($1_CREATE_DEBUGLINK_CMDS)
|
|
||||||
endif
|
|
||||||
ifeq ($(call isTargetOs, windows), true)
|
|
||||||
ifneq ($$($1_MANIFEST), )
|
|
||||||
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# On macosx, optionally run codesign on every binary.
|
# On macosx, optionally run codesign on every binary.
|
||||||
# Remove signature explicitly first to avoid warnings if the linker
|
# Remove signature explicitly first to avoid warnings if the linker
|
||||||
# added a default adhoc signature.
|
# added a default adhoc signature.
|
||||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||||
$(CODESIGN) --remove-signature $$@
|
$(CODESIGN) --remove-signature $$@
|
||||||
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
|
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp \
|
||||||
--entitlements $$(call GetEntitlementsFile, $$@) $$@
|
--options runtime --entitlements \
|
||||||
|
$$(call GetEntitlementsFile, $$@) $$@
|
||||||
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||||
$(CODESIGN) --remove-signature $$@
|
$(CODESIGN) --remove-signature $$@
|
||||||
$(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@
|
$(CODESIGN) -f -s - --entitlements \
|
||||||
|
$$(call GetEntitlementsFile, $$@) $$@
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|||||||
112
make/common/native/LinkMicrosoft.gmk
Normal file
112
make/common/native/LinkMicrosoft.gmk
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
#
|
||||||
|
# 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
|
||||||
|
# under the terms of the GNU General Public License version 2 only, as
|
||||||
|
# published by the Free Software Foundation. Oracle designates this
|
||||||
|
# particular file as subject to the "Classpath" exception as provided
|
||||||
|
# by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
#
|
||||||
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
# accompanied this code).
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License version
|
||||||
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
|
# questions.
|
||||||
|
#
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# This file contains functionality related to linking a native binary;
|
||||||
|
# creating either a dynamic library, a static library or an executable.
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
define CreateLinkedResultMicrosoft
|
||||||
|
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||||
|
$$(eval $$(call CreateStaticLibraryMicrosoft,$1))
|
||||||
|
else
|
||||||
|
$$(eval $$(call CreateDynamicLibraryOrExecutableMicrosoft,$1))
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
define CreateStaticLibraryMicrosoft
|
||||||
|
$1_VARDEPS := $$($1_LIB) $$(LIBFLAGS) $$($1_LIBFLAGS) $$($1_LIBS) \
|
||||||
|
$$($1_EXTRA_LIBS)
|
||||||
|
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||||
|
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||||
|
|
||||||
|
$$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE)
|
||||||
|
ifneq ($$($1_OBJ_FILE_LIST), )
|
||||||
|
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
||||||
|
endif
|
||||||
|
$$(call LogInfo, Building static library $$($1_BASENAME))
|
||||||
|
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||||
|
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||||
|
$$($1_LIB) -nologo $$(LIBFLAGS) $$($1_LIBFLAGS) -out:$$($1_TARGET) \
|
||||||
|
$$($1_LD_OBJ_ARG) $$($1_RES))
|
||||||
|
endef
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
define CreateDynamicLibraryOrExecutableMicrosoft
|
||||||
|
ifeq ($$($1_EMBED_MANIFEST), true)
|
||||||
|
$1_EXTRA_LDFLAGS += -manifest:embed
|
||||||
|
endif
|
||||||
|
|
||||||
|
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
|
||||||
|
$1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)"
|
||||||
|
|
||||||
|
ifeq ($$($1_TYPE), LIBRARY)
|
||||||
|
# To properly trigger downstream dependants of the import library, just as
|
||||||
|
# for debug files, we must have a recipe in the rule. To avoid rerunning
|
||||||
|
# the recipe every time have it touch the target. If an import library
|
||||||
|
# file is deleted by something external, explicitly delete the target to
|
||||||
|
# trigger a rebuild of both.
|
||||||
|
ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY))
|
||||||
|
$$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing)
|
||||||
|
$$(shell $(RM) $$($1_TARGET))
|
||||||
|
endif
|
||||||
|
$$($1_IMPORT_LIBRARY): $$($1_TARGET)
|
||||||
|
$(TOUCH) $$@
|
||||||
|
|
||||||
|
$1 += $$($1_IMPORT_LIBRARY)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) \
|
||||||
|
$$($1_EXTRA_LDFLAGS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
|
||||||
|
$$($1_MANIFEST_VERSION)
|
||||||
|
|
||||||
|
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||||
|
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||||
|
|
||||||
|
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \
|
||||||
|
$$($1_VARDEPS_FILE)
|
||||||
|
|
||||||
|
$$($1_TARGET): $$($1_TARGET_DEPS)
|
||||||
|
ifneq ($$($1_OBJ_FILE_LIST), )
|
||||||
|
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
||||||
|
endif
|
||||||
|
$$(call LogInfo, Linking $$($1_BASENAME))
|
||||||
|
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||||
|
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||||
|
$$($1_LD) -nologo $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||||
|
$$($1_SYSROOT_LDFLAGS) -out:$$($1_TARGET) $$($1_LD_OBJ_ARG) \
|
||||||
|
$$($1_RES) $$($1_LIBS) $$($1_EXTRA_LIBS)) \
|
||||||
|
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
|
||||||
|
test "$$$$?" = "1"
|
||||||
|
ifeq ($(call isBuildOsEnv, windows.wsl2), true)
|
||||||
|
$$(CHMOD) +x $$($1_TARGET)
|
||||||
|
endif
|
||||||
|
ifneq ($$($1_MANIFEST), )
|
||||||
|
$$($1_MT) -nologo -manifest $$($1_MANIFEST) \
|
||||||
|
-identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" \
|
||||||
|
-outputresource:$$@;#1
|
||||||
|
endif
|
||||||
|
endef
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation. Oracle designates this
|
|
||||||
# particular file as subject to the "Classpath" exception as provided
|
|
||||||
# by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# This file contains functionality related to setting up our toolchain
|
|
||||||
# definition variables.
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Define a native toolchain configuration that can be used by
|
|
||||||
# SetupNativeCompilation calls
|
|
||||||
#
|
|
||||||
# Parameter 1 is the name of the toolchain definition
|
|
||||||
#
|
|
||||||
# Remaining parameters are named arguments:
|
|
||||||
# EXTENDS - Optional parent definition to get defaults from
|
|
||||||
# CC - The C compiler
|
|
||||||
# CXX - The C++ compiler
|
|
||||||
# LD - The Linker
|
|
||||||
# AR - Static linker
|
|
||||||
# AS - Assembler
|
|
||||||
# MT - Windows MT tool
|
|
||||||
# RC - Windows RC tool
|
|
||||||
# OBJCOPY - The objcopy tool for debug symbol handling
|
|
||||||
# STRIP - The tool to use for stripping debug symbols
|
|
||||||
# SYSROOT_CFLAGS - Compiler flags for using the specific sysroot
|
|
||||||
# SYSROOT_LDFLAGS - Linker flags for using the specific sysroot
|
|
||||||
DefineNativeToolchain = $(NamedParamsMacroTemplate)
|
|
||||||
define DefineNativeToolchainBody
|
|
||||||
# If extending another definition, get default values from that,
|
|
||||||
# otherwise, nothing more needs to be done as variable assignments
|
|
||||||
# already happened in NamedParamsMacroTemplate.
|
|
||||||
ifneq ($$($1_EXTENDS), )
|
|
||||||
$$(call SetIfEmpty, $1_CC, $$($$($1_EXTENDS)_CC))
|
|
||||||
$$(call SetIfEmpty, $1_CXX, $$($$($1_EXTENDS)_CXX))
|
|
||||||
$$(call SetIfEmpty, $1_LD, $$($$($1_EXTENDS)_LD))
|
|
||||||
$$(call SetIfEmpty, $1_AR, $$($$($1_EXTENDS)_AR))
|
|
||||||
$$(call SetIfEmpty, $1_AS, $$($$($1_EXTENDS)_AS))
|
|
||||||
$$(call SetIfEmpty, $1_MT, $$($$($1_EXTENDS)_MT))
|
|
||||||
$$(call SetIfEmpty, $1_RC, $$($$($1_EXTENDS)_RC))
|
|
||||||
$$(call SetIfEmpty, $1_OBJCOPY, $$($$($1_EXTENDS)_OBJCOPY))
|
|
||||||
$$(call SetIfEmpty, $1_STRIP, $$($$($1_EXTENDS)_STRIP))
|
|
||||||
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_EXTENDS)_SYSROOT_CFLAGS))
|
|
||||||
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_EXTENDS)_SYSROOT_LDFLAGS))
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Create a default toolchain with the main compiler and linker
|
|
||||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_DEFAULT, \
|
|
||||||
CC := $(CC), \
|
|
||||||
CXX := $(CXX), \
|
|
||||||
LD := $(LD), \
|
|
||||||
AR := $(AR), \
|
|
||||||
AS := $(AS), \
|
|
||||||
MT := $(MT), \
|
|
||||||
RC := $(RC), \
|
|
||||||
OBJCOPY := $(OBJCOPY), \
|
|
||||||
STRIP := $(STRIP), \
|
|
||||||
SYSROOT_CFLAGS := $(SYSROOT_CFLAGS), \
|
|
||||||
SYSROOT_LDFLAGS := $(SYSROOT_LDFLAGS), \
|
|
||||||
))
|
|
||||||
|
|
||||||
# Create a toolchain where linking is done with the C++ linker
|
|
||||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_LINK_CXX, \
|
|
||||||
EXTENDS := TOOLCHAIN_DEFAULT, \
|
|
||||||
LD := $(LDCXX), \
|
|
||||||
))
|
|
||||||
|
|
||||||
# Create a toolchain with the BUILD compiler, used for build tools that
|
|
||||||
# are to be run during the build.
|
|
||||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_BUILD, \
|
|
||||||
CC := $(BUILD_CC), \
|
|
||||||
CXX := $(BUILD_CXX), \
|
|
||||||
LD := $(BUILD_LD), \
|
|
||||||
AR := $(BUILD_AR), \
|
|
||||||
AS := $(BUILD_AS), \
|
|
||||||
OBJCOPY := $(BUILD_OBJCOPY), \
|
|
||||||
STRIP := $(BUILD_STRIP), \
|
|
||||||
SYSROOT_CFLAGS := $(BUILD_SYSROOT_CFLAGS), \
|
|
||||||
SYSROOT_LDFLAGS := $(BUILD_SYSROOT_LDFLAGS), \
|
|
||||||
))
|
|
||||||
|
|
||||||
# BUILD toolchain with the C++ linker
|
|
||||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_BUILD_LINK_CXX, \
|
|
||||||
EXTENDS := TOOLCHAIN_BUILD, \
|
|
||||||
LD := $(BUILD_LDCXX), \
|
|
||||||
))
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Setup the toolchain to be used
|
|
||||||
define SetupToolchain
|
|
||||||
$$(call SetIfEmpty, $1_TOOLCHAIN, TOOLCHAIN_DEFAULT)
|
|
||||||
$$(call SetIfEmpty, $1_CC, $$($$($1_TOOLCHAIN)_CC))
|
|
||||||
$$(call SetIfEmpty, $1_CXX, $$($$($1_TOOLCHAIN)_CXX))
|
|
||||||
$$(call SetIfEmpty, $1_LD, $$($$($1_TOOLCHAIN)_LD))
|
|
||||||
$$(call SetIfEmpty, $1_AR, $$($$($1_TOOLCHAIN)_AR))
|
|
||||||
$$(call SetIfEmpty, $1_AS, $$($$($1_TOOLCHAIN)_AS))
|
|
||||||
$$(call SetIfEmpty, $1_MT, $$($$($1_TOOLCHAIN)_MT))
|
|
||||||
$$(call SetIfEmpty, $1_RC, $$($$($1_TOOLCHAIN)_RC))
|
|
||||||
$$(call SetIfEmpty, $1_OBJCOPY, $$($$($1_TOOLCHAIN)_OBJCOPY))
|
|
||||||
$$(call SetIfEmpty, $1_STRIP, $$($$($1_TOOLCHAIN)_STRIP))
|
|
||||||
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
|
|
||||||
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
|
|
||||||
endef
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2016, 2022, 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
JVM_handle_aix_signal
|
|
||||||
numa_error
|
|
||||||
numa_warn
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2016, 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
JVM_AccessVMBooleanFlag
|
|
||||||
JVM_AccessVMIntFlag
|
|
||||||
JVM_VMBreakPoint
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2016, 2022, 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
JVM_handle_linux_signal
|
|
||||||
JVM_IsUseContainerSupport
|
|
||||||
numa_error
|
|
||||||
numa_warn
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2016, 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
JVM_handle_bsd_signal
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2016, 2023, 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
AsyncGetCallTrace
|
|
||||||
jio_fprintf
|
|
||||||
jio_printf
|
|
||||||
jio_snprintf
|
|
||||||
jio_vfprintf
|
|
||||||
jio_vsnprintf
|
|
||||||
JNI_CreateJavaVM
|
|
||||||
JNI_GetCreatedJavaVMs
|
|
||||||
JNI_GetDefaultJavaVMInitArgs
|
|
||||||
JVM_IsForeignLinkerSupported
|
|
||||||
JVM_FindClassFromBootLoader
|
|
||||||
JVM_InitAgentProperties
|
|
||||||
@@ -1,233 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2016, 2023, 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
JVM_ActiveProcessorCount
|
|
||||||
JVM_AreNestMates
|
|
||||||
JVM_ArrayCopy
|
|
||||||
JVM_AssertionStatusDirectives
|
|
||||||
JVM_BeforeHalt
|
|
||||||
JVM_CallStackWalk
|
|
||||||
JVM_Clone
|
|
||||||
JVM_ConstantPoolGetClassAt
|
|
||||||
JVM_ConstantPoolGetClassAtIfLoaded
|
|
||||||
JVM_ConstantPoolGetClassRefIndexAt
|
|
||||||
JVM_ConstantPoolGetDoubleAt
|
|
||||||
JVM_ConstantPoolGetFieldAt
|
|
||||||
JVM_ConstantPoolGetFieldAtIfLoaded
|
|
||||||
JVM_ConstantPoolGetFloatAt
|
|
||||||
JVM_ConstantPoolGetIntAt
|
|
||||||
JVM_ConstantPoolGetLongAt
|
|
||||||
JVM_ConstantPoolGetMemberRefInfoAt
|
|
||||||
JVM_ConstantPoolGetMethodAt
|
|
||||||
JVM_ConstantPoolGetMethodAtIfLoaded
|
|
||||||
JVM_ConstantPoolGetNameAndTypeRefIndexAt
|
|
||||||
JVM_ConstantPoolGetNameAndTypeRefInfoAt
|
|
||||||
JVM_ConstantPoolGetSize
|
|
||||||
JVM_ConstantPoolGetStringAt
|
|
||||||
JVM_ConstantPoolGetTagAt
|
|
||||||
JVM_ConstantPoolGetUTF8At
|
|
||||||
JVM_CurrentCarrierThread
|
|
||||||
JVM_CurrentThread
|
|
||||||
JVM_SetCurrentThread
|
|
||||||
JVM_CurrentTimeMillis
|
|
||||||
JVM_DefineClass
|
|
||||||
JVM_DefineClassWithSource
|
|
||||||
JVM_DesiredAssertionStatus
|
|
||||||
JVM_DumpAllStacks
|
|
||||||
JVM_DumpClassListToFile
|
|
||||||
JVM_DumpDynamicArchive
|
|
||||||
JVM_DumpThreads
|
|
||||||
JVM_ExpandStackFrameInfo
|
|
||||||
JVM_FillInStackTrace
|
|
||||||
JVM_FindClassFromCaller
|
|
||||||
JVM_FindClassFromClass
|
|
||||||
JVM_FindLibraryEntry
|
|
||||||
JVM_FindLoadedClass
|
|
||||||
JVM_FindPrimitiveClass
|
|
||||||
JVM_FindSignal
|
|
||||||
JVM_FreeMemory
|
|
||||||
JVM_GC
|
|
||||||
JVM_GetAllThreads
|
|
||||||
JVM_GetAndClearReferencePendingList
|
|
||||||
JVM_GetArrayElement
|
|
||||||
JVM_GetArrayLength
|
|
||||||
JVM_GetCallerClass
|
|
||||||
JVM_GetClassAccessFlags
|
|
||||||
JVM_GetClassAnnotations
|
|
||||||
JVM_GetClassConstantPool
|
|
||||||
JVM_GetClassContext
|
|
||||||
JVM_GetClassCPEntriesCount
|
|
||||||
JVM_GetClassCPTypes
|
|
||||||
JVM_GetClassDeclaredConstructors
|
|
||||||
JVM_GetClassDeclaredFields
|
|
||||||
JVM_GetClassDeclaredMethods
|
|
||||||
JVM_GetClassFieldsCount
|
|
||||||
JVM_GetClassFileVersion
|
|
||||||
JVM_GetClassInterfaces
|
|
||||||
JVM_GetClassMethodsCount
|
|
||||||
JVM_GetClassModifiers
|
|
||||||
JVM_GetClassNameUTF
|
|
||||||
JVM_GetClassSignature
|
|
||||||
JVM_GetClassSigners
|
|
||||||
JVM_GetClassTypeAnnotations
|
|
||||||
JVM_GetCPClassNameUTF
|
|
||||||
JVM_GetCPFieldClassNameUTF
|
|
||||||
JVM_GetCPFieldModifiers
|
|
||||||
JVM_GetCPFieldNameUTF
|
|
||||||
JVM_GetCPFieldSignatureUTF
|
|
||||||
JVM_GetCPMethodClassNameUTF
|
|
||||||
JVM_GetCPMethodModifiers
|
|
||||||
JVM_GetCPMethodNameUTF
|
|
||||||
JVM_GetCPMethodSignatureUTF
|
|
||||||
JVM_GetDeclaredClasses
|
|
||||||
JVM_GetDeclaringClass
|
|
||||||
JVM_GetEnclosingMethodInfo
|
|
||||||
JVM_GetExtendedNPEMessage
|
|
||||||
JVM_GetFieldIxModifiers
|
|
||||||
JVM_GetFieldTypeAnnotations
|
|
||||||
JVM_GetInheritedAccessControlContext
|
|
||||||
JVM_GetManagement
|
|
||||||
JVM_GetMethodIxArgsSize
|
|
||||||
JVM_GetMethodIxByteCode
|
|
||||||
JVM_GetMethodIxByteCodeLength
|
|
||||||
JVM_GetMethodIxExceptionIndexes
|
|
||||||
JVM_GetMethodIxExceptionsCount
|
|
||||||
JVM_GetMethodIxExceptionTableEntry
|
|
||||||
JVM_GetMethodIxExceptionTableLength
|
|
||||||
JVM_GetMethodIxLocalsCount
|
|
||||||
JVM_GetMethodIxMaxStack
|
|
||||||
JVM_GetMethodIxModifiers
|
|
||||||
JVM_GetMethodIxNameUTF
|
|
||||||
JVM_GetMethodIxSignatureUTF
|
|
||||||
JVM_GetMethodParameters
|
|
||||||
JVM_GetMethodTypeAnnotations
|
|
||||||
JVM_GetNanoTimeAdjustment
|
|
||||||
JVM_GetNestHost
|
|
||||||
JVM_GetNestMembers
|
|
||||||
JVM_GetNextThreadIdOffset
|
|
||||||
JVM_GetPermittedSubclasses
|
|
||||||
JVM_GetPrimitiveArrayElement
|
|
||||||
JVM_GetProperties
|
|
||||||
JVM_GetProtectionDomain
|
|
||||||
JVM_GetRandomSeedForDumping
|
|
||||||
JVM_GetRecordComponents
|
|
||||||
JVM_GetSimpleBinaryName
|
|
||||||
JVM_GetStackAccessControlContext
|
|
||||||
JVM_GetSystemPackage
|
|
||||||
JVM_GetSystemPackages
|
|
||||||
JVM_GetTemporaryDirectory
|
|
||||||
JVM_GetVmArguments
|
|
||||||
JVM_Halt
|
|
||||||
JVM_HasReferencePendingList
|
|
||||||
JVM_HoldsLock
|
|
||||||
JVM_GetStackTrace
|
|
||||||
JVM_IHashCode
|
|
||||||
JVM_InitClassName
|
|
||||||
JVM_InitStackTraceElement
|
|
||||||
JVM_InitStackTraceElementArray
|
|
||||||
JVM_InitializeFromArchive
|
|
||||||
JVM_InternString
|
|
||||||
JVM_Interrupt
|
|
||||||
JVM_InvokeMethod
|
|
||||||
JVM_IsArrayClass
|
|
||||||
JVM_IsCDSDumpingEnabled
|
|
||||||
JVM_IsConstructorIx
|
|
||||||
JVM_IsDumpingClassList
|
|
||||||
JVM_IsFinalizationEnabled
|
|
||||||
JVM_IsHiddenClass
|
|
||||||
JVM_IsInterface
|
|
||||||
JVM_IsPreviewEnabled
|
|
||||||
JVM_IsContinuationsSupported
|
|
||||||
JVM_IsPrimitiveClass
|
|
||||||
JVM_IsRecord
|
|
||||||
JVM_IsSameClassPackage
|
|
||||||
JVM_IsSharingEnabled
|
|
||||||
JVM_IsSupportedJNIVersion
|
|
||||||
JVM_IsVMGeneratedMethodIx
|
|
||||||
JVM_LatestUserDefinedLoader
|
|
||||||
JVM_LoadZipLibrary
|
|
||||||
JVM_LoadLibrary
|
|
||||||
JVM_LookupDefineClass
|
|
||||||
JVM_LookupLambdaProxyClassFromArchive
|
|
||||||
JVM_LogLambdaFormInvoker
|
|
||||||
JVM_MaxMemory
|
|
||||||
JVM_MaxObjectInspectionAge
|
|
||||||
JVM_MonitorNotify
|
|
||||||
JVM_MonitorNotifyAll
|
|
||||||
JVM_MonitorWait
|
|
||||||
JVM_MoreStackWalk
|
|
||||||
JVM_NanoTime
|
|
||||||
JVM_NativePath
|
|
||||||
JVM_NewArray
|
|
||||||
JVM_NewInstanceFromConstructor
|
|
||||||
JVM_NewMultiArray
|
|
||||||
JVM_PhantomReferenceRefersTo
|
|
||||||
JVM_PrintWarningAtDynamicAgentLoad
|
|
||||||
JVM_RaiseSignal
|
|
||||||
JVM_RawMonitorCreate
|
|
||||||
JVM_RawMonitorDestroy
|
|
||||||
JVM_RawMonitorEnter
|
|
||||||
JVM_RawMonitorExit
|
|
||||||
JVM_ReferenceClear
|
|
||||||
JVM_ReferenceRefersTo
|
|
||||||
JVM_RegisterContinuationMethods
|
|
||||||
JVM_RegisterLambdaProxyClassForArchiving
|
|
||||||
JVM_RegisterSignal
|
|
||||||
JVM_ReleaseUTF
|
|
||||||
JVM_ReportFinalizationComplete
|
|
||||||
JVM_SetArrayElement
|
|
||||||
JVM_SetClassSigners
|
|
||||||
JVM_SetNativeThreadName
|
|
||||||
JVM_SetPrimitiveArrayElement
|
|
||||||
JVM_SetStackWalkContinuation
|
|
||||||
JVM_SetThreadPriority
|
|
||||||
JVM_SleepNanos
|
|
||||||
JVM_StartThread
|
|
||||||
JVM_TotalMemory
|
|
||||||
JVM_UnloadLibrary
|
|
||||||
JVM_WaitForReferencePendingList
|
|
||||||
JVM_Yield
|
|
||||||
|
|
||||||
# Module related API's
|
|
||||||
JVM_AddModuleExports
|
|
||||||
JVM_AddModuleExportsToAll
|
|
||||||
JVM_AddModuleExportsToAllUnnamed
|
|
||||||
JVM_AddReadsModule
|
|
||||||
JVM_DefineArchivedModules
|
|
||||||
JVM_DefineModule
|
|
||||||
JVM_SetBootLoaderUnnamedModule
|
|
||||||
|
|
||||||
# Virtual thread notifications for JVMTI
|
|
||||||
JVM_VirtualThreadStart
|
|
||||||
JVM_VirtualThreadEnd
|
|
||||||
JVM_VirtualThreadMount
|
|
||||||
JVM_VirtualThreadUnmount
|
|
||||||
JVM_VirtualThreadHideFrames
|
|
||||||
JVM_VirtualThreadDisableSuspend
|
|
||||||
|
|
||||||
# Scoped values
|
|
||||||
JVM_EnsureMaterializedForStackWalk_func
|
|
||||||
JVM_FindScopedValueBindings
|
|
||||||
JVM_ScopedValueCache
|
|
||||||
JVM_SetScopedValueCache
|
|
||||||
#
|
|
||||||
11
make/data/hotspot-symbols/version-script.txt
Normal file
11
make/data/hotspot-symbols/version-script.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
SUNWprivate_1.1 {
|
||||||
|
global:
|
||||||
|
*;
|
||||||
|
|
||||||
|
local:
|
||||||
|
__bss_start;
|
||||||
|
_edata;
|
||||||
|
_end;
|
||||||
|
_fini;
|
||||||
|
_init;
|
||||||
|
};
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -45,7 +45,6 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
|||||||
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
|
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
|
||||||
endif
|
endif
|
||||||
else ifeq ($(call isBuildOs, windows), true)
|
else ifeq ($(call isBuildOs, windows), true)
|
||||||
ADLC_LDFLAGS += -nologo
|
|
||||||
ADLC_CFLAGS := -nologo -EHsc
|
ADLC_CFLAGS := -nologo -EHsc
|
||||||
ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
|
ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
|
||||||
endif
|
endif
|
||||||
@@ -72,7 +71,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
|||||||
$(eval $(call SetupNativeCompilation, BUILD_ADLC, \
|
$(eval $(call SetupNativeCompilation, BUILD_ADLC, \
|
||||||
NAME := adlc, \
|
NAME := adlc, \
|
||||||
TYPE := EXECUTABLE, \
|
TYPE := EXECUTABLE, \
|
||||||
TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
|
TARGET_TYPE := BUILD, \
|
||||||
|
LINK_TYPE := C++, \
|
||||||
SRC := $(TOPDIR)/src/hotspot/share/adlc, \
|
SRC := $(TOPDIR)/src/hotspot/share/adlc, \
|
||||||
EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
|
EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
|
||||||
CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
|
CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -50,7 +50,7 @@ endif
|
|||||||
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
|
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
|
||||||
NAME := gtest, \
|
NAME := gtest, \
|
||||||
TYPE := STATIC_LIBRARY, \
|
TYPE := STATIC_LIBRARY, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
LINK_TYPE := C++, \
|
||||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/libgtest, \
|
OUTPUT_DIR := $(JVM_OUTPUTDIR)/libgtest, \
|
||||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/libgtest/objs, \
|
OBJECT_DIR := $(JVM_OUTPUTDIR)/libgtest/objs, \
|
||||||
SRC := \
|
SRC := \
|
||||||
@@ -75,25 +75,11 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
|
|||||||
TARGETS += $(BUILD_GTEST_LIBGTEST)
|
TARGETS += $(BUILD_GTEST_LIBGTEST)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
ifeq ($(call isTargetOs, windows), true)
|
|
||||||
GTEST_JVM_MAPFILE := $(JVM_MAPFILE)
|
|
||||||
else
|
|
||||||
GTEST_JVM_MAPFILE := $(JVM_OUTPUTDIR)/gtest/mapfile
|
|
||||||
|
|
||||||
$(JVM_OUTPUTDIR)/gtest/symbols: $(JVM_OUTPUTDIR)/symbols
|
|
||||||
$(call MakeDir, $(@D))
|
|
||||||
( $(CAT) $< ; echo "runUnitTests" ) > $@
|
|
||||||
|
|
||||||
$(GTEST_JVM_MAPFILE): $(JVM_OUTPUTDIR)/gtest/symbols
|
|
||||||
$(call create-mapfile)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Additional disabled warnings are due to code in the test source.
|
# Additional disabled warnings are due to code in the test source.
|
||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
||||||
NAME := jvm, \
|
NAME := jvm, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
LINK_TYPE := C++, \
|
||||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
||||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
|
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
|
||||||
SRC := $(GTEST_TEST_SRC), \
|
SRC := $(GTEST_TEST_SRC), \
|
||||||
@@ -123,8 +109,6 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
|||||||
LIBS_unix := -lgtest, \
|
LIBS_unix := -lgtest, \
|
||||||
LIBS_windows := $(JVM_OUTPUTDIR)/libgtest/gtest.lib, \
|
LIBS_windows := $(JVM_OUTPUTDIR)/libgtest/gtest.lib, \
|
||||||
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
||||||
MAPFILE := $(GTEST_JVM_MAPFILE), \
|
|
||||||
USE_MAPFILE_FOR_SYMBOLS := true, \
|
|
||||||
COPY_DEBUG_SYMBOLS := $(GTEST_COPY_DEBUG_SYMBOLS), \
|
COPY_DEBUG_SYMBOLS := $(GTEST_COPY_DEBUG_SYMBOLS), \
|
||||||
ZIP_EXTERNAL_DEBUG_SYMBOLS := false, \
|
ZIP_EXTERNAL_DEBUG_SYMBOLS := false, \
|
||||||
STRIP_SYMBOLS := false, \
|
STRIP_SYMBOLS := false, \
|
||||||
@@ -134,14 +118,19 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
|||||||
|
|
||||||
$(BUILD_GTEST_LIBJVM) : $(BUILD_GTEST_LIBGTEST)
|
$(BUILD_GTEST_LIBJVM) : $(BUILD_GTEST_LIBGTEST)
|
||||||
|
|
||||||
|
ifeq ($(call isTargetOs, windows), true)
|
||||||
|
$(BUILD_GTEST_LIBJVM_TARGET): $(WIN_EXPORT_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
TARGETS += $(BUILD_GTEST_LIBJVM)
|
TARGETS += $(BUILD_GTEST_LIBJVM)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
$(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
|
$(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
|
||||||
NAME := gtestLauncher, \
|
NAME := gtestLauncher, \
|
||||||
TYPE := EXECUTABLE, \
|
TYPE := EXECUTABLE, \
|
||||||
|
LINK_TYPE := C++, \
|
||||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
||||||
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
|
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
|
||||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
|
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -33,7 +33,6 @@ include lib/JvmFlags.gmk
|
|||||||
# Setup compilation of the main Hotspot native library (libjvm).
|
# Setup compilation of the main Hotspot native library (libjvm).
|
||||||
|
|
||||||
JVM_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm
|
JVM_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm
|
||||||
JVM_MAPFILE := $(JVM_OUTPUTDIR)/mapfile
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Platform independent setup
|
# Platform independent setup
|
||||||
@@ -146,12 +145,28 @@ $(call FillFindCache, $(JVM_SRC_DIRS))
|
|||||||
# operator new.
|
# operator new.
|
||||||
LIBJVM_STATIC_EXCLUDE_OBJS := operator_new.o
|
LIBJVM_STATIC_EXCLUDE_OBJS := operator_new.o
|
||||||
|
|
||||||
|
ifeq ($(call isTargetOs, windows), true)
|
||||||
|
ifeq ($(STATIC_LIBS), true)
|
||||||
|
WIN_EXPORT_FILE := $(JVM_OUTPUTDIR)/static-win-exports.def
|
||||||
|
else
|
||||||
|
WIN_EXPORT_FILE := $(JVM_OUTPUTDIR)/win-exports.def
|
||||||
|
endif
|
||||||
|
|
||||||
|
JVM_LDFLAGS += -def:$(WIN_EXPORT_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(call isTargetOs, linux), true)
|
||||||
|
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script.txt
|
||||||
|
|
||||||
|
JVM_LDFLAGS += -Wl,--exclude-libs,ALL -Wl,-version-script=$(HOTSPOT_VERSION_SCRIPT)
|
||||||
|
endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Now set up the actual compilation of the main hotspot native library
|
# Now set up the actual compilation of the main hotspot native library
|
||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
||||||
NAME := jvm, \
|
NAME := jvm, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
LINK_TYPE := C++, \
|
||||||
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
||||||
SRC := $(JVM_SRC_DIRS), \
|
SRC := $(JVM_SRC_DIRS), \
|
||||||
EXCLUDES := $(JVM_EXCLUDES), \
|
EXCLUDES := $(JVM_EXCLUDES), \
|
||||||
@@ -169,6 +184,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
|||||||
DISABLED_WARNINGS_gcc_jvmciCodeInstaller.cpp := stringop-overflow, \
|
DISABLED_WARNINGS_gcc_jvmciCodeInstaller.cpp := stringop-overflow, \
|
||||||
DISABLED_WARNINGS_gcc_jvmtiTagMap.cpp := stringop-overflow, \
|
DISABLED_WARNINGS_gcc_jvmtiTagMap.cpp := stringop-overflow, \
|
||||||
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
|
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
|
||||||
|
DISABLED_WARNINGS_gcc_shenandoahLock.cpp := stringop-overflow, \
|
||||||
DISABLED_WARNINGS_gcc_synchronizer.cpp := stringop-overflow, \
|
DISABLED_WARNINGS_gcc_synchronizer.cpp := stringop-overflow, \
|
||||||
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
|
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
|
||||||
DISABLED_WARNINGS_clang_arguments.cpp := missing-field-initializers, \
|
DISABLED_WARNINGS_clang_arguments.cpp := missing-field-initializers, \
|
||||||
@@ -194,8 +210,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
|||||||
LIBS := $(JVM_LIBS), \
|
LIBS := $(JVM_LIBS), \
|
||||||
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
||||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
|
OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
|
||||||
MAPFILE := $(JVM_MAPFILE), \
|
|
||||||
USE_MAPFILE_FOR_SYMBOLS := true, \
|
|
||||||
STRIPFLAGS := $(JVM_STRIPFLAGS), \
|
STRIPFLAGS := $(JVM_STRIPFLAGS), \
|
||||||
EMBED_MANIFEST := true, \
|
EMBED_MANIFEST := true, \
|
||||||
RC_FILEDESC := $(HOTSPOT_VM_DISTRO) $(OPENJDK_TARGET_CPU_BITS)-Bit $(JVM_VARIANT) VM, \
|
RC_FILEDESC := $(HOTSPOT_VM_DISTRO) $(OPENJDK_TARGET_CPU_BITS)-Bit $(JVM_VARIANT) VM, \
|
||||||
@@ -204,11 +218,47 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
|||||||
STATIC_LIB_EXCLUDE_OBJS := $(LIBJVM_STATIC_EXCLUDE_OBJS), \
|
STATIC_LIB_EXCLUDE_OBJS := $(LIBJVM_STATIC_EXCLUDE_OBJS), \
|
||||||
))
|
))
|
||||||
|
|
||||||
|
ifeq ($(call isTargetOs, windows), true)
|
||||||
|
# The following lines create a list of vftable symbols to be filtered out of
|
||||||
|
# the symbol file. Removing this line causes the linker to complain about too
|
||||||
|
# many (> 64K) symbols, so the _guess_ is that this line is here to keep down
|
||||||
|
# the number of exported symbols below that limit.
|
||||||
|
#
|
||||||
|
# Some usages of C++ lambdas require the vftable symbol of classes that use
|
||||||
|
# the lambda type as a template parameter. The usage of those classes won't
|
||||||
|
# link if their vftable symbols are removed. That's why there's an exception
|
||||||
|
# for vftable symbols containing the string 'lambda'.
|
||||||
|
#
|
||||||
|
# A very simple example of a lambda usage that fails if the lambda vftable
|
||||||
|
# symbols are missing in the symbol file:
|
||||||
|
#
|
||||||
|
# #include <functional>
|
||||||
|
# std::function<void()> f = [](){}
|
||||||
|
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||||
|
'{ \
|
||||||
|
if ($$7 ~ /\?\?_7.*@@6B@/ && $$7 !~ /type_info/ && $$7 !~ /lambda/) print " " $$7; \
|
||||||
|
}'
|
||||||
|
|
||||||
|
# A more correct solution would be to send BUILD_LIBJVM_ALL_OBJS instead of
|
||||||
|
# cd && *.obj, but this will result in very long command lines, which could be
|
||||||
|
# problematic.
|
||||||
|
$(WIN_EXPORT_FILE): $(BUILD_LIBJVM_ALL_OBJS)
|
||||||
|
$(call LogInfo, Generating list of symbols to export from object files)
|
||||||
|
$(call MakeDir, $(@D))
|
||||||
|
$(ECHO) "EXPORTS" > $@.tmp
|
||||||
|
$(CD) $(BUILD_LIBJVM_OBJECT_DIR) && \
|
||||||
|
$(DUMPBIN) -symbols *$(OBJ_SUFFIX) | $(AWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u >> $@.tmp
|
||||||
|
$(RM) $@
|
||||||
|
$(MV) $@.tmp $@
|
||||||
|
|
||||||
|
$(BUILD_LIBJVM_TARGET): $(WIN_EXPORT_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
# Always recompile abstract_vm_version.cpp if libjvm needs to be relinked. This ensures
|
# Always recompile abstract_vm_version.cpp if libjvm needs to be relinked. This ensures
|
||||||
# that the internal vm version is updated as it relies on __DATE__ and __TIME__
|
# that the internal vm version is updated as it relies on __DATE__ and __TIME__
|
||||||
# macros.
|
# macros.
|
||||||
ABSTRACT_VM_VERSION_OBJ := $(JVM_OUTPUTDIR)/objs/abstract_vm_version$(OBJ_SUFFIX)
|
ABSTRACT_VM_VERSION_OBJ := $(JVM_OUTPUTDIR)/objs/abstract_vm_version$(OBJ_SUFFIX)
|
||||||
$(ABSTRACT_VM_VERSION_OBJ): $(filter-out $(ABSTRACT_VM_VERSION_OBJ) $(JVM_MAPFILE), \
|
$(ABSTRACT_VM_VERSION_OBJ): $(filter-out $(ABSTRACT_VM_VERSION_OBJ), \
|
||||||
$(BUILD_LIBJVM_TARGET_DEPS))
|
$(BUILD_LIBJVM_TARGET_DEPS))
|
||||||
|
|
||||||
ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||||
@@ -236,11 +286,6 @@ endif
|
|||||||
# 1540-1090 : (I) The destructor of "..." might not be called.
|
# 1540-1090 : (I) The destructor of "..." might not be called.
|
||||||
# 1540-1639 : (I) The behavior of long type bit fields has changed ...
|
# 1540-1639 : (I) The behavior of long type bit fields has changed ...
|
||||||
|
|
||||||
# Include mapfile generation. It relies on BUILD_LIBJVM_ALL_OBJS which is only
|
|
||||||
# defined after the above call to BUILD_LIBJVM. Mapfile will be generated
|
|
||||||
# after all object files are built, but before the jvm library is linked.
|
|
||||||
include lib/JvmMapfile.gmk
|
|
||||||
|
|
||||||
TARGETS += $(BUILD_LIBJVM)
|
TARGETS += $(BUILD_LIBJVM)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
@@ -1,176 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2013, 2023, 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
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation. Oracle designates this
|
|
||||||
# particular file as subject to the "Classpath" exception as provided
|
|
||||||
# by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
$(eval $(call IncludeCustomExtension, hotspot/lib/JvmMapfile.gmk))
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Combine a list of static symbols
|
|
||||||
|
|
||||||
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86_64)), false)
|
|
||||||
# On Windows x86_64, we should not have any symbols at all, since that
|
|
||||||
# results in duplicate warnings from the linker (JDK-8043491).
|
|
||||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-shared
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(call isTargetOsType, unix), true)
|
|
||||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-unix
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)), )
|
|
||||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(findstring debug, $(DEBUG_LEVEL)), )
|
|
||||||
ifneq ($(wildcard $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)-debug), )
|
|
||||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)-debug
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Create a dynamic list of symbols from the built object files. This is highly
|
|
||||||
# platform dependent.
|
|
||||||
|
|
||||||
ifeq ($(call isTargetOs, linux), true)
|
|
||||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) --defined-only *$(OBJ_SUFFIX)
|
|
||||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
|
||||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
|
||||||
endif
|
|
||||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM|^UseSharedSpaces$$
|
|
||||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^_ZN9Arguments17SharedArchivePathE$$
|
|
||||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
|
||||||
'{ \
|
|
||||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
|
||||||
}'
|
|
||||||
|
|
||||||
else ifeq ($(call isTargetOs, macosx), true)
|
|
||||||
# nm on macosx prints out "warning: nm: no name list" to stderr for
|
|
||||||
# files without symbols. Hide this, even at the expense of hiding real errors.
|
|
||||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) -Uj *$(OBJ_SUFFIX) 2> /dev/null
|
|
||||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
|
||||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
|
||||||
endif
|
|
||||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM
|
|
||||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
|
||||||
'{ \
|
|
||||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
|
||||||
}'
|
|
||||||
|
|
||||||
# NOTE: The script is from the old build. It is broken and finds no symbols.
|
|
||||||
# The script below might be what was intended, but it fails to link with tons
|
|
||||||
# of 'cannot export hidden symbol vtable for X'.
|
|
||||||
# '{ if ($$1 ~ /^__ZTV/ || $$1 ~ /^_gHotSpotVM/) print substr($$1, 2) }'
|
|
||||||
else ifeq ($(call isTargetOs, aix), true)
|
|
||||||
# NOTE: The old build had the solution below. This should to be fixed in
|
|
||||||
# configure instead.
|
|
||||||
|
|
||||||
# On AIX we have to prevent that we pick up the 'nm' version from the GNU binutils
|
|
||||||
# which may be installed under /opt/freeware/bin. So better use an absolute path here!
|
|
||||||
# NM=/usr/bin/nm
|
|
||||||
|
|
||||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) -B -C *$(OBJ_SUFFIX)
|
|
||||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
|
||||||
'{ \
|
|
||||||
if (($$2="d" || $$2="D") && ($$3 ~ /^__vft/ || $$3 ~ /^gHotSpotVM/)) print $$3; \
|
|
||||||
if ($$3 ~ /^UseSharedSpaces$$/) print $$3; \
|
|
||||||
if ($$3 ~ /^SharedArchivePath__9Arguments$$/) print $$3; \
|
|
||||||
}'
|
|
||||||
|
|
||||||
else ifeq ($(call isTargetOs, windows), true)
|
|
||||||
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *$(OBJ_SUFFIX)
|
|
||||||
|
|
||||||
# The following lines create a list of vftable symbols to be filtered out of
|
|
||||||
# the mapfile. Removing this line causes the linker to complain about too many
|
|
||||||
# (> 64K) symbols, so the _guess_ is that this line is here to keep down the
|
|
||||||
# number of exported symbols below that limit.
|
|
||||||
#
|
|
||||||
# Some usages of C++ lambdas require the vftable symbol of classes that use
|
|
||||||
# the lambda type as a template parameter. The usage of those classes won't
|
|
||||||
# link if their vftable symbols are removed. That's why there's an exception
|
|
||||||
# for vftable symbols containing the string 'lambda'.
|
|
||||||
#
|
|
||||||
# A very simple example of a lambda usage that fails if the lambda vftable
|
|
||||||
# symbols are missing in the mapfile:
|
|
||||||
#
|
|
||||||
# #include <functional>
|
|
||||||
# std::function<void()> f = [](){}
|
|
||||||
|
|
||||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
|
||||||
'{ \
|
|
||||||
if ($$7 ~ /\?\?_7.*@@6B@/ && $$7 !~ /type_info/ && $$7 !~ /lambda/) print $$7; \
|
|
||||||
}'
|
|
||||||
|
|
||||||
else
|
|
||||||
$(error Unknown target OS $(OPENJDK_TARGET_OS) in JvmMapfile.gmk)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# A more correct solution would be to send BUILD_LIBJVM_ALL_OBJS instead of
|
|
||||||
# cd && *.o, but this will result in very long command lines, which is
|
|
||||||
# problematic on some platforms.
|
|
||||||
$(JVM_OUTPUTDIR)/symbols-objects: $(BUILD_LIBJVM_ALL_OBJS)
|
|
||||||
$(call LogInfo, Generating symbol list from object files)
|
|
||||||
$(CD) $(JVM_OUTPUTDIR)/objs && \
|
|
||||||
$(DUMP_SYMBOLS_CMD) | $(AWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u > $@
|
|
||||||
|
|
||||||
SYMBOLS_SRC += $(JVM_OUTPUTDIR)/symbols-objects
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Now concatenate all symbol lists into a single file and remove comments.
|
|
||||||
|
|
||||||
$(JVM_OUTPUTDIR)/symbols: $(SYMBOLS_SRC)
|
|
||||||
$(SED) -e '/^#/d' $^ > $@
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Finally convert the symbol list into a platform-specific mapfile
|
|
||||||
|
|
||||||
ifeq ($(call isTargetOs, macosx), true)
|
|
||||||
# On macosx, we need to add a leading underscore
|
|
||||||
define create-mapfile-work
|
|
||||||
$(AWK) '{ if ($$0 ~ ".") { print " _" $$0 } }' < $^ > $@.tmp
|
|
||||||
endef
|
|
||||||
else ifeq ($(call isTargetOs, windows), true)
|
|
||||||
# On windows, add an 'EXPORTS' header
|
|
||||||
define create-mapfile-work
|
|
||||||
$(ECHO) "EXPORTS" > $@.tmp
|
|
||||||
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 } }' < $^ >> $@.tmp
|
|
||||||
endef
|
|
||||||
else
|
|
||||||
# Assume standard linker script
|
|
||||||
define create-mapfile-work
|
|
||||||
$(PRINTF) "SUNWprivate_1.1 { \n global: \n" > $@.tmp
|
|
||||||
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 ";" } }' < $^ >> $@.tmp
|
|
||||||
$(PRINTF) " local: \n *; \n }; \n" >> $@.tmp
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
define create-mapfile
|
|
||||||
$(call LogInfo, Creating mapfile)
|
|
||||||
$(call MakeDir, $(@D))
|
|
||||||
$(call create-mapfile-work)
|
|
||||||
$(RM) $@
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(JVM_MAPFILE): $(JVM_OUTPUTDIR)/symbols
|
|
||||||
$(call create-mapfile)
|
|
||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -242,7 +242,7 @@ endif
|
|||||||
ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2)+$(filter $(TOOLCHAIN_TYPE), gcc), true+true+true+gcc)
|
ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2)+$(filter $(TOOLCHAIN_TYPE), gcc), true+true+true+gcc)
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_LIB_SIMD_SORT, \
|
$(eval $(call SetupJdkLibrary, BUILD_LIB_SIMD_SORT, \
|
||||||
NAME := simdsort, \
|
NAME := simdsort, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
LINK_TYPE := C++, \
|
||||||
OPTIMIZATION := HIGH, \
|
OPTIMIZATION := HIGH, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) -std=c++17, \
|
CXXFLAGS := $(CXXFLAGS_JDKLIB) -std=c++17, \
|
||||||
|
|||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -115,7 +115,7 @@ TARGETS += $(BUILD_LIBZIP)
|
|||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \
|
||||||
NAME := jimage, \
|
NAME := jimage, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
LINK_TYPE := C++, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||||
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
|
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||||
|
|||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -51,13 +51,14 @@ ifeq ($(call isTargetOs, aix), false)
|
|||||||
-DUSE_PLATFORM_MIDI_IN=TRUE \
|
-DUSE_PLATFORM_MIDI_IN=TRUE \
|
||||||
#
|
#
|
||||||
|
|
||||||
|
LIBJSOUND_LINK_TYPE := C
|
||||||
ifeq ($(call isTargetOs, macosx), true)
|
ifeq ($(call isTargetOs, macosx), true)
|
||||||
LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
LIBJSOUND_LINK_TYPE := C++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \
|
||||||
NAME := jsound, \
|
NAME := jsound, \
|
||||||
TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
|
LINK_TYPE := $(LIBJSOUND_LINK_TYPE), \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||||
$(LIBJSOUND_CFLAGS), \
|
$(LIBJSOUND_CFLAGS), \
|
||||||
|
|||||||
@@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -562,9 +562,9 @@ LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
|
|||||||
# libawt_xawt). See JDK-8196516 for details.
|
# libawt_xawt). See JDK-8196516 for details.
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
||||||
NAME := fontmanager, \
|
NAME := fontmanager, \
|
||||||
|
LINK_TYPE := C++, \
|
||||||
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
|
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
|
||||||
AccelGlyphCache.c, \
|
AccelGlyphCache.c, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
||||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
||||||
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
|
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
|
||||||
|
|||||||
@@ -45,16 +45,16 @@ else ifeq ($(call isTargetOs, windows), true)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SA_TOOLCHAIN := $(TOOLCHAIN_DEFAULT)
|
SA_LINK_TYPE := C
|
||||||
ifeq ($(call isTargetOs, linux), true)
|
ifeq ($(call isTargetOs, linux), true)
|
||||||
SA_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
SA_LINK_TYPE := C++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
|
$(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
|
||||||
NAME := saproc, \
|
NAME := saproc, \
|
||||||
TOOLCHAIN := $(SA_TOOLCHAIN), \
|
LINK_TYPE := $(SA_LINK_TYPE), \
|
||||||
OPTIMIZATION := HIGH, \
|
OPTIMIZATION := HIGH, \
|
||||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
DISABLED_WARNINGS_gcc := sign-compare, \
|
||||||
DISABLED_WARNINGS_gcc_ps_core.c := pointer-arith, \
|
DISABLED_WARNINGS_gcc_ps_core.c := pointer-arith, \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -31,7 +31,7 @@ ifeq ($(call isTargetOs, linux macosx windows), true)
|
|||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_LIBLE, \
|
$(eval $(call SetupJdkLibrary, BUILD_LIBLE, \
|
||||||
NAME := le, \
|
NAME := le, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
LINK_TYPE := C++, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CXXFLAGS_JDKLIB), \
|
CFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -32,13 +32,13 @@ include LauncherCommon.gmk
|
|||||||
ifeq ($(call isTargetOs, linux), true)
|
ifeq ($(call isTargetOs, linux), true)
|
||||||
JPACKAGE_APPLAUNCHER_SRC := \
|
JPACKAGE_APPLAUNCHER_SRC := \
|
||||||
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher)
|
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher)
|
||||||
JPACKAGE_APPLAUNCHER_TOOLCHAIN := TOOLCHAIN_DEFAULT
|
JPACKAGE_APPLAUNCHER_LINK_TYPE := C
|
||||||
JPACKAGE_APPLAUNCHER_INCLUDE_FILES := %.c
|
JPACKAGE_APPLAUNCHER_INCLUDE_FILES := %.c
|
||||||
else
|
else
|
||||||
JPACKAGE_APPLAUNCHER_SRC := \
|
JPACKAGE_APPLAUNCHER_SRC := \
|
||||||
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher) \
|
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher) \
|
||||||
$(call FindSrcDirsForComponent, jdk.jpackage, common)
|
$(call FindSrcDirsForComponent, jdk.jpackage, common)
|
||||||
JPACKAGE_APPLAUNCHER_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
JPACKAGE_APPLAUNCHER_LINK_TYPE := C++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@@ -59,11 +59,11 @@ JPACKAGE_APPLAUNCHER_INCLUDES := $(addprefix -I, $(JPACKAGE_APPLAUNCHER_SRC))
|
|||||||
# Output app launcher executable in resources dir, and symbols in the object dir
|
# Output app launcher executable in resources dir, and symbols in the object dir
|
||||||
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
|
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
|
||||||
NAME := jpackageapplauncher, \
|
NAME := jpackageapplauncher, \
|
||||||
|
LINK_TYPE := $(JPACKAGE_APPLAUNCHER_LINK_TYPE), \
|
||||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
|
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
|
||||||
SRC := $(JPACKAGE_APPLAUNCHER_SRC), \
|
SRC := $(JPACKAGE_APPLAUNCHER_SRC), \
|
||||||
INCLUDE_FILES := $(JPACKAGE_APPLAUNCHER_INCLUDE_FILES), \
|
INCLUDE_FILES := $(JPACKAGE_APPLAUNCHER_INCLUDE_FILES), \
|
||||||
TOOLCHAIN := $(JPACKAGE_APPLAUNCHER_TOOLCHAIN), \
|
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
|
DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
|
||||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||||
@@ -103,7 +103,7 @@ ifeq ($(call isTargetOs, linux), true)
|
|||||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjpackageapplauncheraux, \
|
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjpackageapplauncheraux, \
|
||||||
SRC := $(JPACKAGE_LIBAPPLAUNCHER_SRC), \
|
SRC := $(JPACKAGE_LIBAPPLAUNCHER_SRC), \
|
||||||
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
|
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
|
||||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
LINK_TYPE := C++, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||||
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
|
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
|
||||||
@@ -177,10 +177,10 @@ ifeq ($(call isTargetOs, windows), true)
|
|||||||
# Build non-console version of launcher
|
# Build non-console version of launcher
|
||||||
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHERWEXE, \
|
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHERWEXE, \
|
||||||
NAME := jpackageapplauncherw, \
|
NAME := jpackageapplauncherw, \
|
||||||
|
LINK_TYPE := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LINK_TYPE), \
|
||||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
|
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
|
||||||
SRC := $(BUILD_JPACKAGE_APPLAUNCHEREXE_SRC), \
|
SRC := $(BUILD_JPACKAGE_APPLAUNCHEREXE_SRC), \
|
||||||
TOOLCHAIN := $(BUILD_JPACKAGE_APPLAUNCHEREXE_TOOLCHAIN), \
|
|
||||||
OPTIMIZATION := $(BUILD_JPACKAGE_APPLAUNCHEREXE_OPTIMIZATION), \
|
OPTIMIZATION := $(BUILD_JPACKAGE_APPLAUNCHEREXE_OPTIMIZATION), \
|
||||||
CXXFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS), \
|
CXXFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS), \
|
||||||
CXXFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS_windows) -DJP_LAUNCHERW, \
|
CXXFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS_windows) -DJP_LAUNCHERW, \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, 2020 Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, 2020 Red Hat Inc. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@@ -118,10 +118,6 @@ extern "C" {
|
|||||||
else
|
else
|
||||||
Disassembler::decode((address)start, (address)start + len);
|
Disassembler::decode((address)start, (address)start + len);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void das1(uintptr_t insn) {
|
|
||||||
das(insn, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __ as->
|
#define __ as->
|
||||||
|
|||||||
@@ -1209,7 +1209,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
|||||||
len,
|
len,
|
||||||
tmp1,
|
tmp1,
|
||||||
tmp2,
|
tmp2,
|
||||||
arrayOopDesc::header_size(op->type()),
|
arrayOopDesc::base_offset_in_bytes(op->type()),
|
||||||
array_element_size(op->type()),
|
array_element_size(op->type()),
|
||||||
op->klass()->as_register(),
|
op->klass()->as_register(),
|
||||||
*op->stub()->entry());
|
*op->stub()->entry());
|
||||||
|
|||||||
@@ -188,6 +188,12 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
|
|||||||
|
|
||||||
if (len->is_valid()) {
|
if (len->is_valid()) {
|
||||||
strw(len, Address(obj, arrayOopDesc::length_offset_in_bytes()));
|
strw(len, Address(obj, arrayOopDesc::length_offset_in_bytes()));
|
||||||
|
int base_offset = arrayOopDesc::length_offset_in_bytes() + BytesPerInt;
|
||||||
|
if (!is_aligned(base_offset, BytesPerWord)) {
|
||||||
|
assert(is_aligned(base_offset, BytesPerInt), "must be 4-byte aligned");
|
||||||
|
// Clear gap/first 4 bytes following the length field.
|
||||||
|
strw(zr, Address(obj, base_offset));
|
||||||
|
}
|
||||||
} else if (UseCompressedClassPointers) {
|
} else if (UseCompressedClassPointers) {
|
||||||
store_klass_gap(obj, zr);
|
store_klass_gap(obj, zr);
|
||||||
}
|
}
|
||||||
@@ -266,7 +272,7 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
|
|||||||
|
|
||||||
verify_oop(obj);
|
verify_oop(obj);
|
||||||
}
|
}
|
||||||
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int header_size, int f, Register klass, Label& slow_case) {
|
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int base_offset_in_bytes, int f, Register klass, Label& slow_case) {
|
||||||
assert_different_registers(obj, len, t1, t2, klass);
|
assert_different_registers(obj, len, t1, t2, klass);
|
||||||
|
|
||||||
// determine alignment mask
|
// determine alignment mask
|
||||||
@@ -279,7 +285,7 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
|||||||
|
|
||||||
const Register arr_size = t2; // okay to be the same
|
const Register arr_size = t2; // okay to be the same
|
||||||
// align object end
|
// align object end
|
||||||
mov(arr_size, (int32_t)header_size * BytesPerWord + MinObjAlignmentInBytesMask);
|
mov(arr_size, (int32_t)base_offset_in_bytes + MinObjAlignmentInBytesMask);
|
||||||
add(arr_size, arr_size, len, ext::uxtw, f);
|
add(arr_size, arr_size, len, ext::uxtw, f);
|
||||||
andr(arr_size, arr_size, ~MinObjAlignmentInBytesMask);
|
andr(arr_size, arr_size, ~MinObjAlignmentInBytesMask);
|
||||||
|
|
||||||
@@ -287,8 +293,11 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
|||||||
|
|
||||||
initialize_header(obj, klass, len, t1, t2);
|
initialize_header(obj, klass, len, t1, t2);
|
||||||
|
|
||||||
|
// Align-up to word boundary, because we clear the 4 bytes potentially
|
||||||
|
// following the length field in initialize_header().
|
||||||
|
int base_offset = align_up(base_offset_in_bytes, BytesPerWord);
|
||||||
// clear rest of allocated space
|
// clear rest of allocated space
|
||||||
initialize_body(obj, arr_size, header_size * BytesPerWord, t1, t2);
|
initialize_body(obj, arr_size, base_offset, t1, t2);
|
||||||
if (Compilation::current()->bailed_out()) {
|
if (Compilation::current()->bailed_out()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@@ -100,7 +100,7 @@ using MacroAssembler::null_check;
|
|||||||
// header_size: size of object header in words
|
// header_size: size of object header in words
|
||||||
// f : element scale factor
|
// f : element scale factor
|
||||||
// slow_case : exit to slow case implementation if fast allocation fails
|
// slow_case : exit to slow case implementation if fast allocation fails
|
||||||
void allocate_array(Register obj, Register len, Register t, Register t2, int header_size, int f, Register klass, Label& slow_case);
|
void allocate_array(Register obj, Register len, Register t, Register t2, int base_offset_in_bytes, int f, Register klass, Label& slow_case);
|
||||||
|
|
||||||
int rsp_offset() const { return _rsp_offset; }
|
int rsp_offset() const { return _rsp_offset; }
|
||||||
void set_rsp_offset(int n) { _rsp_offset = n; }
|
void set_rsp_offset(int n) { _rsp_offset = n; }
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
||||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||||
#include "gc/g1/g1CardTable.hpp"
|
#include "gc/g1/g1CardTable.hpp"
|
||||||
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
|
||||||
#include "gc/shared/collectedHeap.hpp"
|
#include "gc/shared/collectedHeap.hpp"
|
||||||
#include "interpreter/interp_masm.hpp"
|
#include "interpreter/interp_masm.hpp"
|
||||||
#include "runtime/javaThread.hpp"
|
#include "runtime/javaThread.hpp"
|
||||||
|
|||||||
@@ -245,9 +245,13 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Method* entry,
|
|||||||
__ mov_metadata(rmethod, entry);
|
__ mov_metadata(rmethod, entry);
|
||||||
__ str(rmethod, Address(rthread, JavaThread::callee_target_offset())); // just in case callee is deoptimized
|
__ str(rmethod, Address(rthread, JavaThread::callee_target_offset())); // just in case callee is deoptimized
|
||||||
|
|
||||||
|
__ push_cont_fastpath(rthread);
|
||||||
|
|
||||||
__ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
|
__ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
|
||||||
__ blr(rscratch1);
|
__ blr(rscratch1);
|
||||||
|
|
||||||
|
__ pop_cont_fastpath(rthread);
|
||||||
|
|
||||||
// return value shuffle
|
// return value shuffle
|
||||||
if (!needs_return_buffer) {
|
if (!needs_return_buffer) {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
|
|||||||
@@ -968,7 +968,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
|||||||
op->tmp1()->as_register(),
|
op->tmp1()->as_register(),
|
||||||
op->tmp2()->as_register(),
|
op->tmp2()->as_register(),
|
||||||
op->tmp3()->as_register(),
|
op->tmp3()->as_register(),
|
||||||
arrayOopDesc::header_size(op->type()),
|
arrayOopDesc::base_offset_in_bytes(op->type()),
|
||||||
type2aelembytes(op->type()),
|
type2aelembytes(op->type()),
|
||||||
op->klass()->as_register(),
|
op->klass()->as_register(),
|
||||||
*op->stub()->entry());
|
*op->stub()->entry());
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||||
#include "gc/g1/g1CardTable.hpp"
|
#include "gc/g1/g1CardTable.hpp"
|
||||||
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
|
||||||
#include "interpreter/interp_masm.hpp"
|
#include "interpreter/interp_masm.hpp"
|
||||||
#include "runtime/javaThread.hpp"
|
#include "runtime/javaThread.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2012, 2023 SAP SE. All rights reserved.
|
* Copyright (c) 2012, 2023 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@@ -2298,7 +2298,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
|||||||
op->tmp1()->as_register(),
|
op->tmp1()->as_register(),
|
||||||
op->tmp2()->as_register(),
|
op->tmp2()->as_register(),
|
||||||
op->tmp3()->as_register(),
|
op->tmp3()->as_register(),
|
||||||
arrayOopDesc::header_size(op->type()),
|
arrayOopDesc::base_offset_in_bytes(op->type()),
|
||||||
type2aelembytes(op->type()),
|
type2aelembytes(op->type()),
|
||||||
op->klass()->as_register(),
|
op->klass()->as_register(),
|
||||||
*op->stub()->entry());
|
*op->stub()->entry());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
|
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@@ -310,7 +310,7 @@ void C1_MacroAssembler::allocate_array(
|
|||||||
Register t1, // temp register
|
Register t1, // temp register
|
||||||
Register t2, // temp register
|
Register t2, // temp register
|
||||||
Register t3, // temp register
|
Register t3, // temp register
|
||||||
int hdr_size, // object header size in words
|
int base_offset_in_bytes, // elements offset in bytes
|
||||||
int elt_size, // element size in bytes
|
int elt_size, // element size in bytes
|
||||||
Register klass, // object klass
|
Register klass, // object klass
|
||||||
Label& slow_case // continuation point if fast allocation fails
|
Label& slow_case // continuation point if fast allocation fails
|
||||||
@@ -342,7 +342,7 @@ void C1_MacroAssembler::allocate_array(
|
|||||||
sldi(t1, len, log2_elt_size);
|
sldi(t1, len, log2_elt_size);
|
||||||
arr_len_in_bytes = t1;
|
arr_len_in_bytes = t1;
|
||||||
}
|
}
|
||||||
addi(arr_size, arr_len_in_bytes, hdr_size * wordSize + MinObjAlignmentInBytesMask); // Add space for header & alignment.
|
addi(arr_size, arr_len_in_bytes, base_offset_in_bytes + MinObjAlignmentInBytesMask); // Add space for header & alignment.
|
||||||
clrrdi(arr_size, arr_size, LogMinObjAlignmentInBytes); // Align array size.
|
clrrdi(arr_size, arr_size, LogMinObjAlignmentInBytes); // Align array size.
|
||||||
|
|
||||||
// Allocate space & initialize header.
|
// Allocate space & initialize header.
|
||||||
@@ -352,8 +352,18 @@ void C1_MacroAssembler::allocate_array(
|
|||||||
// Initialize body.
|
// Initialize body.
|
||||||
const Register base = t2;
|
const Register base = t2;
|
||||||
const Register index = t3;
|
const Register index = t3;
|
||||||
addi(base, obj, hdr_size * wordSize); // compute address of first element
|
addi(base, obj, base_offset_in_bytes); // compute address of first element
|
||||||
addi(index, arr_size, -(hdr_size * wordSize)); // compute index = number of bytes to clear
|
addi(index, arr_size, -(base_offset_in_bytes)); // compute index = number of bytes to clear
|
||||||
|
|
||||||
|
// Zero first 4 bytes, if start offset is not word aligned.
|
||||||
|
if (!is_aligned(base_offset_in_bytes, BytesPerWord)) {
|
||||||
|
assert(is_aligned(base_offset_in_bytes, BytesPerInt), "must be 4-byte aligned");
|
||||||
|
li(t1, 0);
|
||||||
|
stw(t1, 0, base);
|
||||||
|
addi(base, base, BytesPerInt);
|
||||||
|
// Note: initialize_body will align index down, no need to correct it here.
|
||||||
|
}
|
||||||
|
|
||||||
initialize_body(base, index);
|
initialize_body(base, index);
|
||||||
|
|
||||||
if (CURRENT_ENV->dtrace_alloc_probes()) {
|
if (CURRENT_ENV->dtrace_alloc_probes()) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
|
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
Register t1, // temp register
|
Register t1, // temp register
|
||||||
Register t2, // temp register
|
Register t2, // temp register
|
||||||
Register t3, // temp register
|
Register t3, // temp register
|
||||||
int hdr_size, // object header size in words
|
int base_offset_in_bytes, // elements offset in bytes
|
||||||
int elt_size, // element size in bytes
|
int elt_size, // element size in bytes
|
||||||
Register klass, // object klass
|
Register klass, // object klass
|
||||||
Label& slow_case // continuation point if fast allocation fails
|
Label& slow_case // continuation point if fast allocation fails
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||||
#include "gc/g1/g1CardTable.hpp"
|
#include "gc/g1/g1CardTable.hpp"
|
||||||
#include "gc/g1/g1DirtyCardQueue.hpp"
|
#include "gc/g1/g1DirtyCardQueue.hpp"
|
||||||
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#include "gc/g1/g1SATBMarkQueueSet.hpp"
|
#include "gc/g1/g1SATBMarkQueueSet.hpp"
|
||||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
|
||||||
#include "interpreter/interp_masm.hpp"
|
#include "interpreter/interp_masm.hpp"
|
||||||
#include "runtime/jniHandles.hpp"
|
#include "runtime/jniHandles.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ define_pd_global(bool, VMContinuations, true);
|
|||||||
|
|
||||||
// Use large code-entry alignment.
|
// Use large code-entry alignment.
|
||||||
define_pd_global(uintx, CodeCacheSegmentSize, 128);
|
define_pd_global(uintx, CodeCacheSegmentSize, 128);
|
||||||
define_pd_global(intx, CodeEntryAlignment, 128);
|
define_pd_global(intx, CodeEntryAlignment, 64);
|
||||||
define_pd_global(intx, OptoLoopAlignment, 16);
|
define_pd_global(intx, OptoLoopAlignment, 16);
|
||||||
define_pd_global(intx, InlineSmallCode, 1500);
|
define_pd_global(intx, InlineSmallCode, 1500);
|
||||||
|
|
||||||
|
|||||||
@@ -243,10 +243,14 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Method* entry,
|
|||||||
__ load_const_optimized(R19_method, (intptr_t)entry);
|
__ load_const_optimized(R19_method, (intptr_t)entry);
|
||||||
__ std(R19_method, in_bytes(JavaThread::callee_target_offset()), R16_thread);
|
__ std(R19_method, in_bytes(JavaThread::callee_target_offset()), R16_thread);
|
||||||
|
|
||||||
|
__ push_cont_fastpath();
|
||||||
|
|
||||||
__ ld(call_target_address, in_bytes(Method::from_compiled_offset()), R19_method);
|
__ ld(call_target_address, in_bytes(Method::from_compiled_offset()), R19_method);
|
||||||
__ mtctr(call_target_address);
|
__ mtctr(call_target_address);
|
||||||
__ bctrl();
|
__ bctrl();
|
||||||
|
|
||||||
|
__ pop_cont_fastpath();
|
||||||
|
|
||||||
// return value shuffle
|
// return value shuffle
|
||||||
if (!needs_return_buffer) {
|
if (!needs_return_buffer) {
|
||||||
// CallArranger can pick a return type that goes in the same reg for both CCs.
|
// CallArranger can pick a return type that goes in the same reg for both CCs.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
||||||
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
|
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
@@ -1020,7 +1020,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
|||||||
len,
|
len,
|
||||||
tmp1,
|
tmp1,
|
||||||
tmp2,
|
tmp2,
|
||||||
arrayOopDesc::header_size(op->type()),
|
arrayOopDesc::base_offset_in_bytes(op->type()),
|
||||||
array_element_size(op->type()),
|
array_element_size(op->type()),
|
||||||
op->klass()->as_register(),
|
op->klass()->as_register(),
|
||||||
*op->stub()->entry());
|
*op->stub()->entry());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||||
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
|
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
@@ -280,7 +280,7 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
|
|||||||
verify_oop(obj);
|
verify_oop(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register tmp1, Register tmp2, int header_size, int f, Register klass, Label& slow_case) {
|
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register tmp1, Register tmp2, int base_offset_in_bytes, int f, Register klass, Label& slow_case) {
|
||||||
assert_different_registers(obj, len, tmp1, tmp2, klass);
|
assert_different_registers(obj, len, tmp1, tmp2, klass);
|
||||||
|
|
||||||
// determine alignment mask
|
// determine alignment mask
|
||||||
@@ -292,7 +292,7 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register tmp1
|
|||||||
|
|
||||||
const Register arr_size = tmp2; // okay to be the same
|
const Register arr_size = tmp2; // okay to be the same
|
||||||
// align object end
|
// align object end
|
||||||
mv(arr_size, (int32_t)header_size * BytesPerWord + MinObjAlignmentInBytesMask);
|
mv(arr_size, (int32_t)base_offset_in_bytes + MinObjAlignmentInBytesMask);
|
||||||
shadd(arr_size, len, arr_size, t0, f);
|
shadd(arr_size, len, arr_size, t0, f);
|
||||||
andi(arr_size, arr_size, ~(uint)MinObjAlignmentInBytesMask);
|
andi(arr_size, arr_size, ~(uint)MinObjAlignmentInBytesMask);
|
||||||
|
|
||||||
@@ -300,9 +300,20 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register tmp1
|
|||||||
|
|
||||||
initialize_header(obj, klass, len, tmp1, tmp2);
|
initialize_header(obj, klass, len, tmp1, tmp2);
|
||||||
|
|
||||||
|
// Clear leading 4 bytes, if necessary.
|
||||||
|
// TODO: This could perhaps go into initialize_body() and also clear the leading 4 bytes
|
||||||
|
// for non-array objects, thereby replacing the klass-gap clearing code in initialize_header().
|
||||||
|
int base_offset = base_offset_in_bytes;
|
||||||
|
if (!is_aligned(base_offset, BytesPerWord)) {
|
||||||
|
assert(is_aligned(base_offset, BytesPerInt), "must be 4-byte aligned");
|
||||||
|
sw(zr, Address(obj, base_offset));
|
||||||
|
base_offset += BytesPerInt;
|
||||||
|
}
|
||||||
|
assert(is_aligned(base_offset, BytesPerWord), "must be word-aligned");
|
||||||
|
|
||||||
// clear rest of allocated space
|
// clear rest of allocated space
|
||||||
const Register len_zero = len;
|
const Register len_zero = len;
|
||||||
initialize_body(obj, arr_size, header_size * BytesPerWord, len_zero);
|
initialize_body(obj, arr_size, base_offset, len_zero);
|
||||||
|
|
||||||
membar(MacroAssembler::StoreStore);
|
membar(MacroAssembler::StoreStore);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
||||||
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
|
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
@@ -101,7 +101,7 @@ using MacroAssembler::null_check;
|
|||||||
// header_size: size of object header in words
|
// header_size: size of object header in words
|
||||||
// f : element scale factor
|
// f : element scale factor
|
||||||
// slow_case : exit to slow case implementation if fast allocation fails
|
// slow_case : exit to slow case implementation if fast allocation fails
|
||||||
void allocate_array(Register obj, Register len, Register tmp1, Register tmp2, int header_size, int f, Register klass, Label& slow_case);
|
void allocate_array(Register obj, Register len, Register tmp1, Register tmp2, int base_offset_in_bytes, int f, Register klass, Label& slow_case);
|
||||||
|
|
||||||
int rsp_offset() const { return _rsp_offset; }
|
int rsp_offset() const { return _rsp_offset; }
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
||||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||||
#include "gc/g1/g1CardTable.hpp"
|
#include "gc/g1/g1CardTable.hpp"
|
||||||
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
|
||||||
#include "gc/shared/collectedHeap.hpp"
|
#include "gc/shared/collectedHeap.hpp"
|
||||||
#include "interpreter/interp_masm.hpp"
|
#include "interpreter/interp_masm.hpp"
|
||||||
#include "runtime/javaThread.hpp"
|
#include "runtime/javaThread.hpp"
|
||||||
|
|||||||
@@ -4809,6 +4809,348 @@ class StubGenerator: public StubCodeGenerator {
|
|||||||
return (address) start;
|
return (address) start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------ SHA-1 intrinsic ------------------------
|
||||||
|
|
||||||
|
// K't =
|
||||||
|
// 5a827999, 0 <= t <= 19
|
||||||
|
// 6ed9eba1, 20 <= t <= 39
|
||||||
|
// 8f1bbcdc, 40 <= t <= 59
|
||||||
|
// ca62c1d6, 60 <= t <= 79
|
||||||
|
void sha1_prepare_k(Register cur_k, int round) {
|
||||||
|
assert(round >= 0 && round < 80, "must be");
|
||||||
|
|
||||||
|
static const int64_t ks[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
|
||||||
|
if ((round % 20) == 0) {
|
||||||
|
__ mv(cur_k, ks[round/20]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// W't =
|
||||||
|
// M't, 0 <= t <= 15
|
||||||
|
// ROTL'1(W't-3 ^ W't-8 ^ W't-14 ^ W't-16), 16 <= t <= 79
|
||||||
|
void sha1_prepare_w(Register cur_w, Register ws[], Register buf, int round) {
|
||||||
|
assert(round >= 0 && round < 80, "must be");
|
||||||
|
|
||||||
|
if (round < 16) {
|
||||||
|
// in the first 16 rounds, in ws[], every register contains 2 W't, e.g.
|
||||||
|
// in ws[0], high part contains W't-0, low part contains W't-1,
|
||||||
|
// in ws[1], high part contains W't-2, low part contains W't-3,
|
||||||
|
// ...
|
||||||
|
// in ws[7], high part contains W't-14, low part contains W't-15.
|
||||||
|
|
||||||
|
if ((round % 2) == 0) {
|
||||||
|
__ ld(ws[round/2], Address(buf, (round/2) * 8));
|
||||||
|
// reverse bytes, as SHA-1 is defined in big-endian.
|
||||||
|
__ revb(ws[round/2], ws[round/2]);
|
||||||
|
__ srli(cur_w, ws[round/2], 32);
|
||||||
|
} else {
|
||||||
|
__ mv(cur_w, ws[round/2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((round % 2) == 0) {
|
||||||
|
int idx = 16;
|
||||||
|
// W't = ROTL'1(W't-3 ^ W't-8 ^ W't-14 ^ W't-16), 16 <= t <= 79
|
||||||
|
__ srli(t1, ws[(idx-8)/2], 32);
|
||||||
|
__ xorr(t0, ws[(idx-3)/2], t1);
|
||||||
|
|
||||||
|
__ srli(t1, ws[(idx-14)/2], 32);
|
||||||
|
__ srli(cur_w, ws[(idx-16)/2], 32);
|
||||||
|
__ xorr(cur_w, cur_w, t1);
|
||||||
|
|
||||||
|
__ xorr(cur_w, cur_w, t0);
|
||||||
|
__ rolw_imm(cur_w, cur_w, 1, t0);
|
||||||
|
|
||||||
|
// copy the cur_w value to ws[8].
|
||||||
|
// now, valid w't values are at:
|
||||||
|
// w0: ws[0]'s lower 32 bits
|
||||||
|
// w1 ~ w14: ws[1] ~ ws[7]
|
||||||
|
// w15: ws[8]'s higher 32 bits
|
||||||
|
__ slli(ws[idx/2], cur_w, 32);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int idx = 17;
|
||||||
|
// W't = ROTL'1(W't-3 ^ W't-8 ^ W't-14 ^ W't-16), 16 <= t <= 79
|
||||||
|
__ srli(t1, ws[(idx-3)/2], 32);
|
||||||
|
__ xorr(t0, t1, ws[(idx-8)/2]);
|
||||||
|
|
||||||
|
__ xorr(cur_w, ws[(idx-16)/2], ws[(idx-14)/2]);
|
||||||
|
|
||||||
|
__ xorr(cur_w, cur_w, t0);
|
||||||
|
__ rolw_imm(cur_w, cur_w, 1, t0);
|
||||||
|
|
||||||
|
// copy the cur_w value to ws[8]
|
||||||
|
__ zero_extend(cur_w, cur_w, 32);
|
||||||
|
__ orr(ws[idx/2], ws[idx/2], cur_w);
|
||||||
|
|
||||||
|
// shift the w't registers, so they start from ws[0] again.
|
||||||
|
// now, valid w't values are at:
|
||||||
|
// w0 ~ w15: ws[0] ~ ws[7]
|
||||||
|
Register ws_0 = ws[0];
|
||||||
|
for (int i = 0; i < 16/2; i++) {
|
||||||
|
ws[i] = ws[i+1];
|
||||||
|
}
|
||||||
|
ws[8] = ws_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// f't(x, y, z) =
|
||||||
|
// Ch(x, y, z) = (x & y) ^ (~x & z) , 0 <= t <= 19
|
||||||
|
// Parity(x, y, z) = x ^ y ^ z , 20 <= t <= 39
|
||||||
|
// Maj(x, y, z) = (x & y) ^ (x & z) ^ (y & z) , 40 <= t <= 59
|
||||||
|
// Parity(x, y, z) = x ^ y ^ z , 60 <= t <= 79
|
||||||
|
void sha1_f(Register dst, Register x, Register y, Register z, int round) {
|
||||||
|
assert(round >= 0 && round < 80, "must be");
|
||||||
|
assert_different_registers(dst, x, y, z, t0, t1);
|
||||||
|
|
||||||
|
if (round < 20) {
|
||||||
|
// (x & y) ^ (~x & z)
|
||||||
|
__ andr(t0, x, y);
|
||||||
|
__ andn(dst, z, x);
|
||||||
|
__ xorr(dst, dst, t0);
|
||||||
|
} else if (round >= 40 && round < 60) {
|
||||||
|
// (x & y) ^ (x & z) ^ (y & z)
|
||||||
|
__ andr(t0, x, y);
|
||||||
|
__ andr(t1, x, z);
|
||||||
|
__ andr(dst, y, z);
|
||||||
|
__ xorr(dst, dst, t0);
|
||||||
|
__ xorr(dst, dst, t1);
|
||||||
|
} else {
|
||||||
|
// x ^ y ^ z
|
||||||
|
__ xorr(dst, x, y);
|
||||||
|
__ xorr(dst, dst, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// T = ROTL'5(a) + f't(b, c, d) + e + K't + W't
|
||||||
|
// e = d
|
||||||
|
// d = c
|
||||||
|
// c = ROTL'30(b)
|
||||||
|
// b = a
|
||||||
|
// a = T
|
||||||
|
void sha1_process_round(Register a, Register b, Register c, Register d, Register e,
|
||||||
|
Register cur_k, Register cur_w, Register tmp, int round) {
|
||||||
|
assert(round >= 0 && round < 80, "must be");
|
||||||
|
assert_different_registers(a, b, c, d, e, cur_w, cur_k, tmp, t0);
|
||||||
|
|
||||||
|
// T = ROTL'5(a) + f't(b, c, d) + e + K't + W't
|
||||||
|
|
||||||
|
// cur_w will be recalculated at the beginning of each round,
|
||||||
|
// so, we can reuse it as a temp register here.
|
||||||
|
Register tmp2 = cur_w;
|
||||||
|
|
||||||
|
// reuse e as a temporary register, as we will mv new value into it later
|
||||||
|
Register tmp3 = e;
|
||||||
|
__ add(tmp2, cur_k, tmp2);
|
||||||
|
__ add(tmp3, tmp3, tmp2);
|
||||||
|
__ rolw_imm(tmp2, a, 5, t0);
|
||||||
|
|
||||||
|
sha1_f(tmp, b, c, d, round);
|
||||||
|
|
||||||
|
__ add(tmp2, tmp2, tmp);
|
||||||
|
__ add(tmp2, tmp2, tmp3);
|
||||||
|
|
||||||
|
// e = d
|
||||||
|
// d = c
|
||||||
|
// c = ROTL'30(b)
|
||||||
|
// b = a
|
||||||
|
// a = T
|
||||||
|
__ mv(e, d);
|
||||||
|
__ mv(d, c);
|
||||||
|
|
||||||
|
__ rolw_imm(c, b, 30);
|
||||||
|
__ mv(b, a);
|
||||||
|
__ mv(a, tmp2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// H(i)0 = a + H(i-1)0
|
||||||
|
// H(i)1 = b + H(i-1)1
|
||||||
|
// H(i)2 = c + H(i-1)2
|
||||||
|
// H(i)3 = d + H(i-1)3
|
||||||
|
// H(i)4 = e + H(i-1)4
|
||||||
|
void sha1_calculate_im_hash(Register a, Register b, Register c, Register d, Register e,
|
||||||
|
Register prev_ab, Register prev_cd, Register prev_e) {
|
||||||
|
assert_different_registers(a, b, c, d, e, prev_ab, prev_cd, prev_e);
|
||||||
|
|
||||||
|
__ add(a, a, prev_ab);
|
||||||
|
__ srli(prev_ab, prev_ab, 32);
|
||||||
|
__ add(b, b, prev_ab);
|
||||||
|
|
||||||
|
__ add(c, c, prev_cd);
|
||||||
|
__ srli(prev_cd, prev_cd, 32);
|
||||||
|
__ add(d, d, prev_cd);
|
||||||
|
|
||||||
|
__ add(e, e, prev_e);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sha1_preserve_prev_abcde(Register a, Register b, Register c, Register d, Register e,
|
||||||
|
Register prev_ab, Register prev_cd, Register prev_e) {
|
||||||
|
assert_different_registers(a, b, c, d, e, prev_ab, prev_cd, prev_e, t0);
|
||||||
|
|
||||||
|
__ slli(t0, b, 32);
|
||||||
|
__ zero_extend(prev_ab, a, 32);
|
||||||
|
__ orr(prev_ab, prev_ab, t0);
|
||||||
|
|
||||||
|
__ slli(t0, d, 32);
|
||||||
|
__ zero_extend(prev_cd, c, 32);
|
||||||
|
__ orr(prev_cd, prev_cd, t0);
|
||||||
|
|
||||||
|
__ mv(prev_e, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Intrinsic for:
|
||||||
|
// void sun.security.provider.SHA.implCompress0(byte[] buf, int ofs)
|
||||||
|
// void sun.security.provider.DigestBase.implCompressMultiBlock0(byte[] b, int ofs, int limit)
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
//
|
||||||
|
// Inputs:
|
||||||
|
// c_rarg0: byte[] src array + offset
|
||||||
|
// c_rarg1: int[] SHA.state
|
||||||
|
// - - - - - - below are only for implCompressMultiBlock0 - - - - - -
|
||||||
|
// c_rarg2: int offset
|
||||||
|
// c_rarg3: int limit
|
||||||
|
//
|
||||||
|
// Outputs:
|
||||||
|
// - - - - - - below are only for implCompressMultiBlock0 - - - - - -
|
||||||
|
// c_rarg0: int offset, when (multi_block == true)
|
||||||
|
//
|
||||||
|
address generate_sha1_implCompress(bool multi_block, const char *name) {
|
||||||
|
__ align(CodeEntryAlignment);
|
||||||
|
StubCodeMark mark(this, "StubRoutines", name);
|
||||||
|
|
||||||
|
address start = __ pc();
|
||||||
|
__ enter();
|
||||||
|
|
||||||
|
RegSet saved_regs = RegSet::range(x18, x27);
|
||||||
|
if (multi_block) {
|
||||||
|
// use x9 as src below.
|
||||||
|
saved_regs += RegSet::of(x9);
|
||||||
|
}
|
||||||
|
__ push_reg(saved_regs, sp);
|
||||||
|
|
||||||
|
// c_rarg0 - c_rarg3: x10 - x13
|
||||||
|
Register buf = c_rarg0;
|
||||||
|
Register state = c_rarg1;
|
||||||
|
Register offset = c_rarg2;
|
||||||
|
Register limit = c_rarg3;
|
||||||
|
// use src to contain the original start point of the array.
|
||||||
|
Register src = x9;
|
||||||
|
|
||||||
|
if (multi_block) {
|
||||||
|
__ sub(limit, limit, offset);
|
||||||
|
__ add(limit, limit, buf);
|
||||||
|
__ sub(src, buf, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
// [args-reg]: x14 - x17
|
||||||
|
// [temp-reg]: x28 - x31
|
||||||
|
// [saved-reg]: x18 - x27
|
||||||
|
|
||||||
|
// h0/1/2/3/4
|
||||||
|
const Register a = x14, b = x15, c = x16, d = x17, e = x28;
|
||||||
|
// w0, w1, ... w15
|
||||||
|
// put two adjecent w's in one register:
|
||||||
|
// one at high word part, another at low word part
|
||||||
|
// at different round (even or odd), w't value reside in different items in ws[].
|
||||||
|
// w0 ~ w15, either reside in
|
||||||
|
// ws[0] ~ ws[7], where
|
||||||
|
// w0 at higher 32 bits of ws[0],
|
||||||
|
// w1 at lower 32 bits of ws[0],
|
||||||
|
// ...
|
||||||
|
// w14 at higher 32 bits of ws[7],
|
||||||
|
// w15 at lower 32 bits of ws[7].
|
||||||
|
// or, reside in
|
||||||
|
// w0: ws[0]'s lower 32 bits
|
||||||
|
// w1 ~ w14: ws[1] ~ ws[7]
|
||||||
|
// w15: ws[8]'s higher 32 bits
|
||||||
|
Register ws[9] = {x29, x30, x31, x18,
|
||||||
|
x19, x20, x21, x22,
|
||||||
|
x23}; // auxiliary register for calculating w's value
|
||||||
|
// current k't's value
|
||||||
|
const Register cur_k = x24;
|
||||||
|
// current w't's value
|
||||||
|
const Register cur_w = x25;
|
||||||
|
// values of a, b, c, d, e in the previous round
|
||||||
|
const Register prev_ab = x26, prev_cd = x27;
|
||||||
|
const Register prev_e = offset; // reuse offset/c_rarg2
|
||||||
|
|
||||||
|
// load 5 words state into a, b, c, d, e.
|
||||||
|
//
|
||||||
|
// To minimize the number of memory operations, we apply following
|
||||||
|
// optimization: read the states (a/b/c/d) of 4-byte values in pairs,
|
||||||
|
// with a single ld, and split them into 2 registers.
|
||||||
|
//
|
||||||
|
// And, as the core algorithm of SHA-1 works on 32-bits words, so
|
||||||
|
// in the following code, it does not care about the content of
|
||||||
|
// higher 32-bits in a/b/c/d/e. Based on this observation,
|
||||||
|
// we can apply further optimization, which is to just ignore the
|
||||||
|
// higher 32-bits in a/c/e, rather than set the higher
|
||||||
|
// 32-bits of a/c/e to zero explicitly with extra instructions.
|
||||||
|
__ ld(a, Address(state, 0));
|
||||||
|
__ srli(b, a, 32);
|
||||||
|
__ ld(c, Address(state, 8));
|
||||||
|
__ srli(d, c, 32);
|
||||||
|
__ lw(e, Address(state, 16));
|
||||||
|
|
||||||
|
Label L_sha1_loop;
|
||||||
|
if (multi_block) {
|
||||||
|
__ BIND(L_sha1_loop);
|
||||||
|
}
|
||||||
|
|
||||||
|
sha1_preserve_prev_abcde(a, b, c, d, e, prev_ab, prev_cd, prev_e);
|
||||||
|
|
||||||
|
for (int round = 0; round < 80; round++) {
|
||||||
|
// prepare K't value
|
||||||
|
sha1_prepare_k(cur_k, round);
|
||||||
|
|
||||||
|
// prepare W't value
|
||||||
|
sha1_prepare_w(cur_w, ws, buf, round);
|
||||||
|
|
||||||
|
// one round process
|
||||||
|
sha1_process_round(a, b, c, d, e, cur_k, cur_w, t2, round);
|
||||||
|
}
|
||||||
|
|
||||||
|
// compute the intermediate hash value
|
||||||
|
sha1_calculate_im_hash(a, b, c, d, e, prev_ab, prev_cd, prev_e);
|
||||||
|
|
||||||
|
if (multi_block) {
|
||||||
|
int64_t block_bytes = 16 * 4;
|
||||||
|
__ addi(buf, buf, block_bytes);
|
||||||
|
|
||||||
|
__ bge(limit, buf, L_sha1_loop, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// store back the state.
|
||||||
|
__ zero_extend(a, a, 32);
|
||||||
|
__ slli(b, b, 32);
|
||||||
|
__ orr(a, a, b);
|
||||||
|
__ sd(a, Address(state, 0));
|
||||||
|
__ zero_extend(c, c, 32);
|
||||||
|
__ slli(d, d, 32);
|
||||||
|
__ orr(c, c, d);
|
||||||
|
__ sd(c, Address(state, 8));
|
||||||
|
__ sw(e, Address(state, 16));
|
||||||
|
|
||||||
|
// return offset
|
||||||
|
if (multi_block) {
|
||||||
|
__ sub(c_rarg0, buf, src);
|
||||||
|
}
|
||||||
|
|
||||||
|
__ pop_reg(saved_regs, sp);
|
||||||
|
|
||||||
|
__ leave();
|
||||||
|
__ ret();
|
||||||
|
|
||||||
|
return (address) start;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef COMPILER2
|
#ifdef COMPILER2
|
||||||
|
|
||||||
static const int64_t right_2_bits = right_n_bits(2);
|
static const int64_t right_2_bits = right_n_bits(2);
|
||||||
@@ -5273,6 +5615,11 @@ static const int64_t right_3_bits = right_n_bits(3);
|
|||||||
StubRoutines::_chacha20Block = generate_chacha20Block();
|
StubRoutines::_chacha20Block = generate_chacha20Block();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (UseSHA1Intrinsics) {
|
||||||
|
StubRoutines::_sha1_implCompress = generate_sha1_implCompress(false, "sha1_implCompress");
|
||||||
|
StubRoutines::_sha1_implCompressMB = generate_sha1_implCompress(true, "sha1_implCompressMB");
|
||||||
|
}
|
||||||
|
|
||||||
#endif // COMPILER2_OR_JVMCI
|
#endif // COMPILER2_OR_JVMCI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ enum platform_dependent_constants {
|
|||||||
// simply increase sizes if too small (assembler will crash if too small)
|
// simply increase sizes if too small (assembler will crash if too small)
|
||||||
_initial_stubs_code_size = 10000,
|
_initial_stubs_code_size = 10000,
|
||||||
_continuation_stubs_code_size = 2000,
|
_continuation_stubs_code_size = 2000,
|
||||||
_compiler_stubs_code_size = 15000 ZGC_ONLY(+5000),
|
_compiler_stubs_code_size = 25000 ZGC_ONLY(+5000),
|
||||||
_final_stubs_code_size = 20000 ZGC_ONLY(+10000)
|
_final_stubs_code_size = 20000 ZGC_ONLY(+10000)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -267,9 +267,13 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Method* entry,
|
|||||||
__ mov_metadata(xmethod, entry);
|
__ mov_metadata(xmethod, entry);
|
||||||
__ sd(xmethod, Address(xthread, JavaThread::callee_target_offset())); // just in case callee is deoptimized
|
__ sd(xmethod, Address(xthread, JavaThread::callee_target_offset())); // just in case callee is deoptimized
|
||||||
|
|
||||||
|
__ push_cont_fastpath(xthread);
|
||||||
|
|
||||||
__ ld(t0, Address(xmethod, Method::from_compiled_offset()));
|
__ ld(t0, Address(xmethod, Method::from_compiled_offset()));
|
||||||
__ jalr(t0);
|
__ jalr(t0);
|
||||||
|
|
||||||
|
__ pop_cont_fastpath(xthread);
|
||||||
|
|
||||||
// return value shuffle
|
// return value shuffle
|
||||||
if (!needs_return_buffer) {
|
if (!needs_return_buffer) {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
|
|||||||
@@ -149,16 +149,6 @@ void VM_Version::initialize() {
|
|||||||
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
|
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UseSHA1Intrinsics) {
|
|
||||||
warning("Intrinsics for SHA-1 crypto hash functions not available on this CPU.");
|
|
||||||
FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UseSHA3Intrinsics) {
|
|
||||||
warning("Intrinsics for SHA3-224, SHA3-256, SHA3-384 and SHA3-512 crypto hash functions not available on this CPU.");
|
|
||||||
FLAG_SET_DEFAULT(UseSHA3Intrinsics, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UseCRC32Intrinsics) {
|
if (UseCRC32Intrinsics) {
|
||||||
warning("CRC32 intrinsics are not available on this CPU.");
|
warning("CRC32 intrinsics are not available on this CPU.");
|
||||||
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
|
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
|
||||||
@@ -260,11 +250,8 @@ void VM_Version::initialize() {
|
|||||||
// NOTE: Make sure codes dependent on UseRVV are put after c2_initialize(),
|
// NOTE: Make sure codes dependent on UseRVV are put after c2_initialize(),
|
||||||
// as there are extra checks inside it which could disable UseRVV
|
// as there are extra checks inside it which could disable UseRVV
|
||||||
// in some situations.
|
// in some situations.
|
||||||
if (UseZvkn && !UseRVV) {
|
|
||||||
FLAG_SET_DEFAULT(UseZvkn, false);
|
|
||||||
warning("Cannot enable Zvkn on cpu without RVV support.");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// ChaCha20
|
||||||
if (UseRVV) {
|
if (UseRVV) {
|
||||||
if (FLAG_IS_DEFAULT(UseChaCha20Intrinsics)) {
|
if (FLAG_IS_DEFAULT(UseChaCha20Intrinsics)) {
|
||||||
FLAG_SET_DEFAULT(UseChaCha20Intrinsics, true);
|
FLAG_SET_DEFAULT(UseChaCha20Intrinsics, true);
|
||||||
@@ -276,29 +263,65 @@ void VM_Version::initialize() {
|
|||||||
FLAG_SET_DEFAULT(UseChaCha20Intrinsics, false);
|
FLAG_SET_DEFAULT(UseChaCha20Intrinsics, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UseZvkn && UseSHA) {
|
// SHA's
|
||||||
warning("SHA instructions are not available on this CPU");
|
if (FLAG_IS_DEFAULT(UseSHA)) {
|
||||||
FLAG_SET_DEFAULT(UseSHA, false);
|
|
||||||
} else if (UseZvkn && FLAG_IS_DEFAULT(UseSHA)) {
|
|
||||||
FLAG_SET_DEFAULT(UseSHA, true);
|
FLAG_SET_DEFAULT(UseSHA, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UseSHA) {
|
// SHA-1, no RVV required though.
|
||||||
|
if (UseSHA) {
|
||||||
|
if (FLAG_IS_DEFAULT(UseSHA1Intrinsics)) {
|
||||||
|
FLAG_SET_DEFAULT(UseSHA1Intrinsics, true);
|
||||||
|
}
|
||||||
|
} else if (UseSHA1Intrinsics) {
|
||||||
|
warning("Intrinsics for SHA-1 crypto hash functions not available on this CPU.");
|
||||||
|
FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// UseZvkn (depends on RVV) and SHA-2.
|
||||||
|
if (UseZvkn && !UseRVV) {
|
||||||
|
FLAG_SET_DEFAULT(UseZvkn, false);
|
||||||
|
warning("Cannot enable Zvkn on cpu without RVV support.");
|
||||||
|
}
|
||||||
|
// SHA-2, depends on Zvkn.
|
||||||
|
if (UseSHA) {
|
||||||
|
if (UseZvkn) {
|
||||||
|
if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
|
||||||
|
FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
|
||||||
|
}
|
||||||
|
if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
|
||||||
|
FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (UseSHA256Intrinsics) {
|
||||||
|
warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU, UseZvkn needed.");
|
||||||
|
FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
|
||||||
|
}
|
||||||
|
if (UseSHA512Intrinsics) {
|
||||||
|
warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU, UseZvkn needed.");
|
||||||
|
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (UseSHA256Intrinsics) {
|
if (UseSHA256Intrinsics) {
|
||||||
warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU, UseZvkn needed.");
|
warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU, as UseSHA disabled.");
|
||||||
FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
|
FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
|
||||||
}
|
}
|
||||||
if (UseSHA512Intrinsics) {
|
if (UseSHA512Intrinsics) {
|
||||||
warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU, UseZvkn needed.");
|
warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU, as UseSHA disabled.");
|
||||||
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
|
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
|
|
||||||
FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
|
// SHA-3
|
||||||
}
|
if (UseSHA3Intrinsics) {
|
||||||
if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
|
warning("Intrinsics for SHA3-224, SHA3-256, SHA3-384 and SHA3-512 crypto hash functions not available on this CPU.");
|
||||||
FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
|
FLAG_SET_DEFAULT(UseSHA3Intrinsics, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UseSHA
|
||||||
|
if (!(UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA3Intrinsics || UseSHA512Intrinsics)) {
|
||||||
|
FLAG_SET_DEFAULT(UseSHA, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2382,7 +2382,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
|||||||
op->len()->as_register(),
|
op->len()->as_register(),
|
||||||
op->tmp1()->as_register(),
|
op->tmp1()->as_register(),
|
||||||
op->tmp2()->as_register(),
|
op->tmp2()->as_register(),
|
||||||
arrayOopDesc::header_size(op->type()),
|
arrayOopDesc::base_offset_in_bytes(op->type()),
|
||||||
type2aelembytes(op->type()),
|
type2aelembytes(op->type()),
|
||||||
op->klass()->as_register(),
|
op->klass()->as_register(),
|
||||||
*op->stub()->entry());
|
*op->stub()->entry());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2016, 2023 SAP SE. All rights reserved.
|
* Copyright (c) 2016, 2023 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@@ -271,7 +271,7 @@ void C1_MacroAssembler::allocate_array(
|
|||||||
Register len, // array length
|
Register len, // array length
|
||||||
Register t1, // temp register
|
Register t1, // temp register
|
||||||
Register t2, // temp register
|
Register t2, // temp register
|
||||||
int hdr_size, // object header size in words
|
int base_offset_in_bytes, // elements offset in bytes
|
||||||
int elt_size, // element size in bytes
|
int elt_size, // element size in bytes
|
||||||
Register klass, // object klass
|
Register klass, // object klass
|
||||||
Label& slow_case // Continuation point if fast allocation fails.
|
Label& slow_case // Continuation point if fast allocation fails.
|
||||||
@@ -297,8 +297,8 @@ void C1_MacroAssembler::allocate_array(
|
|||||||
case 8: z_sllg(arr_size, len, 3); break;
|
case 8: z_sllg(arr_size, len, 3); break;
|
||||||
default: ShouldNotReachHere();
|
default: ShouldNotReachHere();
|
||||||
}
|
}
|
||||||
add2reg(arr_size, hdr_size * wordSize + MinObjAlignmentInBytesMask); // Add space for header & alignment.
|
add2reg(arr_size, base_offset_in_bytes + MinObjAlignmentInBytesMask); // Add space for header & alignment.
|
||||||
z_nill(arr_size, (~MinObjAlignmentInBytesMask) & 0xffff); // Align array size.
|
z_nill(arr_size, (~MinObjAlignmentInBytesMask) & 0xffff); // Align array size.
|
||||||
|
|
||||||
try_allocate(obj, arr_size, 0, t1, slow_case);
|
try_allocate(obj, arr_size, 0, t1, slow_case);
|
||||||
|
|
||||||
@@ -308,9 +308,9 @@ void C1_MacroAssembler::allocate_array(
|
|||||||
Label done;
|
Label done;
|
||||||
Register object_fields = t1;
|
Register object_fields = t1;
|
||||||
Register Rzero = Z_R1_scratch;
|
Register Rzero = Z_R1_scratch;
|
||||||
z_aghi(arr_size, -(hdr_size * BytesPerWord));
|
z_aghi(arr_size, -base_offset_in_bytes);
|
||||||
z_bre(done); // Jump if size of fields is zero.
|
z_bre(done); // Jump if size of fields is zero.
|
||||||
z_la(object_fields, hdr_size * BytesPerWord, obj);
|
z_la(object_fields, base_offset_in_bytes, obj);
|
||||||
z_xgr(Rzero, Rzero);
|
z_xgr(Rzero, Rzero);
|
||||||
initialize_body(object_fields, arr_size, Rzero);
|
initialize_body(object_fields, arr_size, Rzero);
|
||||||
bind(done);
|
bind(done);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2016, 2023 SAP SE. All rights reserved.
|
* Copyright (c) 2016, 2023 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
Register len, // array length
|
Register len, // array length
|
||||||
Register t1, // temp register
|
Register t1, // temp register
|
||||||
Register t2, // temp register
|
Register t2, // temp register
|
||||||
int hdr_size, // object header size in words
|
int base_offset_in_bytes, // elements offset in bytes
|
||||||
int elt_size, // element size in bytes
|
int elt_size, // element size in bytes
|
||||||
Register klass, // object klass
|
Register klass, // object klass
|
||||||
Label& slow_case // Continuation point if fast allocation fails.
|
Label& slow_case // Continuation point if fast allocation fails.
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
||||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||||
#include "gc/g1/g1DirtyCardQueue.hpp"
|
#include "gc/g1/g1DirtyCardQueue.hpp"
|
||||||
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#include "gc/g1/g1SATBMarkQueueSet.hpp"
|
#include "gc/g1/g1SATBMarkQueueSet.hpp"
|
||||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
|
||||||
#include "interpreter/interp_masm.hpp"
|
#include "interpreter/interp_masm.hpp"
|
||||||
#include "runtime/jniHandles.hpp"
|
#include "runtime/jniHandles.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -1618,7 +1618,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
|||||||
len,
|
len,
|
||||||
tmp1,
|
tmp1,
|
||||||
tmp2,
|
tmp2,
|
||||||
arrayOopDesc::header_size(op->type()),
|
arrayOopDesc::base_offset_in_bytes(op->type()),
|
||||||
array_element_size(op->type()),
|
array_element_size(op->type()),
|
||||||
op->klass()->as_register(),
|
op->klass()->as_register(),
|
||||||
*op->stub()->entry());
|
*op->stub()->entry());
|
||||||
|
|||||||
@@ -186,6 +186,15 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
|
|||||||
|
|
||||||
if (len->is_valid()) {
|
if (len->is_valid()) {
|
||||||
movl(Address(obj, arrayOopDesc::length_offset_in_bytes()), len);
|
movl(Address(obj, arrayOopDesc::length_offset_in_bytes()), len);
|
||||||
|
#ifdef _LP64
|
||||||
|
int base_offset = arrayOopDesc::length_offset_in_bytes() + BytesPerInt;
|
||||||
|
if (!is_aligned(base_offset, BytesPerWord)) {
|
||||||
|
assert(is_aligned(base_offset, BytesPerInt), "must be 4-byte aligned");
|
||||||
|
// Clear gap/first 4 bytes following the length field.
|
||||||
|
xorl(t1, t1);
|
||||||
|
movl(Address(obj, base_offset), t1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef _LP64
|
#ifdef _LP64
|
||||||
else if (UseCompressedClassPointers) {
|
else if (UseCompressedClassPointers) {
|
||||||
@@ -269,7 +278,7 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
|
|||||||
verify_oop(obj);
|
verify_oop(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int header_size, Address::ScaleFactor f, Register klass, Label& slow_case) {
|
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int base_offset_in_bytes, Address::ScaleFactor f, Register klass, Label& slow_case) {
|
||||||
assert(obj == rax, "obj must be in rax, for cmpxchg");
|
assert(obj == rax, "obj must be in rax, for cmpxchg");
|
||||||
assert_different_registers(obj, len, t1, t2, klass);
|
assert_different_registers(obj, len, t1, t2, klass);
|
||||||
|
|
||||||
@@ -282,7 +291,7 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
|||||||
|
|
||||||
const Register arr_size = t2; // okay to be the same
|
const Register arr_size = t2; // okay to be the same
|
||||||
// align object end
|
// align object end
|
||||||
movptr(arr_size, header_size * BytesPerWord + MinObjAlignmentInBytesMask);
|
movptr(arr_size, base_offset_in_bytes + MinObjAlignmentInBytesMask);
|
||||||
lea(arr_size, Address(arr_size, len, f));
|
lea(arr_size, Address(arr_size, len, f));
|
||||||
andptr(arr_size, ~MinObjAlignmentInBytesMask);
|
andptr(arr_size, ~MinObjAlignmentInBytesMask);
|
||||||
|
|
||||||
@@ -292,7 +301,10 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
|||||||
|
|
||||||
// clear rest of allocated space
|
// clear rest of allocated space
|
||||||
const Register len_zero = len;
|
const Register len_zero = len;
|
||||||
initialize_body(obj, arr_size, header_size * BytesPerWord, len_zero);
|
// Align-up to word boundary, because we clear the 4 bytes potentially
|
||||||
|
// following the length field in initialize_header().
|
||||||
|
int base_offset = align_up(base_offset_in_bytes, BytesPerWord);
|
||||||
|
initialize_body(obj, arr_size, base_offset, len_zero);
|
||||||
|
|
||||||
if (CURRENT_ENV->dtrace_alloc_probes()) {
|
if (CURRENT_ENV->dtrace_alloc_probes()) {
|
||||||
assert(obj == rax, "must be");
|
assert(obj == rax, "must be");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
// header_size: size of object header in words
|
// header_size: size of object header in words
|
||||||
// f : element scale factor
|
// f : element scale factor
|
||||||
// slow_case : exit to slow case implementation if fast allocation fails
|
// slow_case : exit to slow case implementation if fast allocation fails
|
||||||
void allocate_array(Register obj, Register len, Register t, Register t2, int header_size, Address::ScaleFactor f, Register klass, Label& slow_case);
|
void allocate_array(Register obj, Register len, Register t, Register t2, int base_offset_in_bytes, Address::ScaleFactor f, Register klass, Label& slow_case);
|
||||||
|
|
||||||
int rsp_offset() const { return _rsp_offset; }
|
int rsp_offset() const { return _rsp_offset; }
|
||||||
void set_rsp_offset(int n) { _rsp_offset = n; }
|
void set_rsp_offset(int n) { _rsp_offset = n; }
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
||||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||||
#include "gc/g1/g1CardTable.hpp"
|
#include "gc/g1/g1CardTable.hpp"
|
||||||
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
|
||||||
#include "interpreter/interp_masm.hpp"
|
#include "interpreter/interp_masm.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
|
|||||||
@@ -300,8 +300,12 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Method* entry,
|
|||||||
__ mov_metadata(rbx, entry);
|
__ mov_metadata(rbx, entry);
|
||||||
__ movptr(Address(r15_thread, JavaThread::callee_target_offset()), rbx); // just in case callee is deoptimized
|
__ movptr(Address(r15_thread, JavaThread::callee_target_offset()), rbx); // just in case callee is deoptimized
|
||||||
|
|
||||||
|
__ push_cont_fastpath();
|
||||||
|
|
||||||
__ call(Address(rbx, Method::from_compiled_offset()));
|
__ call(Address(rbx, Method::from_compiled_offset()));
|
||||||
|
|
||||||
|
__ pop_cont_fastpath();
|
||||||
|
|
||||||
// return value shuffle
|
// return value shuffle
|
||||||
if (!needs_return_buffer) {
|
if (!needs_return_buffer) {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
|
|||||||
@@ -4459,7 +4459,7 @@ instruct loadD(regD dst, memory mem)
|
|||||||
|
|
||||||
// max = java.lang.Math.max(float a, float b)
|
// max = java.lang.Math.max(float a, float b)
|
||||||
instruct maxF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
|
instruct maxF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
|
||||||
predicate(UseAVX > 0 && !SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && !VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MaxF a b));
|
match(Set dst (MaxF a b));
|
||||||
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
||||||
format %{ "maxF $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
format %{ "maxF $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
||||||
@@ -4470,7 +4470,7 @@ instruct maxF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp,
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
instruct maxF_reduction_reg(legRegF dst, legRegF a, legRegF b, legRegF xmmt, rRegI tmp, rFlagsReg cr) %{
|
instruct maxF_reduction_reg(legRegF dst, legRegF a, legRegF b, legRegF xmmt, rRegI tmp, rFlagsReg cr) %{
|
||||||
predicate(UseAVX > 0 && SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MaxF a b));
|
match(Set dst (MaxF a b));
|
||||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||||
|
|
||||||
@@ -4484,7 +4484,7 @@ instruct maxF_reduction_reg(legRegF dst, legRegF a, legRegF b, legRegF xmmt, rRe
|
|||||||
|
|
||||||
// max = java.lang.Math.max(double a, double b)
|
// max = java.lang.Math.max(double a, double b)
|
||||||
instruct maxD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
|
instruct maxD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
|
||||||
predicate(UseAVX > 0 && !SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && !VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MaxD a b));
|
match(Set dst (MaxD a b));
|
||||||
effect(USE a, USE b, TEMP atmp, TEMP btmp, TEMP tmp);
|
effect(USE a, USE b, TEMP atmp, TEMP btmp, TEMP tmp);
|
||||||
format %{ "maxD $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
format %{ "maxD $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
||||||
@@ -4495,7 +4495,7 @@ instruct maxD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp,
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
instruct maxD_reduction_reg(legRegD dst, legRegD a, legRegD b, legRegD xmmt, rRegL tmp, rFlagsReg cr) %{
|
instruct maxD_reduction_reg(legRegD dst, legRegD a, legRegD b, legRegD xmmt, rRegL tmp, rFlagsReg cr) %{
|
||||||
predicate(UseAVX > 0 && SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MaxD a b));
|
match(Set dst (MaxD a b));
|
||||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||||
|
|
||||||
@@ -4509,7 +4509,7 @@ instruct maxD_reduction_reg(legRegD dst, legRegD a, legRegD b, legRegD xmmt, rRe
|
|||||||
|
|
||||||
// min = java.lang.Math.min(float a, float b)
|
// min = java.lang.Math.min(float a, float b)
|
||||||
instruct minF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
|
instruct minF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
|
||||||
predicate(UseAVX > 0 && !SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && !VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MinF a b));
|
match(Set dst (MinF a b));
|
||||||
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
||||||
format %{ "minF $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
format %{ "minF $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
||||||
@@ -4520,7 +4520,7 @@ instruct minF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp,
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
instruct minF_reduction_reg(legRegF dst, legRegF a, legRegF b, legRegF xmmt, rRegI tmp, rFlagsReg cr) %{
|
instruct minF_reduction_reg(legRegF dst, legRegF a, legRegF b, legRegF xmmt, rRegI tmp, rFlagsReg cr) %{
|
||||||
predicate(UseAVX > 0 && SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MinF a b));
|
match(Set dst (MinF a b));
|
||||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||||
|
|
||||||
@@ -4534,7 +4534,7 @@ instruct minF_reduction_reg(legRegF dst, legRegF a, legRegF b, legRegF xmmt, rRe
|
|||||||
|
|
||||||
// min = java.lang.Math.min(double a, double b)
|
// min = java.lang.Math.min(double a, double b)
|
||||||
instruct minD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
|
instruct minD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
|
||||||
predicate(UseAVX > 0 && !SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && !VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MinD a b));
|
match(Set dst (MinD a b));
|
||||||
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
||||||
format %{ "minD $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
format %{ "minD $dst, $a, $b \t! using tmp, atmp and btmp as TEMP" %}
|
||||||
@@ -4545,7 +4545,7 @@ instruct minD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp,
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
instruct minD_reduction_reg(legRegD dst, legRegD a, legRegD b, legRegD xmmt, rRegL tmp, rFlagsReg cr) %{
|
instruct minD_reduction_reg(legRegD dst, legRegD a, legRegD b, legRegD xmmt, rRegL tmp, rFlagsReg cr) %{
|
||||||
predicate(UseAVX > 0 && SuperWord::is_reduction(n));
|
predicate(UseAVX > 0 && VLoopReductions::is_reduction(n));
|
||||||
match(Set dst (MinD a b));
|
match(Set dst (MinD a b));
|
||||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||||
|
|
||||||
|
|||||||
@@ -1127,10 +1127,9 @@ bool os::dll_address_to_library_name(address addr, char* buf,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
static void* dll_load_library(const char *filename, char *ebuf, int ebuflen) {
|
||||||
|
|
||||||
log_info(os)("attempting shared library load of %s", filename);
|
log_info(os)("attempting shared library load of %s", filename);
|
||||||
|
|
||||||
if (ebuf && ebuflen > 0) {
|
if (ebuf && ebuflen > 0) {
|
||||||
ebuf[0] = '\0';
|
ebuf[0] = '\0';
|
||||||
ebuf[ebuflen - 1] = '\0';
|
ebuf[ebuflen - 1] = '\0';
|
||||||
@@ -1178,6 +1177,26 @@ void *os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
|||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
// Load library named <filename>
|
||||||
|
// If filename matches <name>.so, and loading fails, repeat with <name>.a.
|
||||||
|
void *os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||||
|
void* result = nullptr;
|
||||||
|
char* const file_path = strdup(filename);
|
||||||
|
char* const pointer_to_dot = strrchr(file_path, '.');
|
||||||
|
const char old_extension[] = ".so";
|
||||||
|
const char new_extension[] = ".a";
|
||||||
|
STATIC_ASSERT(sizeof(old_extension) >= sizeof(new_extension));
|
||||||
|
// First try to load the existing file.
|
||||||
|
result = dll_load_library(filename, ebuf, ebuflen);
|
||||||
|
// If the load fails,we try to reload by changing the extension to .a for .so files only.
|
||||||
|
// Shared object in .so format dont have braces, hence they get removed for archives with members.
|
||||||
|
if (result == nullptr && pointer_to_dot != nullptr && strcmp(pointer_to_dot, old_extension) == 0) {
|
||||||
|
snprintf(pointer_to_dot, sizeof(old_extension), "%s", new_extension);
|
||||||
|
result = dll_load_library(file_path, ebuf, ebuflen);
|
||||||
|
}
|
||||||
|
FREE_C_HEAP_ARRAY(char, file_path);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
void os::print_dll_info(outputStream *st) {
|
void os::print_dll_info(outputStream *st) {
|
||||||
st->print_cr("Dynamic libraries:");
|
st->print_cr("Dynamic libraries:");
|
||||||
|
|||||||
@@ -28,6 +28,11 @@
|
|||||||
.global CFUNC(_Copy_conjoint_words)
|
.global CFUNC(_Copy_conjoint_words)
|
||||||
.global CFUNC(_Copy_disjoint_words)
|
.global CFUNC(_Copy_disjoint_words)
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
.private_extern CFUNC(_Copy_conjoint_words)
|
||||||
|
.private_extern CFUNC(_Copy_disjoint_words)
|
||||||
|
#endif
|
||||||
|
|
||||||
s .req x0
|
s .req x0
|
||||||
d .req x1
|
d .req x1
|
||||||
count .req x2
|
count .req x2
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 SAP SE. All rights reserved.
|
* Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -39,6 +39,15 @@
|
|||||||
.global SYMBOL(_SafeFetch32_fault)
|
.global SYMBOL(_SafeFetch32_fault)
|
||||||
.global SYMBOL(_SafeFetch32_continuation)
|
.global SYMBOL(_SafeFetch32_continuation)
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
.private_extern SYMBOL(SafeFetchN_impl)
|
||||||
|
.private_extern SYMBOL(_SafeFetchN_fault)
|
||||||
|
.private_extern SYMBOL(_SafeFetchN_continuation)
|
||||||
|
.private_extern SYMBOL(SafeFetch32_impl)
|
||||||
|
.private_extern SYMBOL(_SafeFetch32_fault)
|
||||||
|
.private_extern SYMBOL(_SafeFetch32_continuation)
|
||||||
|
#endif
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
#
|
#
|
||||||
# x0 : address
|
# x0 : address
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
.globl SYMBOL(fixcw)
|
.globl SYMBOL(fixcw)
|
||||||
|
.globl SYMBOL(SpinPause)
|
||||||
|
|
||||||
# NOTE WELL! The _Copy functions are called directly
|
# NOTE WELL! The _Copy functions are called directly
|
||||||
# from server-compiler-generated code via CallLeafNoFP,
|
# from server-compiler-generated code via CallLeafNoFP,
|
||||||
@@ -50,6 +51,20 @@
|
|||||||
.globl SYMBOL(_Atomic_cmpxchg_long)
|
.globl SYMBOL(_Atomic_cmpxchg_long)
|
||||||
.globl SYMBOL(_Atomic_move_long)
|
.globl SYMBOL(_Atomic_move_long)
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
.private_extern SYMBOL(fixcw)
|
||||||
|
.private_extern SYMBOL(SpinPause)
|
||||||
|
.private_extern SYMBOL(_Copy_arrayof_conjoint_bytes)
|
||||||
|
.private_extern SYMBOL(_Copy_conjoint_jshorts_atomic)
|
||||||
|
.private_extern SYMBOL(_Copy_arrayof_conjoint_jshorts)
|
||||||
|
.private_extern SYMBOL(_Copy_conjoint_jints_atomic)
|
||||||
|
.private_extern SYMBOL(_Copy_arrayof_conjoint_jints)
|
||||||
|
.private_extern SYMBOL(_Copy_conjoint_jlongs_atomic)
|
||||||
|
.private_extern SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts)
|
||||||
|
.private_extern SYMBOL(_Atomic_cmpxchg_long)
|
||||||
|
.private_extern SYMBOL(_Atomic_move_long)
|
||||||
|
#endif
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
# Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp
|
# Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp
|
||||||
@@ -62,7 +77,6 @@ SYMBOL(fixcw):
|
|||||||
popl %eax
|
popl %eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.globl SYMBOL(SpinPause)
|
|
||||||
ELF_TYPE(SpinPause,@function)
|
ELF_TYPE(SpinPause,@function)
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
SYMBOL(SpinPause):
|
SYMBOL(SpinPause):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -31,22 +31,33 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
# NOTE WELL! The _Copy functions are called directly
|
# NOTE WELL! The _Copy functions are called directly
|
||||||
# from server-compiler-generated code via CallLeafNoFP,
|
# from server-compiler-generated code via CallLeafNoFP,
|
||||||
# which means that they *must* either not use floating
|
# which means that they *must* either not use floating
|
||||||
# point or use it in the same manner as does the server
|
# point or use it in the same manner as does the server
|
||||||
# compiler.
|
# compiler.
|
||||||
|
|
||||||
|
.globl SYMBOL(SpinPause)
|
||||||
.globl SYMBOL(_Copy_arrayof_conjoint_bytes)
|
.globl SYMBOL(_Copy_arrayof_conjoint_bytes)
|
||||||
.globl SYMBOL(_Copy_arrayof_conjoint_jshorts)
|
.globl SYMBOL(_Copy_arrayof_conjoint_jshorts)
|
||||||
.globl SYMBOL(_Copy_conjoint_jshorts_atomic)
|
.globl SYMBOL(_Copy_conjoint_jshorts_atomic)
|
||||||
.globl SYMBOL(_Copy_arrayof_conjoint_jints)
|
.globl SYMBOL(_Copy_arrayof_conjoint_jints)
|
||||||
.globl SYMBOL(_Copy_conjoint_jints_atomic)
|
.globl SYMBOL(_Copy_conjoint_jints_atomic)
|
||||||
.globl SYMBOL(_Copy_arrayof_conjoint_jlongs)
|
.globl SYMBOL(_Copy_arrayof_conjoint_jlongs)
|
||||||
.globl SYMBOL(_Copy_conjoint_jlongs_atomic)
|
.globl SYMBOL(_Copy_conjoint_jlongs_atomic)
|
||||||
|
|
||||||
.text
|
#ifdef __APPLE__
|
||||||
|
.private_extern SYMBOL(SpinPause)
|
||||||
|
.private_extern SYMBOL(_Copy_arrayof_conjoint_bytes)
|
||||||
|
.private_extern SYMBOL(_Copy_arrayof_conjoint_jshorts)
|
||||||
|
.private_extern SYMBOL(_Copy_conjoint_jshorts_atomic)
|
||||||
|
.private_extern SYMBOL(_Copy_arrayof_conjoint_jints)
|
||||||
|
.private_extern SYMBOL(_Copy_conjoint_jints_atomic)
|
||||||
|
.private_extern SYMBOL(_Copy_arrayof_conjoint_jlongs)
|
||||||
|
.private_extern SYMBOL(_Copy_conjoint_jlongs_atomic)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
.globl SYMBOL(SpinPause)
|
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
ELF_TYPE(SpinPause,@function)
|
ELF_TYPE(SpinPause,@function)
|
||||||
SYMBOL(SpinPause):
|
SYMBOL(SpinPause):
|
||||||
@@ -63,7 +74,7 @@ SYMBOL(SpinPause):
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
|
ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
|
||||||
SYMBOL(_Copy_arrayof_conjoint_bytes):
|
SYMBOL(_Copy_arrayof_conjoint_bytes):
|
||||||
movq %rdx,%r8 # byte count
|
movq %rdx,%r8 # byte count
|
||||||
shrq $3,%rdx # qword count
|
shrq $3,%rdx # qword count
|
||||||
@@ -165,8 +176,8 @@ acb_CopyLeft:
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function)
|
ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function)
|
||||||
ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function)
|
ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function)
|
||||||
SYMBOL(_Copy_arrayof_conjoint_jshorts):
|
SYMBOL(_Copy_arrayof_conjoint_jshorts):
|
||||||
SYMBOL(_Copy_conjoint_jshorts_atomic):
|
SYMBOL(_Copy_conjoint_jshorts_atomic):
|
||||||
movq %rdx,%r8 # word count
|
movq %rdx,%r8 # word count
|
||||||
@@ -255,8 +266,8 @@ acs_CopyLeft:
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
ELF_TYPE(_Copy_arrayof_conjoint_jints,@function)
|
ELF_TYPE(_Copy_arrayof_conjoint_jints,@function)
|
||||||
ELF_TYPE(_Copy_conjoint_jints_atomic,@function)
|
ELF_TYPE(_Copy_conjoint_jints_atomic,@function)
|
||||||
SYMBOL(_Copy_arrayof_conjoint_jints):
|
SYMBOL(_Copy_arrayof_conjoint_jints):
|
||||||
SYMBOL(_Copy_conjoint_jints_atomic):
|
SYMBOL(_Copy_conjoint_jints_atomic):
|
||||||
movq %rdx,%r8 # dword count
|
movq %rdx,%r8 # dword count
|
||||||
@@ -334,8 +345,8 @@ aci_CopyLeft:
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
ELF_TYPE(_Copy_arrayof_conjoint_jlongs,@function)
|
ELF_TYPE(_Copy_arrayof_conjoint_jlongs,@function)
|
||||||
ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function)
|
ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function)
|
||||||
SYMBOL(_Copy_arrayof_conjoint_jlongs):
|
SYMBOL(_Copy_arrayof_conjoint_jlongs):
|
||||||
SYMBOL(_Copy_conjoint_jlongs_atomic):
|
SYMBOL(_Copy_conjoint_jlongs_atomic):
|
||||||
cmpq %rdi,%rsi
|
cmpq %rdi,%rsi
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2022 SAP SE. All rights reserved.
|
# Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -38,13 +38,22 @@
|
|||||||
.globl SYMBOL(_SafeFetch32_continuation)
|
.globl SYMBOL(_SafeFetch32_continuation)
|
||||||
.globl SYMBOL(_SafeFetchN_continuation)
|
.globl SYMBOL(_SafeFetchN_continuation)
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
.private_extern SYMBOL(SafeFetch32_impl)
|
||||||
|
.private_extern SYMBOL(SafeFetchN_impl)
|
||||||
|
.private_extern SYMBOL(_SafeFetch32_fault)
|
||||||
|
.private_extern SYMBOL(_SafeFetchN_fault)
|
||||||
|
.private_extern SYMBOL(_SafeFetch32_continuation)
|
||||||
|
.private_extern SYMBOL(_SafeFetchN_continuation)
|
||||||
|
#endif
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
#
|
#
|
||||||
# %rdi : address
|
# %rdi : address
|
||||||
# %esi : defaultval
|
# %esi : defaultval
|
||||||
ELF_TYPE(SafeFetch32_impl,@function)
|
ELF_TYPE(SafeFetch32_impl,@function)
|
||||||
SYMBOL(SafeFetch32_impl:)
|
SYMBOL(SafeFetch32_impl:)
|
||||||
SYMBOL(_SafeFetch32_fault:)
|
SYMBOL(_SafeFetch32_fault:)
|
||||||
movl (%rdi), %eax
|
movl (%rdi), %eax
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
.text
|
.text
|
||||||
|
|
||||||
.globl aarch64_atomic_fetch_add_8_default_impl
|
.globl aarch64_atomic_fetch_add_8_default_impl
|
||||||
|
.hidden aarch64_atomic_fetch_add_8_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_fetch_add_8_default_impl:
|
aarch64_atomic_fetch_add_8_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -40,6 +41,7 @@ aarch64_atomic_fetch_add_8_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_fetch_add_4_default_impl
|
.globl aarch64_atomic_fetch_add_4_default_impl
|
||||||
|
.hidden aarch64_atomic_fetch_add_4_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_fetch_add_4_default_impl:
|
aarch64_atomic_fetch_add_4_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -56,6 +58,7 @@ aarch64_atomic_fetch_add_4_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.global aarch64_atomic_fetch_add_8_relaxed_default_impl
|
.global aarch64_atomic_fetch_add_8_relaxed_default_impl
|
||||||
|
.hidden aarch64_atomic_fetch_add_8_relaxed_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_fetch_add_8_relaxed_default_impl:
|
aarch64_atomic_fetch_add_8_relaxed_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -71,6 +74,7 @@ aarch64_atomic_fetch_add_8_relaxed_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.global aarch64_atomic_fetch_add_4_relaxed_default_impl
|
.global aarch64_atomic_fetch_add_4_relaxed_default_impl
|
||||||
|
.hidden aarch64_atomic_fetch_add_4_relaxed_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_fetch_add_4_relaxed_default_impl:
|
aarch64_atomic_fetch_add_4_relaxed_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -86,6 +90,7 @@ aarch64_atomic_fetch_add_4_relaxed_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_xchg_4_default_impl
|
.globl aarch64_atomic_xchg_4_default_impl
|
||||||
|
.hidden aarch64_atomic_xchg_4_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_xchg_4_default_impl:
|
aarch64_atomic_xchg_4_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -101,6 +106,7 @@ aarch64_atomic_xchg_4_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_xchg_8_default_impl
|
.globl aarch64_atomic_xchg_8_default_impl
|
||||||
|
.hidden aarch64_atomic_xchg_8_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_xchg_8_default_impl:
|
aarch64_atomic_xchg_8_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -116,6 +122,7 @@ aarch64_atomic_xchg_8_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_1_default_impl
|
.globl aarch64_atomic_cmpxchg_1_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_1_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_1_default_impl:
|
aarch64_atomic_cmpxchg_1_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -136,6 +143,7 @@ aarch64_atomic_cmpxchg_1_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_4_default_impl
|
.globl aarch64_atomic_cmpxchg_4_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_4_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_4_default_impl:
|
aarch64_atomic_cmpxchg_4_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -155,6 +163,7 @@ aarch64_atomic_cmpxchg_4_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_8_default_impl
|
.globl aarch64_atomic_cmpxchg_8_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_8_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_8_default_impl:
|
aarch64_atomic_cmpxchg_8_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -174,6 +183,7 @@ aarch64_atomic_cmpxchg_8_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_4_release_default_impl
|
.globl aarch64_atomic_cmpxchg_4_release_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_4_release_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_4_release_default_impl:
|
aarch64_atomic_cmpxchg_4_release_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -191,6 +201,7 @@ aarch64_atomic_cmpxchg_4_release_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_8_release_default_impl
|
.globl aarch64_atomic_cmpxchg_8_release_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_8_release_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_8_release_default_impl:
|
aarch64_atomic_cmpxchg_8_release_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -208,6 +219,7 @@ aarch64_atomic_cmpxchg_8_release_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_4_seq_cst_default_impl
|
.globl aarch64_atomic_cmpxchg_4_seq_cst_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_4_seq_cst_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_4_seq_cst_default_impl:
|
aarch64_atomic_cmpxchg_4_seq_cst_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -225,6 +237,7 @@ aarch64_atomic_cmpxchg_4_seq_cst_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_8_seq_cst_default_impl
|
.globl aarch64_atomic_cmpxchg_8_seq_cst_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_8_seq_cst_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_8_seq_cst_default_impl:
|
aarch64_atomic_cmpxchg_8_seq_cst_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -242,6 +255,7 @@ aarch64_atomic_cmpxchg_8_seq_cst_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_1_relaxed_default_impl
|
.globl aarch64_atomic_cmpxchg_1_relaxed_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_1_relaxed_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_1_relaxed_default_impl:
|
aarch64_atomic_cmpxchg_1_relaxed_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -260,6 +274,7 @@ aarch64_atomic_cmpxchg_1_relaxed_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_4_relaxed_default_impl
|
.globl aarch64_atomic_cmpxchg_4_relaxed_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_4_relaxed_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_4_relaxed_default_impl:
|
aarch64_atomic_cmpxchg_4_relaxed_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
@@ -277,6 +292,7 @@ aarch64_atomic_cmpxchg_4_relaxed_default_impl:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.globl aarch64_atomic_cmpxchg_8_relaxed_default_impl
|
.globl aarch64_atomic_cmpxchg_8_relaxed_default_impl
|
||||||
|
.hidden aarch64_atomic_cmpxchg_8_relaxed_default_impl
|
||||||
.align 5
|
.align 5
|
||||||
aarch64_atomic_cmpxchg_8_relaxed_default_impl:
|
aarch64_atomic_cmpxchg_8_relaxed_default_impl:
|
||||||
#ifdef __ARM_FEATURE_ATOMICS
|
#ifdef __ARM_FEATURE_ATOMICS
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
.global _Copy_conjoint_words
|
.global _Copy_conjoint_words
|
||||||
.global _Copy_disjoint_words
|
.global _Copy_disjoint_words
|
||||||
|
|
||||||
|
.hidden _Copy_conjoint_words
|
||||||
|
.hidden _Copy_disjoint_words
|
||||||
|
|
||||||
s .req x0
|
s .req x0
|
||||||
d .req x1
|
d .req x1
|
||||||
count .req x2
|
count .req x2
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 SAP SE. All rights reserved.
|
* Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -30,6 +30,13 @@
|
|||||||
.globl _SafeFetch32_fault
|
.globl _SafeFetch32_fault
|
||||||
.globl _SafeFetch32_continuation
|
.globl _SafeFetch32_continuation
|
||||||
|
|
||||||
|
.hidden SafeFetchN_impl
|
||||||
|
.hidden _SafeFetchN_fault
|
||||||
|
.hidden _SafeFetchN_continuation
|
||||||
|
.hidden SafeFetch32_impl
|
||||||
|
.hidden _SafeFetch32_fault
|
||||||
|
.hidden _SafeFetch32_continuation
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
#
|
#
|
||||||
# x0 : address
|
# x0 : address
|
||||||
|
|||||||
@@ -25,22 +25,23 @@
|
|||||||
// Clobber x1, flags.
|
// Clobber x1, flags.
|
||||||
// All other registers are preserved,
|
// All other registers are preserved,
|
||||||
|
|
||||||
.global _ZN10JavaThread25aarch64_get_thread_helperEv
|
.global _ZN10JavaThread25aarch64_get_thread_helperEv
|
||||||
.type _ZN10JavaThread25aarch64_get_thread_helperEv, %function
|
.hidden _ZN10JavaThread25aarch64_get_thread_helperEv
|
||||||
|
.type _ZN10JavaThread25aarch64_get_thread_helperEv, %function
|
||||||
|
|
||||||
_ZN10JavaThread25aarch64_get_thread_helperEv:
|
_ZN10JavaThread25aarch64_get_thread_helperEv:
|
||||||
hint #0x19 // paciasp
|
hint #0x19 // paciasp
|
||||||
stp x29, x30, [sp, -16]!
|
stp x29, x30, [sp, -16]!
|
||||||
adrp x0, :tlsdesc:_ZN6Thread12_thr_currentE
|
adrp x0, :tlsdesc:_ZN6Thread12_thr_currentE
|
||||||
ldr x1, [x0, #:tlsdesc_lo12:_ZN6Thread12_thr_currentE]
|
ldr x1, [x0, #:tlsdesc_lo12:_ZN6Thread12_thr_currentE]
|
||||||
add x0, x0, :tlsdesc_lo12:_ZN6Thread12_thr_currentE
|
add x0, x0, :tlsdesc_lo12:_ZN6Thread12_thr_currentE
|
||||||
.tlsdesccall _ZN6Thread12_thr_currentE
|
.tlsdesccall _ZN6Thread12_thr_currentE
|
||||||
blr x1
|
blr x1
|
||||||
mrs x1, tpidr_el0
|
mrs x1, tpidr_el0
|
||||||
add x0, x1, x0
|
add x0, x1, x0
|
||||||
ldr x0, [x0]
|
ldr x0, [x0]
|
||||||
ldp x29, x30, [sp], 16
|
ldp x29, x30, [sp], 16
|
||||||
hint #0x1d // autiasp
|
hint #0x1d // autiasp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.size _ZN10JavaThread25aarch64_get_thread_helperEv, .-_ZN10JavaThread25aarch64_get_thread_helperEv
|
.size _ZN10JavaThread25aarch64_get_thread_helperEv, .-_ZN10JavaThread25aarch64_get_thread_helperEv
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -23,38 +23,46 @@
|
|||||||
|
|
||||||
|
|
||||||
# NOTE WELL! The _Copy functions are called directly
|
# NOTE WELL! The _Copy functions are called directly
|
||||||
# from server-compiler-generated code via CallLeafNoFP,
|
# from server-compiler-generated code via CallLeafNoFP,
|
||||||
# which means that they *must* either not use floating
|
# which means that they *must* either not use floating
|
||||||
# point or use it in the same manner as does the server
|
# point or use it in the same manner as does the server
|
||||||
# compiler.
|
# compiler.
|
||||||
|
|
||||||
.globl _Copy_conjoint_bytes
|
.globl SpinPause
|
||||||
.type _Copy_conjoint_bytes, %function
|
.hidden SpinPause
|
||||||
|
.type SpinPause, %function
|
||||||
.globl _Copy_arrayof_conjoint_bytes
|
.globl _Copy_arrayof_conjoint_bytes
|
||||||
.type _Copy_arrayof_conjoint_bytes, %function
|
.hidden _Copy_arrayof_conjoint_bytes
|
||||||
.globl _Copy_disjoint_words
|
.type _Copy_arrayof_conjoint_bytes, %function
|
||||||
.type _Copy_disjoint_words, %function
|
.globl _Copy_disjoint_words
|
||||||
.globl _Copy_conjoint_words
|
.hidden _Copy_disjoint_words
|
||||||
.type _Copy_conjoint_words, %function
|
.type _Copy_disjoint_words, %function
|
||||||
|
.globl _Copy_conjoint_words
|
||||||
|
.hidden _Copy_conjoint_words
|
||||||
|
.type _Copy_conjoint_words, %function
|
||||||
.globl _Copy_conjoint_jshorts_atomic
|
.globl _Copy_conjoint_jshorts_atomic
|
||||||
.type _Copy_conjoint_jshorts_atomic, %function
|
.hidden _Copy_conjoint_jshorts_atomic
|
||||||
.globl _Copy_arrayof_conjoint_jshorts
|
.type _Copy_conjoint_jshorts_atomic, %function
|
||||||
.type _Copy_arrayof_conjoint_jshorts, %function
|
.globl _Copy_arrayof_conjoint_jshorts
|
||||||
|
.hidden _Copy_arrayof_conjoint_jshorts
|
||||||
|
.type _Copy_arrayof_conjoint_jshorts, %function
|
||||||
.globl _Copy_conjoint_jints_atomic
|
.globl _Copy_conjoint_jints_atomic
|
||||||
.type _Copy_conjoint_jints_atomic, %function
|
.hidden _Copy_conjoint_jints_atomic
|
||||||
|
.type _Copy_conjoint_jints_atomic, %function
|
||||||
.globl _Copy_arrayof_conjoint_jints
|
.globl _Copy_arrayof_conjoint_jints
|
||||||
.type _Copy_arrayof_conjoint_jints, %function
|
.hidden _Copy_arrayof_conjoint_jints
|
||||||
.globl _Copy_conjoint_jlongs_atomic
|
.type _Copy_arrayof_conjoint_jints, %function
|
||||||
.type _Copy_conjoint_jlongs_atomic, %function
|
.globl _Copy_conjoint_jlongs_atomic
|
||||||
.globl _Copy_arrayof_conjoint_jlongs
|
.hidden _Copy_conjoint_jlongs_atomic
|
||||||
.type _Copy_arrayof_conjoint_jlongs, %function
|
.type _Copy_conjoint_jlongs_atomic, %function
|
||||||
|
.globl _Copy_arrayof_conjoint_jlongs
|
||||||
|
.hidden _Copy_arrayof_conjoint_jlongs
|
||||||
|
.type _Copy_arrayof_conjoint_jlongs, %function
|
||||||
|
|
||||||
from .req r0
|
from .req r0
|
||||||
to .req r1
|
to .req r1
|
||||||
|
|
||||||
.text
|
.text
|
||||||
.globl SpinPause
|
|
||||||
.type SpinPause, %function
|
|
||||||
SpinPause:
|
SpinPause:
|
||||||
bx LR
|
bx LR
|
||||||
|
|
||||||
@@ -81,17 +89,17 @@ _Copy_disjoint_words:
|
|||||||
.align 3
|
.align 3
|
||||||
dw_f2b_loop_32:
|
dw_f2b_loop_32:
|
||||||
subs r2, #32
|
subs r2, #32
|
||||||
blt dw_f2b_loop_32_finish
|
blt dw_f2b_loop_32_finish
|
||||||
ldmia from!, {r3 - r9, ip}
|
ldmia from!, {r3 - r9, ip}
|
||||||
nop
|
nop
|
||||||
pld [from]
|
pld [from]
|
||||||
stmia to!, {r3 - r9, ip}
|
stmia to!, {r3 - r9, ip}
|
||||||
bgt dw_f2b_loop_32
|
bgt dw_f2b_loop_32
|
||||||
dw_f2b_loop_32_finish:
|
dw_f2b_loop_32_finish:
|
||||||
addlts r2, #32
|
addlts r2, #32
|
||||||
beq disjoint_words_finish
|
beq disjoint_words_finish
|
||||||
cmp r2, #16
|
cmp r2, #16
|
||||||
blt disjoint_words_small
|
blt disjoint_words_small
|
||||||
ldmia from!, {r3 - r6}
|
ldmia from!, {r3 - r6}
|
||||||
subge r2, r2, #16
|
subge r2, r2, #16
|
||||||
stmia to!, {r3 - r6}
|
stmia to!, {r3 - r6}
|
||||||
@@ -116,8 +124,8 @@ disjoint_words_finish:
|
|||||||
_Copy_conjoint_words:
|
_Copy_conjoint_words:
|
||||||
stmdb sp!, {r3 - r9, ip}
|
stmdb sp!, {r3 - r9, ip}
|
||||||
|
|
||||||
cmp r2, #0
|
cmp r2, #0
|
||||||
beq conjoint_words_finish
|
beq conjoint_words_finish
|
||||||
|
|
||||||
pld [from, #0]
|
pld [from, #0]
|
||||||
cmp r2, #12
|
cmp r2, #12
|
||||||
@@ -129,17 +137,17 @@ _Copy_conjoint_words:
|
|||||||
.align 3
|
.align 3
|
||||||
cw_f2b_loop_32:
|
cw_f2b_loop_32:
|
||||||
subs r2, #32
|
subs r2, #32
|
||||||
blt cw_f2b_loop_32_finish
|
blt cw_f2b_loop_32_finish
|
||||||
ldmia from!, {r3 - r9, ip}
|
ldmia from!, {r3 - r9, ip}
|
||||||
nop
|
nop
|
||||||
pld [from]
|
pld [from]
|
||||||
stmia to!, {r3 - r9, ip}
|
stmia to!, {r3 - r9, ip}
|
||||||
bgt cw_f2b_loop_32
|
bgt cw_f2b_loop_32
|
||||||
cw_f2b_loop_32_finish:
|
cw_f2b_loop_32_finish:
|
||||||
addlts r2, #32
|
addlts r2, #32
|
||||||
beq conjoint_words_finish
|
beq conjoint_words_finish
|
||||||
cmp r2, #16
|
cmp r2, #16
|
||||||
blt conjoint_words_small
|
blt conjoint_words_small
|
||||||
ldmia from!, {r3 - r6}
|
ldmia from!, {r3 - r6}
|
||||||
subge r2, r2, #16
|
subge r2, r2, #16
|
||||||
stmia to!, {r3 - r6}
|
stmia to!, {r3 - r6}
|
||||||
@@ -154,7 +162,7 @@ conjoint_words_small:
|
|||||||
strgt r9, [to], #4
|
strgt r9, [to], #4
|
||||||
b conjoint_words_finish
|
b conjoint_words_finish
|
||||||
|
|
||||||
# Src and dest overlap, copy in a descending order
|
# Src and dest overlap, copy in a descending order
|
||||||
cw_b2f_copy:
|
cw_b2f_copy:
|
||||||
add from, r2
|
add from, r2
|
||||||
pld [from, #-32]
|
pld [from, #-32]
|
||||||
@@ -162,17 +170,17 @@ cw_b2f_copy:
|
|||||||
.align 3
|
.align 3
|
||||||
cw_b2f_loop_32:
|
cw_b2f_loop_32:
|
||||||
subs r2, #32
|
subs r2, #32
|
||||||
blt cw_b2f_loop_32_finish
|
blt cw_b2f_loop_32_finish
|
||||||
ldmdb from!, {r3-r9,ip}
|
ldmdb from!, {r3-r9,ip}
|
||||||
nop
|
nop
|
||||||
pld [from, #-32]
|
pld [from, #-32]
|
||||||
stmdb to!, {r3-r9,ip}
|
stmdb to!, {r3-r9,ip}
|
||||||
bgt cw_b2f_loop_32
|
bgt cw_b2f_loop_32
|
||||||
cw_b2f_loop_32_finish:
|
cw_b2f_loop_32_finish:
|
||||||
addlts r2, #32
|
addlts r2, #32
|
||||||
beq conjoint_words_finish
|
beq conjoint_words_finish
|
||||||
cmp r2, #16
|
cmp r2, #16
|
||||||
blt cw_b2f_copy_small
|
blt cw_b2f_copy_small
|
||||||
ldmdb from!, {r3 - r6}
|
ldmdb from!, {r3 - r6}
|
||||||
subge r2, r2, #16
|
subge r2, r2, #16
|
||||||
stmdb to!, {r3 - r6}
|
stmdb to!, {r3 - r6}
|
||||||
@@ -196,8 +204,8 @@ conjoint_words_finish:
|
|||||||
_Copy_conjoint_jshorts_atomic:
|
_Copy_conjoint_jshorts_atomic:
|
||||||
stmdb sp!, {r3 - r9, ip}
|
stmdb sp!, {r3 - r9, ip}
|
||||||
|
|
||||||
cmp r2, #0
|
cmp r2, #0
|
||||||
beq conjoint_shorts_finish
|
beq conjoint_shorts_finish
|
||||||
|
|
||||||
subs r3, to, from
|
subs r3, to, from
|
||||||
cmphi r2, r3
|
cmphi r2, r3
|
||||||
@@ -210,11 +218,11 @@ _Copy_conjoint_jshorts_atomic:
|
|||||||
ands r3, from, #3
|
ands r3, from, #3
|
||||||
bne cs_f2b_src_u
|
bne cs_f2b_src_u
|
||||||
|
|
||||||
# Aligned source address
|
# Aligned source address
|
||||||
.align 3
|
.align 3
|
||||||
cs_f2b_loop_32:
|
cs_f2b_loop_32:
|
||||||
subs r2, #32
|
subs r2, #32
|
||||||
blt cs_f2b_loop_32_finish
|
blt cs_f2b_loop_32_finish
|
||||||
ldmia from!, {r3 - r9, ip}
|
ldmia from!, {r3 - r9, ip}
|
||||||
nop
|
nop
|
||||||
pld [from]
|
pld [from]
|
||||||
@@ -244,14 +252,14 @@ cs_f2b_4:
|
|||||||
strgth r5, [to], #2
|
strgth r5, [to], #2
|
||||||
b conjoint_shorts_finish
|
b conjoint_shorts_finish
|
||||||
|
|
||||||
# Destination not aligned
|
# Destination not aligned
|
||||||
cs_f2b_dest_u:
|
cs_f2b_dest_u:
|
||||||
ldrh r3, [from], #2
|
ldrh r3, [from], #2
|
||||||
subs r2, #2
|
subs r2, #2
|
||||||
strh r3, [to], #2
|
strh r3, [to], #2
|
||||||
beq conjoint_shorts_finish
|
beq conjoint_shorts_finish
|
||||||
|
|
||||||
# Check to see if source is not aligned ether
|
# Check to see if source is not aligned ether
|
||||||
ands r3, from, #3
|
ands r3, from, #3
|
||||||
beq cs_f2b_loop_32
|
beq cs_f2b_loop_32
|
||||||
|
|
||||||
@@ -259,11 +267,11 @@ cs_f2b_src_u:
|
|||||||
cmp r2, #16
|
cmp r2, #16
|
||||||
blt cs_f2b_8_u
|
blt cs_f2b_8_u
|
||||||
|
|
||||||
# Load 2 first bytes to r7 and make src ptr word aligned
|
# Load 2 first bytes to r7 and make src ptr word aligned
|
||||||
bic from, #3
|
bic from, #3
|
||||||
ldr r7, [from], #4
|
ldr r7, [from], #4
|
||||||
|
|
||||||
# Destination aligned, source not
|
# Destination aligned, source not
|
||||||
mov r8, r2, lsr #4
|
mov r8, r2, lsr #4
|
||||||
.align 3
|
.align 3
|
||||||
cs_f2b_16_u_loop:
|
cs_f2b_16_u_loop:
|
||||||
@@ -306,7 +314,7 @@ cs_f2b_4_u:
|
|||||||
strgth r5, [to], #2
|
strgth r5, [to], #2
|
||||||
b conjoint_shorts_finish
|
b conjoint_shorts_finish
|
||||||
|
|
||||||
# Src and dest overlap, copy in a descending order
|
# Src and dest overlap, copy in a descending order
|
||||||
cs_b2f_copy:
|
cs_b2f_copy:
|
||||||
add from, r2
|
add from, r2
|
||||||
pld [from, #-32]
|
pld [from, #-32]
|
||||||
@@ -319,7 +327,7 @@ cs_b2f_copy:
|
|||||||
.align 3
|
.align 3
|
||||||
cs_b2f_loop_32:
|
cs_b2f_loop_32:
|
||||||
subs r2, #32
|
subs r2, #32
|
||||||
blt cs_b2f_loop_32_finish
|
blt cs_b2f_loop_32_finish
|
||||||
ldmdb from!, {r3-r9,ip}
|
ldmdb from!, {r3-r9,ip}
|
||||||
nop
|
nop
|
||||||
pld [from, #-32]
|
pld [from, #-32]
|
||||||
@@ -359,16 +367,16 @@ cs_b2f_all_copy:
|
|||||||
strgth r5, [to, #-2]!
|
strgth r5, [to, #-2]!
|
||||||
b conjoint_shorts_finish
|
b conjoint_shorts_finish
|
||||||
|
|
||||||
# Destination not aligned
|
# Destination not aligned
|
||||||
cs_b2f_dest_u:
|
cs_b2f_dest_u:
|
||||||
ldrh r3, [from, #-2]!
|
ldrh r3, [from, #-2]!
|
||||||
strh r3, [to, #-2]!
|
strh r3, [to, #-2]!
|
||||||
sub r2, #2
|
sub r2, #2
|
||||||
# Check source alignment as well
|
# Check source alignment as well
|
||||||
ands r3, from, #3
|
ands r3, from, #3
|
||||||
beq cs_b2f_loop_32
|
beq cs_b2f_loop_32
|
||||||
|
|
||||||
# Source not aligned
|
# Source not aligned
|
||||||
cs_b2f_src_u:
|
cs_b2f_src_u:
|
||||||
bic from, #3
|
bic from, #3
|
||||||
.align 3
|
.align 3
|
||||||
@@ -393,7 +401,7 @@ cs_b2f_16_loop_u:
|
|||||||
cs_b2f_16_loop_u_finished:
|
cs_b2f_16_loop_u_finished:
|
||||||
addlts r2, #16
|
addlts r2, #16
|
||||||
ldr r3, [from]
|
ldr r3, [from]
|
||||||
cmp r2, #10
|
cmp r2, #10
|
||||||
blt cs_b2f_2_u_loop
|
blt cs_b2f_2_u_loop
|
||||||
ldmdb from!, {r4 - r5}
|
ldmdb from!, {r4 - r5}
|
||||||
mov r6, r4, lsr #16
|
mov r6, r4, lsr #16
|
||||||
@@ -402,7 +410,7 @@ cs_b2f_16_loop_u_finished:
|
|||||||
orr r7, r7, r3, lsl #16
|
orr r7, r7, r3, lsl #16
|
||||||
stmdb to!, {r6-r7}
|
stmdb to!, {r6-r7}
|
||||||
sub r2, #8
|
sub r2, #8
|
||||||
.align 3
|
.align 3
|
||||||
cs_b2f_2_u_loop:
|
cs_b2f_2_u_loop:
|
||||||
subs r2, #2
|
subs r2, #2
|
||||||
ldrh r3, [from], #-2
|
ldrh r3, [from], #-2
|
||||||
@@ -434,8 +442,8 @@ _Copy_conjoint_jlongs_atomic:
|
|||||||
_Copy_arrayof_conjoint_jlongs:
|
_Copy_arrayof_conjoint_jlongs:
|
||||||
stmdb sp!, {r3 - r9, ip}
|
stmdb sp!, {r3 - r9, ip}
|
||||||
|
|
||||||
cmp r2, #0
|
cmp r2, #0
|
||||||
beq conjoint_longs_finish
|
beq conjoint_longs_finish
|
||||||
|
|
||||||
pld [from, #0]
|
pld [from, #0]
|
||||||
cmp r2, #24
|
cmp r2, #24
|
||||||
@@ -447,10 +455,10 @@ _Copy_arrayof_conjoint_jlongs:
|
|||||||
.align 3
|
.align 3
|
||||||
cl_f2b_loop_32:
|
cl_f2b_loop_32:
|
||||||
subs r2, #32
|
subs r2, #32
|
||||||
blt cl_f2b_loop_32_finish
|
blt cl_f2b_loop_32_finish
|
||||||
ldmia from!, {r3 - r9, ip}
|
ldmia from!, {r3 - r9, ip}
|
||||||
nop
|
nop
|
||||||
pld [from]
|
pld [from]
|
||||||
stmia to!, {r3 - r9, ip}
|
stmia to!, {r3 - r9, ip}
|
||||||
bgt cl_f2b_loop_32
|
bgt cl_f2b_loop_32
|
||||||
cl_f2b_loop_32_finish:
|
cl_f2b_loop_32_finish:
|
||||||
@@ -458,21 +466,21 @@ cl_f2b_loop_32_finish:
|
|||||||
beq conjoint_longs_finish
|
beq conjoint_longs_finish
|
||||||
conjoint_longs_small:
|
conjoint_longs_small:
|
||||||
cmp r2, #16
|
cmp r2, #16
|
||||||
blt cl_f2b_copy_8
|
blt cl_f2b_copy_8
|
||||||
bgt cl_f2b_copy_24
|
bgt cl_f2b_copy_24
|
||||||
ldmia from!, {r3 - r6}
|
ldmia from!, {r3 - r6}
|
||||||
stmia to!, {r3 - r6}
|
stmia to!, {r3 - r6}
|
||||||
b conjoint_longs_finish
|
b conjoint_longs_finish
|
||||||
cl_f2b_copy_8:
|
cl_f2b_copy_8:
|
||||||
ldmia from!, {r3 - r4}
|
ldmia from!, {r3 - r4}
|
||||||
stmia to!, {r3 - r4}
|
stmia to!, {r3 - r4}
|
||||||
b conjoint_longs_finish
|
b conjoint_longs_finish
|
||||||
cl_f2b_copy_24:
|
cl_f2b_copy_24:
|
||||||
ldmia from!, {r3 - r8}
|
ldmia from!, {r3 - r8}
|
||||||
stmia to!, {r3 - r8}
|
stmia to!, {r3 - r8}
|
||||||
b conjoint_longs_finish
|
b conjoint_longs_finish
|
||||||
|
|
||||||
# Src and dest overlap, copy in a descending order
|
# Src and dest overlap, copy in a descending order
|
||||||
cl_b2f_copy:
|
cl_b2f_copy:
|
||||||
add from, r2
|
add from, r2
|
||||||
pld [from, #-32]
|
pld [from, #-32]
|
||||||
@@ -480,31 +488,29 @@ cl_b2f_copy:
|
|||||||
.align 3
|
.align 3
|
||||||
cl_b2f_loop_32:
|
cl_b2f_loop_32:
|
||||||
subs r2, #32
|
subs r2, #32
|
||||||
blt cl_b2f_loop_32_finish
|
blt cl_b2f_loop_32_finish
|
||||||
ldmdb from!, {r3 - r9, ip}
|
ldmdb from!, {r3 - r9, ip}
|
||||||
nop
|
nop
|
||||||
pld [from]
|
pld [from]
|
||||||
stmdb to!, {r3 - r9, ip}
|
stmdb to!, {r3 - r9, ip}
|
||||||
bgt cl_b2f_loop_32
|
bgt cl_b2f_loop_32
|
||||||
cl_b2f_loop_32_finish:
|
cl_b2f_loop_32_finish:
|
||||||
addlts r2, #32
|
addlts r2, #32
|
||||||
beq conjoint_longs_finish
|
beq conjoint_longs_finish
|
||||||
cmp r2, #16
|
cmp r2, #16
|
||||||
blt cl_b2f_copy_8
|
blt cl_b2f_copy_8
|
||||||
bgt cl_b2f_copy_24
|
bgt cl_b2f_copy_24
|
||||||
ldmdb from!, {r3 - r6}
|
ldmdb from!, {r3 - r6}
|
||||||
stmdb to!, {r3 - r6}
|
stmdb to!, {r3 - r6}
|
||||||
b conjoint_longs_finish
|
b conjoint_longs_finish
|
||||||
cl_b2f_copy_8:
|
cl_b2f_copy_8:
|
||||||
ldmdb from!, {r3 - r4}
|
ldmdb from!, {r3 - r4}
|
||||||
stmdb to!, {r3 - r4}
|
stmdb to!, {r3 - r4}
|
||||||
b conjoint_longs_finish
|
b conjoint_longs_finish
|
||||||
cl_b2f_copy_24:
|
cl_b2f_copy_24:
|
||||||
ldmdb from!, {r3 - r8}
|
ldmdb from!, {r3 - r8}
|
||||||
stmdb to!, {r3 - r8}
|
stmdb to!, {r3 - r8}
|
||||||
|
|
||||||
conjoint_longs_finish:
|
conjoint_longs_finish:
|
||||||
ldmia sp!, {r3 - r9, ip}
|
ldmia sp!, {r3 - r9, ip}
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 SAP SE. All rights reserved.
|
* Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -26,6 +26,11 @@
|
|||||||
.globl SafeFetch32_impl
|
.globl SafeFetch32_impl
|
||||||
.globl _SafeFetch32_fault
|
.globl _SafeFetch32_fault
|
||||||
.globl _SafeFetch32_continuation
|
.globl _SafeFetch32_continuation
|
||||||
|
|
||||||
|
.hidden SafeFetch32_impl
|
||||||
|
.hidden _SafeFetch32_fault
|
||||||
|
.hidden _SafeFetch32_continuation
|
||||||
|
|
||||||
.type SafeFetch32_impl, %function
|
.type SafeFetch32_impl, %function
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 SAP SE. All rights reserved.
|
* Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -30,6 +30,13 @@
|
|||||||
.globl _SafeFetch32_fault
|
.globl _SafeFetch32_fault
|
||||||
.globl _SafeFetch32_continuation
|
.globl _SafeFetch32_continuation
|
||||||
|
|
||||||
|
.hidden SafeFetchN_impl
|
||||||
|
.hidden _SafeFetchN_fault
|
||||||
|
.hidden _SafeFetchN_continuation
|
||||||
|
.hidden SafeFetch32_impl
|
||||||
|
.hidden _SafeFetch32_fault
|
||||||
|
.hidden _SafeFetch32_continuation
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
#
|
#
|
||||||
# r3 : address
|
# r3 : address
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 SAP SE. All rights reserved.
|
* Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -30,6 +30,13 @@
|
|||||||
.globl _SafeFetch32_fault
|
.globl _SafeFetch32_fault
|
||||||
.globl _SafeFetch32_continuation
|
.globl _SafeFetch32_continuation
|
||||||
|
|
||||||
|
.hidden SafeFetchN_impl
|
||||||
|
.hidden _SafeFetchN_fault
|
||||||
|
.hidden _SafeFetchN_continuation
|
||||||
|
.hidden SafeFetch32_impl
|
||||||
|
.hidden _SafeFetch32_fault
|
||||||
|
.hidden _SafeFetch32_continuation
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
#
|
#
|
||||||
# x10 (a0) : address
|
# x10 (a0) : address
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 SAP SE. All rights reserved.
|
* Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -30,6 +30,13 @@
|
|||||||
.globl _SafeFetch32_fault
|
.globl _SafeFetch32_fault
|
||||||
.globl _SafeFetch32_continuation
|
.globl _SafeFetch32_continuation
|
||||||
|
|
||||||
|
.hidden SafeFetchN_impl
|
||||||
|
.hidden _SafeFetchN_fault
|
||||||
|
.hidden _SafeFetchN_continuation
|
||||||
|
.hidden SafeFetch32_impl
|
||||||
|
.hidden _SafeFetch32_fault
|
||||||
|
.hidden _SafeFetch32_continuation
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
#
|
#
|
||||||
# r2 : address
|
# r2 : address
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -21,28 +21,41 @@
|
|||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
.globl SpinPause
|
||||||
|
|
||||||
# NOTE WELL! The _Copy functions are called directly
|
# NOTE WELL! The _Copy functions are called directly
|
||||||
# from server-compiler-generated code via CallLeafNoFP,
|
# from server-compiler-generated code via CallLeafNoFP,
|
||||||
# which means that they *must* either not use floating
|
# which means that they *must* either not use floating
|
||||||
# point or use it in the same manner as does the server
|
# point or use it in the same manner as does the server
|
||||||
# compiler.
|
# compiler.
|
||||||
|
|
||||||
.globl _Copy_arrayof_conjoint_bytes
|
.globl _Copy_arrayof_conjoint_bytes
|
||||||
.globl _Copy_conjoint_jshorts_atomic
|
.globl _Copy_conjoint_jshorts_atomic
|
||||||
.globl _Copy_arrayof_conjoint_jshorts
|
.globl _Copy_arrayof_conjoint_jshorts
|
||||||
.globl _Copy_conjoint_jints_atomic
|
.globl _Copy_conjoint_jints_atomic
|
||||||
.globl _Copy_arrayof_conjoint_jints
|
.globl _Copy_arrayof_conjoint_jints
|
||||||
.globl _Copy_conjoint_jlongs_atomic
|
.globl _Copy_conjoint_jlongs_atomic
|
||||||
.globl _mmx_Copy_arrayof_conjoint_jshorts
|
.globl _mmx_Copy_arrayof_conjoint_jshorts
|
||||||
|
|
||||||
.globl _Atomic_cmpxchg_long
|
.globl _Atomic_cmpxchg_long
|
||||||
.globl _Atomic_move_long
|
.globl _Atomic_move_long
|
||||||
|
|
||||||
.text
|
.hidden SpinPause
|
||||||
|
|
||||||
.globl SpinPause
|
.hidden _Copy_arrayof_conjoint_bytes
|
||||||
.type SpinPause,@function
|
.hidden _Copy_conjoint_jshorts_atomic
|
||||||
|
.hidden _Copy_arrayof_conjoint_jshorts
|
||||||
|
.hidden _Copy_conjoint_jints_atomic
|
||||||
|
.hidden _Copy_arrayof_conjoint_jints
|
||||||
|
.hidden _Copy_conjoint_jlongs_atomic
|
||||||
|
.hidden _mmx_Copy_arrayof_conjoint_jshorts
|
||||||
|
|
||||||
|
.hidden _Atomic_cmpxchg_long
|
||||||
|
.hidden _Atomic_move_long
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
.type SpinPause,@function
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
SpinPause:
|
SpinPause:
|
||||||
rep
|
rep
|
||||||
@@ -55,7 +68,7 @@ SpinPause:
|
|||||||
# size_t count)
|
# size_t count)
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_arrayof_conjoint_bytes,@function
|
.type _Copy_arrayof_conjoint_bytes,@function
|
||||||
_Copy_arrayof_conjoint_bytes:
|
_Copy_arrayof_conjoint_bytes:
|
||||||
pushl %esi
|
pushl %esi
|
||||||
movl 4+12(%esp),%ecx # count
|
movl 4+12(%esp),%ecx # count
|
||||||
@@ -115,7 +128,7 @@ acb_CopyLeft:
|
|||||||
jbe 2f # <= 32 dwords
|
jbe 2f # <= 32 dwords
|
||||||
rep; smovl
|
rep; smovl
|
||||||
jmp 4f
|
jmp 4f
|
||||||
.space 8
|
.space 8
|
||||||
2: subl %esi,%edi
|
2: subl %esi,%edi
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
3: movl (%esi),%edx
|
3: movl (%esi),%edx
|
||||||
@@ -131,7 +144,7 @@ acb_CopyLeft:
|
|||||||
addl $3,%esi
|
addl $3,%esi
|
||||||
6: movb (%esi),%dl
|
6: movb (%esi),%dl
|
||||||
movb %dl,(%edi,%esi,1)
|
movb %dl,(%edi,%esi,1)
|
||||||
subl $1,%esi
|
subl $1,%esi
|
||||||
subl $1,%ecx
|
subl $1,%ecx
|
||||||
jnz 6b
|
jnz 6b
|
||||||
7: cld
|
7: cld
|
||||||
@@ -143,7 +156,7 @@ acb_CopyLeft:
|
|||||||
# void* to,
|
# void* to,
|
||||||
# size_t count)
|
# size_t count)
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_conjoint_jshorts_atomic,@function
|
.type _Copy_conjoint_jshorts_atomic,@function
|
||||||
_Copy_conjoint_jshorts_atomic:
|
_Copy_conjoint_jshorts_atomic:
|
||||||
pushl %esi
|
pushl %esi
|
||||||
movl 4+12(%esp),%ecx # count
|
movl 4+12(%esp),%ecx # count
|
||||||
@@ -230,7 +243,7 @@ cs_CopyLeft:
|
|||||||
# void* to,
|
# void* to,
|
||||||
# size_t count)
|
# size_t count)
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_arrayof_conjoint_jshorts,@function
|
.type _Copy_arrayof_conjoint_jshorts,@function
|
||||||
_Copy_arrayof_conjoint_jshorts:
|
_Copy_arrayof_conjoint_jshorts:
|
||||||
pushl %esi
|
pushl %esi
|
||||||
movl 4+12(%esp),%ecx # count
|
movl 4+12(%esp),%ecx # count
|
||||||
@@ -307,8 +320,8 @@ acs_CopyLeft:
|
|||||||
# Equivalent to
|
# Equivalent to
|
||||||
# arrayof_conjoint_jints
|
# arrayof_conjoint_jints
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_conjoint_jints_atomic,@function
|
.type _Copy_conjoint_jints_atomic,@function
|
||||||
.type _Copy_arrayof_conjoint_jints,@function
|
.type _Copy_arrayof_conjoint_jints,@function
|
||||||
_Copy_conjoint_jints_atomic:
|
_Copy_conjoint_jints_atomic:
|
||||||
_Copy_arrayof_conjoint_jints:
|
_Copy_arrayof_conjoint_jints:
|
||||||
pushl %esi
|
pushl %esi
|
||||||
@@ -384,7 +397,7 @@ ci_CopyLeft:
|
|||||||
# }
|
# }
|
||||||
*/
|
*/
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_conjoint_jlongs_atomic,@function
|
.type _Copy_conjoint_jlongs_atomic,@function
|
||||||
_Copy_conjoint_jlongs_atomic:
|
_Copy_conjoint_jlongs_atomic:
|
||||||
movl 4+8(%esp),%ecx # count
|
movl 4+8(%esp),%ecx # count
|
||||||
movl 4+0(%esp),%eax # from
|
movl 4+0(%esp),%eax # from
|
||||||
@@ -413,7 +426,7 @@ cla_CopyLeft:
|
|||||||
# void* to,
|
# void* to,
|
||||||
# size_t count)
|
# size_t count)
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _mmx_Copy_arrayof_conjoint_jshorts,@function
|
.type _mmx_Copy_arrayof_conjoint_jshorts,@function
|
||||||
_mmx_Copy_arrayof_conjoint_jshorts:
|
_mmx_Copy_arrayof_conjoint_jshorts:
|
||||||
pushl %esi
|
pushl %esi
|
||||||
movl 4+12(%esp),%ecx
|
movl 4+12(%esp),%ecx
|
||||||
@@ -465,8 +478,8 @@ mmx_acs_CopyRight:
|
|||||||
cmpl $16,%ecx
|
cmpl $16,%ecx
|
||||||
jge 4b
|
jge 4b
|
||||||
emms
|
emms
|
||||||
testl %ecx,%ecx
|
testl %ecx,%ecx
|
||||||
ja 1b
|
ja 1b
|
||||||
5: andl $1,%eax
|
5: andl $1,%eax
|
||||||
je 7f
|
je 7f
|
||||||
6: movw (%esi),%dx
|
6: movw (%esi),%dx
|
||||||
@@ -511,7 +524,7 @@ mmx_acs_CopyLeft:
|
|||||||
# jlong exchange_value)
|
# jlong exchange_value)
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Atomic_cmpxchg_long,@function
|
.type _Atomic_cmpxchg_long,@function
|
||||||
_Atomic_cmpxchg_long:
|
_Atomic_cmpxchg_long:
|
||||||
# 8(%esp) : return PC
|
# 8(%esp) : return PC
|
||||||
pushl %ebx # 4(%esp) : old %ebx
|
pushl %ebx # 4(%esp) : old %ebx
|
||||||
@@ -530,7 +543,7 @@ _Atomic_cmpxchg_long:
|
|||||||
# Support for jlong Atomic::load and Atomic::store.
|
# Support for jlong Atomic::load and Atomic::store.
|
||||||
# void _Atomic_move_long(const volatile jlong* src, volatile jlong* dst)
|
# void _Atomic_move_long(const volatile jlong* src, volatile jlong* dst)
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Atomic_move_long,@function
|
.type _Atomic_move_long,@function
|
||||||
_Atomic_move_long:
|
_Atomic_move_long:
|
||||||
movl 4(%esp), %eax # src
|
movl 4(%esp), %eax # src
|
||||||
fildll (%eax)
|
fildll (%eax)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -21,24 +21,34 @@
|
|||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
.globl SpinPause
|
||||||
|
|
||||||
# NOTE WELL! The _Copy functions are called directly
|
# NOTE WELL! The _Copy functions are called directly
|
||||||
# from server-compiler-generated code via CallLeafNoFP,
|
# from server-compiler-generated code via CallLeafNoFP,
|
||||||
# which means that they *must* either not use floating
|
# which means that they *must* either not use floating
|
||||||
# point or use it in the same manner as does the server
|
# point or use it in the same manner as does the server
|
||||||
# compiler.
|
# compiler.
|
||||||
|
|
||||||
.globl _Copy_arrayof_conjoint_bytes
|
.globl _Copy_arrayof_conjoint_bytes
|
||||||
.globl _Copy_arrayof_conjoint_jshorts
|
.globl _Copy_arrayof_conjoint_jshorts
|
||||||
.globl _Copy_conjoint_jshorts_atomic
|
.globl _Copy_conjoint_jshorts_atomic
|
||||||
.globl _Copy_arrayof_conjoint_jints
|
.globl _Copy_arrayof_conjoint_jints
|
||||||
.globl _Copy_conjoint_jints_atomic
|
.globl _Copy_conjoint_jints_atomic
|
||||||
.globl _Copy_arrayof_conjoint_jlongs
|
.globl _Copy_arrayof_conjoint_jlongs
|
||||||
.globl _Copy_conjoint_jlongs_atomic
|
.globl _Copy_conjoint_jlongs_atomic
|
||||||
|
|
||||||
.text
|
.hidden SpinPause
|
||||||
|
|
||||||
|
.hidden _Copy_arrayof_conjoint_bytes
|
||||||
|
.hidden _Copy_arrayof_conjoint_jshorts
|
||||||
|
.hidden _Copy_conjoint_jshorts_atomic
|
||||||
|
.hidden _Copy_arrayof_conjoint_jints
|
||||||
|
.hidden _Copy_conjoint_jints_atomic
|
||||||
|
.hidden _Copy_arrayof_conjoint_jlongs
|
||||||
|
.hidden _Copy_conjoint_jlongs_atomic
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
.globl SpinPause
|
|
||||||
.align 16
|
.align 16
|
||||||
.type SpinPause,@function
|
.type SpinPause,@function
|
||||||
SpinPause:
|
SpinPause:
|
||||||
@@ -55,7 +65,7 @@ SpinPause:
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_arrayof_conjoint_bytes,@function
|
.type _Copy_arrayof_conjoint_bytes,@function
|
||||||
_Copy_arrayof_conjoint_bytes:
|
_Copy_arrayof_conjoint_bytes:
|
||||||
movq %rdx,%r8 # byte count
|
movq %rdx,%r8 # byte count
|
||||||
shrq $3,%rdx # qword count
|
shrq $3,%rdx # qword count
|
||||||
@@ -157,8 +167,8 @@ acb_CopyLeft:
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_arrayof_conjoint_jshorts,@function
|
.type _Copy_arrayof_conjoint_jshorts,@function
|
||||||
.type _Copy_conjoint_jshorts_atomic,@function
|
.type _Copy_conjoint_jshorts_atomic,@function
|
||||||
_Copy_arrayof_conjoint_jshorts:
|
_Copy_arrayof_conjoint_jshorts:
|
||||||
_Copy_conjoint_jshorts_atomic:
|
_Copy_conjoint_jshorts_atomic:
|
||||||
movq %rdx,%r8 # word count
|
movq %rdx,%r8 # word count
|
||||||
@@ -247,8 +257,8 @@ acs_CopyLeft:
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_arrayof_conjoint_jints,@function
|
.type _Copy_arrayof_conjoint_jints,@function
|
||||||
.type _Copy_conjoint_jints_atomic,@function
|
.type _Copy_conjoint_jints_atomic,@function
|
||||||
_Copy_arrayof_conjoint_jints:
|
_Copy_arrayof_conjoint_jints:
|
||||||
_Copy_conjoint_jints_atomic:
|
_Copy_conjoint_jints_atomic:
|
||||||
movq %rdx,%r8 # dword count
|
movq %rdx,%r8 # dword count
|
||||||
@@ -326,8 +336,8 @@ aci_CopyLeft:
|
|||||||
# rdx - count, treated as ssize_t
|
# rdx - count, treated as ssize_t
|
||||||
#
|
#
|
||||||
.p2align 4,,15
|
.p2align 4,,15
|
||||||
.type _Copy_arrayof_conjoint_jlongs,@function
|
.type _Copy_arrayof_conjoint_jlongs,@function
|
||||||
.type _Copy_conjoint_jlongs_atomic,@function
|
.type _Copy_conjoint_jlongs_atomic,@function
|
||||||
_Copy_arrayof_conjoint_jlongs:
|
_Copy_arrayof_conjoint_jlongs:
|
||||||
_Copy_conjoint_jlongs_atomic:
|
_Copy_conjoint_jlongs_atomic:
|
||||||
cmpq %rdi,%rsi
|
cmpq %rdi,%rsi
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2022 SAP SE. All rights reserved.
|
# Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -25,7 +25,11 @@
|
|||||||
.globl _SafeFetch32_fault
|
.globl _SafeFetch32_fault
|
||||||
.globl _SafeFetch32_continuation
|
.globl _SafeFetch32_continuation
|
||||||
|
|
||||||
.text
|
.hidden SafeFetch32_impl
|
||||||
|
.hidden _SafeFetch32_fault
|
||||||
|
.hidden _SafeFetch32_continuation
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2022 SAP SE. All rights reserved.
|
# Copyright (c) 2022 SAP SE. All rights reserved.
|
||||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -28,7 +28,14 @@
|
|||||||
.globl _SafeFetch32_continuation
|
.globl _SafeFetch32_continuation
|
||||||
.globl _SafeFetchN_continuation
|
.globl _SafeFetchN_continuation
|
||||||
|
|
||||||
.text
|
.hidden SafeFetch32_impl
|
||||||
|
.hidden SafeFetchN_impl
|
||||||
|
.hidden _SafeFetch32_fault
|
||||||
|
.hidden _SafeFetchN_fault
|
||||||
|
.hidden _SafeFetch32_continuation
|
||||||
|
.hidden _SafeFetchN_continuation
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
|
||||||
# Support for int SafeFetch32(int* address, int defaultval);
|
# Support for int SafeFetch32(int* address, int defaultval);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
// Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
//
|
//
|
||||||
// This code is free software; you can redistribute it and/or modify it
|
// This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// archDesc.cpp - Internal format for architecture definition
|
// archDesc.cpp - Internal format for architecture definition
|
||||||
|
#include <unordered_set>
|
||||||
#include "adlc.hpp"
|
#include "adlc.hpp"
|
||||||
|
|
||||||
static FILE *errfile = stderr;
|
static FILE *errfile = stderr;
|
||||||
@@ -684,6 +685,98 @@ bool ArchDesc::verify() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MarkUsageFormClosure : public FormClosure {
|
||||||
|
private:
|
||||||
|
ArchDesc* _ad;
|
||||||
|
std::unordered_set<Form*> *_visited;
|
||||||
|
|
||||||
|
public:
|
||||||
|
MarkUsageFormClosure(ArchDesc* ad, std::unordered_set<Form*> *visit_map) {
|
||||||
|
_ad = ad;
|
||||||
|
_visited = visit_map;
|
||||||
|
}
|
||||||
|
virtual ~MarkUsageFormClosure() = default;
|
||||||
|
|
||||||
|
virtual void do_form(Form *form) {
|
||||||
|
if (_visited->find(form) == _visited->end()) {
|
||||||
|
_visited->insert(form);
|
||||||
|
form->forms_do(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void do_form_by_name(const char* name) {
|
||||||
|
const Form* form = _ad->globalNames()[name];
|
||||||
|
if (form) {
|
||||||
|
do_form(const_cast<Form*>(form));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RegisterForm* regs = _ad->get_registers();
|
||||||
|
if (regs->getRegClass(name)) {
|
||||||
|
do_form(regs->getRegClass(name));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// check unused operands
|
||||||
|
bool ArchDesc::check_usage() {
|
||||||
|
std::unordered_set<Form*> visited;
|
||||||
|
MarkUsageFormClosure callback(this, &visited);
|
||||||
|
_instructions.reset();
|
||||||
|
// iterate all instruction to mark used form
|
||||||
|
InstructForm* instr;
|
||||||
|
for ( ; (instr = (InstructForm*)_instructions.iter()) != nullptr; ) {
|
||||||
|
callback.do_form(instr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// these forms are coded in OperandForm::is_user_name_for_sReg
|
||||||
|
// it may happen no instruction use these operands, like stackSlotP in aarch64,
|
||||||
|
// but we can not desclare they are useless.
|
||||||
|
callback.do_form_by_name("stackSlotI");
|
||||||
|
callback.do_form_by_name("stackSlotP");
|
||||||
|
callback.do_form_by_name("stackSlotD");
|
||||||
|
callback.do_form_by_name("stackSlotF");
|
||||||
|
callback.do_form_by_name("stackSlotL");
|
||||||
|
|
||||||
|
// sReg* are initial created by adlc in ArchDesc::initBaseOpTypes()
|
||||||
|
// In ARM, no definition or usage in adfile, but they are reported as unused
|
||||||
|
callback.do_form_by_name("sRegI");
|
||||||
|
callback.do_form_by_name("sRegP");
|
||||||
|
callback.do_form_by_name("sRegD");
|
||||||
|
callback.do_form_by_name("sRegF");
|
||||||
|
callback.do_form_by_name("sRegL");
|
||||||
|
|
||||||
|
// special generic vector operands only used in Matcher::pd_specialize_generic_vector_operand
|
||||||
|
#if defined(AARCH64)
|
||||||
|
callback.do_form_by_name("vecA");
|
||||||
|
callback.do_form_by_name("vecD");
|
||||||
|
callback.do_form_by_name("vecX");
|
||||||
|
#elif defined(AMD64)
|
||||||
|
callback.do_form_by_name("vecS");
|
||||||
|
callback.do_form_by_name("vecD");
|
||||||
|
callback.do_form_by_name("vecX");
|
||||||
|
callback.do_form_by_name("vecY");
|
||||||
|
callback.do_form_by_name("vecZ");
|
||||||
|
callback.do_form_by_name("legVecS");
|
||||||
|
callback.do_form_by_name("legVecD");
|
||||||
|
callback.do_form_by_name("legVecX");
|
||||||
|
callback.do_form_by_name("legVecY");
|
||||||
|
callback.do_form_by_name("legVecZ");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int cnt = 0;
|
||||||
|
_operands.reset();
|
||||||
|
OperandForm* operand;
|
||||||
|
for ( ; (operand = (OperandForm*)_operands.iter()) != nullptr; ) {
|
||||||
|
if(visited.find(operand) == visited.end() && !operand->ideal_only()) {
|
||||||
|
fprintf(stderr, "\nWarning: unused operand (%s)", operand->_ident);
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cnt) fprintf(stderr, "\n-------Warning: total %d unused operands\n", cnt);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void ArchDesc::dump() {
|
void ArchDesc::dump() {
|
||||||
_pre_header.dump();
|
_pre_header.dump();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -226,6 +226,7 @@ public:
|
|||||||
inline void getForm(EncodeForm **ptr) { *ptr = _encode; }
|
inline void getForm(EncodeForm **ptr) { *ptr = _encode; }
|
||||||
|
|
||||||
bool verify();
|
bool verify();
|
||||||
|
bool check_usage();
|
||||||
void dump();
|
void dump();
|
||||||
|
|
||||||
// Helper utility that gets MatchList components from inside MatchRule
|
// Helper utility that gets MatchList components from inside MatchRule
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -362,6 +362,15 @@ void FormDict::dump() {
|
|||||||
_form.print(dumpkey, dumpform);
|
_form.print(dumpkey, dumpform);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormDict::forms_do(FormClosure* f) {;
|
||||||
|
DictI iter(&_form);
|
||||||
|
for( ; iter.test(); ++iter ) {
|
||||||
|
Form* form = (Form*) iter._value;
|
||||||
|
assert(form != nullptr, "sanity");
|
||||||
|
f->do_form(form);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------SourceForm-------------------------------------
|
//------------------------------SourceForm-------------------------------------
|
||||||
SourceForm::SourceForm(char* code) : _code(code) { }; // Constructor
|
SourceForm::SourceForm(char* code) : _code(code) { }; // Constructor
|
||||||
SourceForm::~SourceForm() {
|
SourceForm::~SourceForm() {
|
||||||
@@ -374,3 +383,11 @@ void SourceForm::dump() { // Debug printer
|
|||||||
void SourceForm::output(FILE *fp) {
|
void SourceForm::output(FILE *fp) {
|
||||||
fprintf(fp,"\n//%s\n%s\n",classname(),(_code?_code:""));
|
fprintf(fp,"\n//%s\n%s\n",classname(),(_code?_code:""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormClosure::do_form(Form* form) {
|
||||||
|
assert(false, "should not reach here");
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormClosure::do_form_by_name(const char* name) {
|
||||||
|
assert(false, "should not reach here");
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -58,6 +58,7 @@ class Flag;
|
|||||||
class RewriteRule;
|
class RewriteRule;
|
||||||
class ConstructRule;
|
class ConstructRule;
|
||||||
class FormatRule;
|
class FormatRule;
|
||||||
|
class FormClosure;
|
||||||
class Peephole;
|
class Peephole;
|
||||||
class EncClass;
|
class EncClass;
|
||||||
class Interface;
|
class Interface;
|
||||||
@@ -114,6 +115,8 @@ public:
|
|||||||
const Form *operator [](const char *name) const; // Do a lookup
|
const Form *operator [](const char *name) const; // Do a lookup
|
||||||
|
|
||||||
void dump();
|
void dump();
|
||||||
|
// iterate child forms recursively
|
||||||
|
void forms_do(FormClosure *f);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ***** Master Class for ADL Parser Forms *****
|
// ***** Master Class for ADL Parser Forms *****
|
||||||
@@ -163,6 +166,9 @@ public:
|
|||||||
// Write info to output files
|
// Write info to output files
|
||||||
virtual void output(FILE *fp) { fprintf(fp,"Form Output"); }
|
virtual void output(FILE *fp) { fprintf(fp,"Form Output"); }
|
||||||
|
|
||||||
|
// iterate child forms recursively
|
||||||
|
virtual void forms_do (FormClosure* f) { return; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// ADLC types, match the last character on ideal operands and instructions
|
// ADLC types, match the last character on ideal operands and instructions
|
||||||
enum DataType {
|
enum DataType {
|
||||||
@@ -255,6 +261,16 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class FormClosure {
|
||||||
|
public:
|
||||||
|
FormClosure() = default;
|
||||||
|
virtual ~FormClosure() = default;
|
||||||
|
|
||||||
|
virtual void do_form(Form* form);
|
||||||
|
virtual void do_form_by_name(const char* name);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//------------------------------FormList---------------------------------------
|
//------------------------------FormList---------------------------------------
|
||||||
class FormList {
|
class FormList {
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -198,6 +198,20 @@ void RegisterForm::output(FILE *fp) { // Write info to output files
|
|||||||
fprintf(fp,"-------------------- end RegisterForm --------------------\n");
|
fprintf(fp,"-------------------- end RegisterForm --------------------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RegisterForm::forms_do(FormClosure *f) {
|
||||||
|
const char *name = nullptr;
|
||||||
|
if (_current_ac) f->do_form(_current_ac);
|
||||||
|
for(_rdefs.reset(); (name = _rdefs.iter()) != nullptr;) {
|
||||||
|
f->do_form((RegDef*)_regDef[name]);
|
||||||
|
}
|
||||||
|
for (_rclasses.reset(); (name = _rclasses.iter()) != nullptr;) {
|
||||||
|
f->do_form((RegClass*)_regClass[name]);
|
||||||
|
}
|
||||||
|
for (_aclasses.reset(); (name = _aclasses.iter()) != nullptr;) {
|
||||||
|
f->do_form((AllocClass*)_allocClass[name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------RegDef-----------------------------------------
|
//------------------------------RegDef-----------------------------------------
|
||||||
// Constructor
|
// Constructor
|
||||||
RegDef::RegDef(char *regname, char *callconv, char *c_conv, char * idealtype, char * encode, char * concrete)
|
RegDef::RegDef(char *regname, char *callconv, char *c_conv, char * idealtype, char * encode, char * concrete)
|
||||||
@@ -322,6 +336,13 @@ void RegClass::output(FILE *fp) { // Write info to output files
|
|||||||
fprintf(fp,"--- done with entries for reg_class %s\n\n",_classid);
|
fprintf(fp,"--- done with entries for reg_class %s\n\n",_classid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RegClass::forms_do(FormClosure *f) {
|
||||||
|
const char *name = nullptr;
|
||||||
|
for( _regDefs.reset(); (name = _regDefs.iter()) != nullptr; ) {
|
||||||
|
f->do_form((RegDef*)_regDef[name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RegClass::declare_register_masks(FILE* fp) {
|
void RegClass::declare_register_masks(FILE* fp) {
|
||||||
const char* prefix = "";
|
const char* prefix = "";
|
||||||
const char* rc_name_to_upper = toUpper(_classid);
|
const char* rc_name_to_upper = toUpper(_classid);
|
||||||
@@ -436,6 +457,14 @@ void AllocClass::output(FILE *fp) { // Write info to output files
|
|||||||
fprintf(fp,"--- done with entries for alloc_class %s\n\n",_classid);
|
fprintf(fp,"--- done with entries for alloc_class %s\n\n",_classid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AllocClass::forms_do(FormClosure* f) {
|
||||||
|
const char *name;
|
||||||
|
for(_regDefs.reset(); (name = _regDefs.iter()) != nullptr;) {
|
||||||
|
f->do_form((RegDef*)_regDef[name]);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//==============================Frame Handling=================================
|
//==============================Frame Handling=================================
|
||||||
//------------------------------FrameForm--------------------------------------
|
//------------------------------FrameForm--------------------------------------
|
||||||
FrameForm::FrameForm() {
|
FrameForm::FrameForm() {
|
||||||
@@ -706,6 +735,15 @@ void Peephole::output(FILE *fp) { // Write info to output files
|
|||||||
if( _next ) _next->output(fp);
|
if( _next ) _next->output(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Peephole::forms_do(FormClosure *f) {
|
||||||
|
if (_predicate) f->do_form(_predicate);
|
||||||
|
if (_match) f->do_form(_match);
|
||||||
|
if (_procedure) f->do_form(_procedure);
|
||||||
|
if (_constraint) f->do_form(_constraint);
|
||||||
|
if (_replace) f->do_form(_replace);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------PeepPredicate------------------------------------
|
//----------------------------PeepPredicate------------------------------------
|
||||||
PeepPredicate::PeepPredicate(const char* rule) : _rule(rule) {
|
PeepPredicate::PeepPredicate(const char* rule) : _rule(rule) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -123,6 +123,7 @@ public:
|
|||||||
|
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------RegDef-----------------------------------------
|
//------------------------------RegDef-----------------------------------------
|
||||||
@@ -199,6 +200,7 @@ public:
|
|||||||
|
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
|
|
||||||
virtual bool has_stack_version() {
|
virtual bool has_stack_version() {
|
||||||
return _stack_or_reg;
|
return _stack_or_reg;
|
||||||
@@ -305,6 +307,11 @@ public:
|
|||||||
char* condition_code() {
|
char* condition_code() {
|
||||||
return _condition_code;
|
return _condition_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void forms_do(FormClosure* f) {
|
||||||
|
if (_rclasses[0]) f->do_form(_rclasses[0]);
|
||||||
|
if (_rclasses[1]) f->do_form(_rclasses[1]);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------AllocClass-------------------------------------
|
//------------------------------AllocClass-------------------------------------
|
||||||
@@ -325,6 +332,7 @@ public:
|
|||||||
|
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -568,6 +576,7 @@ public:
|
|||||||
|
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
class PeepPredicate : public Form {
|
class PeepPredicate : public Form {
|
||||||
|
|||||||
@@ -1498,6 +1498,24 @@ void InstructForm::output(FILE *fp) {
|
|||||||
if (_peephole) _peephole->output(fp);
|
if (_peephole) _peephole->output(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InstructForm::forms_do(FormClosure *f) {
|
||||||
|
if (_cisc_spill_alternate) f->do_form(_cisc_spill_alternate);
|
||||||
|
if (_short_branch_form) f->do_form(_short_branch_form);
|
||||||
|
_localNames.forms_do(f);
|
||||||
|
if (_matrule) f->do_form(_matrule);
|
||||||
|
if (_opcode) f->do_form(_opcode);
|
||||||
|
if (_insencode) f->do_form(_insencode);
|
||||||
|
if (_constant) f->do_form(_constant);
|
||||||
|
if (_attribs) f->do_form(_attribs);
|
||||||
|
if (_predicate) f->do_form(_predicate);
|
||||||
|
_effects.forms_do(f);
|
||||||
|
if (_exprule) f->do_form(_exprule);
|
||||||
|
if (_rewrule) f->do_form(_rewrule);
|
||||||
|
if (_format) f->do_form(_format);
|
||||||
|
if (_peephole) f->do_form(_peephole);
|
||||||
|
assert(_components.count() == 0, "skip components");
|
||||||
|
}
|
||||||
|
|
||||||
void MachNodeForm::dump() {
|
void MachNodeForm::dump() {
|
||||||
output(stderr);
|
output(stderr);
|
||||||
}
|
}
|
||||||
@@ -1615,6 +1633,14 @@ void EncodeForm::output(FILE *fp) { // Write info to output files
|
|||||||
}
|
}
|
||||||
fprintf(fp,"-------------------- end EncodeForm --------------------\n");
|
fprintf(fp,"-------------------- end EncodeForm --------------------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EncodeForm::forms_do(FormClosure* f) {
|
||||||
|
const char *name;
|
||||||
|
for (_eclasses.reset(); (name = _eclasses.iter()) != nullptr;) {
|
||||||
|
f->do_form((EncClass*)_encClass[name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------EncClass---------------------------------------
|
//------------------------------EncClass---------------------------------------
|
||||||
EncClass::EncClass(const char *name)
|
EncClass::EncClass(const char *name)
|
||||||
: _localNames(cmpstr,hashstr, Form::arena), _name(name) {
|
: _localNames(cmpstr,hashstr, Form::arena), _name(name) {
|
||||||
@@ -1705,6 +1731,15 @@ void EncClass::output(FILE *fp) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EncClass::forms_do(FormClosure *f) {
|
||||||
|
_parameter_type.reset();
|
||||||
|
const char *type = _parameter_type.iter();
|
||||||
|
for ( ; type != nullptr ; type = _parameter_type.iter() ) {
|
||||||
|
f->do_form_by_name(type);
|
||||||
|
}
|
||||||
|
_localNames.forms_do(f);
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------Opcode-----------------------------------------
|
//------------------------------Opcode-----------------------------------------
|
||||||
Opcode::Opcode(char *primary, char *secondary, char *tertiary)
|
Opcode::Opcode(char *primary, char *secondary, char *tertiary)
|
||||||
: _primary(primary), _secondary(secondary), _tertiary(tertiary) {
|
: _primary(primary), _secondary(secondary), _tertiary(tertiary) {
|
||||||
@@ -1835,6 +1870,15 @@ void InsEncode::output(FILE *fp) {
|
|||||||
fprintf(fp,"\n");
|
fprintf(fp,"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InsEncode::forms_do(FormClosure *f) {
|
||||||
|
_encoding.reset();
|
||||||
|
NameAndList *encoding = (NameAndList*)_encoding.iter();
|
||||||
|
for( ; encoding != nullptr; encoding = (NameAndList*)_encoding.iter() ) {
|
||||||
|
// just check name, other operands will be checked as instruction parameters
|
||||||
|
f->do_form_by_name(encoding->name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------Effect-----------------------------------------
|
//------------------------------Effect-----------------------------------------
|
||||||
static int effect_lookup(const char *name) {
|
static int effect_lookup(const char *name) {
|
||||||
if (!strcmp(name, "USE")) return Component::USE;
|
if (!strcmp(name, "USE")) return Component::USE;
|
||||||
@@ -1968,6 +2012,19 @@ void ExpandRule::output(FILE *fp) { // Write info to output files
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExpandRule::forms_do(FormClosure *f) {
|
||||||
|
NameAndList *expand_instr = nullptr;
|
||||||
|
// Iterate over the instructions 'node' expands into
|
||||||
|
for(reset_instructions(); (expand_instr = iter_instructions()) != nullptr; ) {
|
||||||
|
f->do_form_by_name(expand_instr->name());
|
||||||
|
}
|
||||||
|
_newopers.reset();
|
||||||
|
const char* oper = _newopers.iter();
|
||||||
|
for(; oper != nullptr; oper = _newopers.iter()) {
|
||||||
|
f->do_form_by_name(oper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------RewriteRule------------------------------------
|
//------------------------------RewriteRule------------------------------------
|
||||||
RewriteRule::RewriteRule(char* params, char* block)
|
RewriteRule::RewriteRule(char* params, char* block)
|
||||||
: _tempParams(params), _tempBlock(block) { }; // Constructor
|
: _tempParams(params), _tempBlock(block) { }; // Constructor
|
||||||
@@ -1984,6 +2041,12 @@ void RewriteRule::output(FILE *fp) { // Write info to output files
|
|||||||
(_tempBlock?_tempBlock:""));
|
(_tempBlock?_tempBlock:""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RewriteRule::forms_do(FormClosure *f) {
|
||||||
|
if (_condition) f->do_form(_condition);
|
||||||
|
if (_instrs) f->do_form(_instrs);
|
||||||
|
if (_opers) f->do_form(_opers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//==============================MachNodes======================================
|
//==============================MachNodes======================================
|
||||||
//------------------------------MachNodeForm-----------------------------------
|
//------------------------------MachNodeForm-----------------------------------
|
||||||
@@ -2066,6 +2129,13 @@ void OpClassForm::output(FILE *fp) {
|
|||||||
fprintf(fp,"\n");
|
fprintf(fp,"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OpClassForm::forms_do(FormClosure* f) {
|
||||||
|
const char *name;
|
||||||
|
for(_oplst.reset(); (name = _oplst.iter()) != nullptr;) {
|
||||||
|
f->do_form_by_name(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//==============================Operands=======================================
|
//==============================Operands=======================================
|
||||||
//------------------------------OperandForm------------------------------------
|
//------------------------------OperandForm------------------------------------
|
||||||
@@ -2691,6 +2761,22 @@ void OperandForm::output(FILE *fp) {
|
|||||||
if (_format) _format->dump();
|
if (_format) _format->dump();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OperandForm::forms_do(FormClosure* f) {
|
||||||
|
if (_matrule) f->do_form(_matrule);
|
||||||
|
if (_interface) f->do_form(_interface);
|
||||||
|
if (_attribs) f->do_form(_attribs);
|
||||||
|
if (_predicate) f->do_form(_predicate);
|
||||||
|
if (_constraint) f->do_form(_constraint);
|
||||||
|
if (_construct) f->do_form(_construct);
|
||||||
|
if (_format) f->do_form(_format);
|
||||||
|
_localNames.forms_do(f);
|
||||||
|
const char* opclass = nullptr;
|
||||||
|
for ( _classes.reset(); (opclass = _classes.iter()) != nullptr; ) {
|
||||||
|
f->do_form_by_name(opclass);
|
||||||
|
}
|
||||||
|
assert(_components.count() == 0, "skip _compnets");
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------Constraint-------------------------------------
|
//------------------------------Constraint-------------------------------------
|
||||||
Constraint::Constraint(const char *func, const char *arg)
|
Constraint::Constraint(const char *func, const char *arg)
|
||||||
: _func(func), _arg(arg) {
|
: _func(func), _arg(arg) {
|
||||||
@@ -2712,6 +2798,10 @@ void Constraint::output(FILE *fp) { // Write info to output files
|
|||||||
fprintf(fp,"Constraint: %s ( %s )\n", _func, _arg);
|
fprintf(fp,"Constraint: %s ( %s )\n", _func, _arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Constraint::forms_do(FormClosure *f) {
|
||||||
|
f->do_form_by_name(_arg);
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------Predicate--------------------------------------
|
//------------------------------Predicate--------------------------------------
|
||||||
Predicate::Predicate(char *pr)
|
Predicate::Predicate(char *pr)
|
||||||
: _pred(pr) {
|
: _pred(pr) {
|
||||||
@@ -3539,6 +3629,12 @@ void MatchNode::output(FILE *fp) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MatchNode::forms_do(FormClosure *f) {
|
||||||
|
f->do_form_by_name(_name);
|
||||||
|
if (_lChild) f->do_form(_lChild);
|
||||||
|
if (_rChild) f->do_form(_rChild);
|
||||||
|
}
|
||||||
|
|
||||||
int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
|
int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
|
||||||
static const char *needs_ideal_memory_list[] = {
|
static const char *needs_ideal_memory_list[] = {
|
||||||
"StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" ,
|
"StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" ,
|
||||||
@@ -3608,6 +3704,7 @@ int InstructForm::needs_base_oop_edge(FormDict &globals) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------cisc spilling methods-------------------------------
|
//-------------------------cisc spilling methods-------------------------------
|
||||||
// helper routines and methods for detecting cisc-spilling instructions
|
// helper routines and methods for detecting cisc-spilling instructions
|
||||||
//-------------------------cisc_spill_merge------------------------------------
|
//-------------------------cisc_spill_merge------------------------------------
|
||||||
@@ -4334,6 +4431,18 @@ void MatchRule::output(FILE *fp) {
|
|||||||
fprintf(fp,"\n");
|
fprintf(fp,"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MatchRule::forms_do(FormClosure* f) {
|
||||||
|
// keep sync with MatchNode::forms_do
|
||||||
|
f->do_form_by_name(_name);
|
||||||
|
if (_lChild) f->do_form(_lChild);
|
||||||
|
if (_rChild) f->do_form(_rChild);
|
||||||
|
|
||||||
|
// handle next rule
|
||||||
|
if (_next) {
|
||||||
|
f->do_form(_next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------Attribute--------------------------------------
|
//------------------------------Attribute--------------------------------------
|
||||||
Attribute::Attribute(char *id, char* val, int type)
|
Attribute::Attribute(char *id, char* val, int type)
|
||||||
: _ident(id), _val(val), _atype(type) {
|
: _ident(id), _val(val), _atype(type) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -310,6 +310,7 @@ public:
|
|||||||
|
|
||||||
virtual void dump(); // Debug printer
|
virtual void dump(); // Debug printer
|
||||||
virtual void output(FILE *fp); // Write to output files
|
virtual void output(FILE *fp); // Write to output files
|
||||||
|
virtual void forms_do(FormClosure *f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------EncodeForm-------------------------------------
|
//------------------------------EncodeForm-------------------------------------
|
||||||
@@ -333,6 +334,7 @@ public:
|
|||||||
|
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure *f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------EncClass---------------------------------------
|
//------------------------------EncClass---------------------------------------
|
||||||
@@ -377,6 +379,7 @@ public:
|
|||||||
bool verify();
|
bool verify();
|
||||||
void dump();
|
void dump();
|
||||||
void output(FILE *fp);
|
void output(FILE *fp);
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------MachNode---------------------------------------
|
//------------------------------MachNode---------------------------------------
|
||||||
@@ -468,6 +471,7 @@ public:
|
|||||||
|
|
||||||
void dump();
|
void dump();
|
||||||
void output(FILE *fp);
|
void output(FILE *fp);
|
||||||
|
virtual void forms_do(FormClosure *f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------Effect-----------------------------------------
|
//------------------------------Effect-----------------------------------------
|
||||||
@@ -515,6 +519,7 @@ public:
|
|||||||
|
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure *f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------Flag----------------------------------------
|
//---------------------------------Flag----------------------------------------
|
||||||
@@ -554,6 +559,7 @@ public:
|
|||||||
~RewriteRule(); // Destructor
|
~RewriteRule(); // Destructor
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -584,6 +590,7 @@ public:
|
|||||||
virtual bool ideal_only() const;
|
virtual bool ideal_only() const;
|
||||||
virtual void dump(); // Debug printer
|
virtual void dump(); // Debug printer
|
||||||
virtual void output(FILE *fp); // Write to output files
|
virtual void output(FILE *fp); // Write to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------OperandForm------------------------------------
|
//------------------------------OperandForm------------------------------------
|
||||||
@@ -711,6 +718,7 @@ public:
|
|||||||
|
|
||||||
virtual void dump(); // Debug printer
|
virtual void dump(); // Debug printer
|
||||||
virtual void output(FILE *fp); // Write to output files
|
virtual void output(FILE *fp); // Write to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------Constraint-------------------------------------
|
//------------------------------Constraint-------------------------------------
|
||||||
@@ -729,6 +737,7 @@ public:
|
|||||||
|
|
||||||
void dump(); // Debug printer
|
void dump(); // Debug printer
|
||||||
void output(FILE *fp); // Write info to output files
|
void output(FILE *fp); // Write info to output files
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------Predicate--------------------------------------
|
//------------------------------Predicate--------------------------------------
|
||||||
@@ -1014,6 +1023,7 @@ public:
|
|||||||
|
|
||||||
void dump();
|
void dump();
|
||||||
void output(FILE *fp);
|
void output(FILE *fp);
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------MatchRule--------------------------------------
|
//------------------------------MatchRule--------------------------------------
|
||||||
@@ -1075,6 +1085,7 @@ public:
|
|||||||
void dump();
|
void dump();
|
||||||
void output_short(FILE *fp);
|
void output_short(FILE *fp);
|
||||||
void output(FILE *fp);
|
void output(FILE *fp);
|
||||||
|
virtual void forms_do(FormClosure* f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------Attribute--------------------------------------
|
//------------------------------Attribute--------------------------------------
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -186,6 +186,9 @@ int main(int argc, char *argv[])
|
|||||||
// Verify that the results of the parse are consistent
|
// Verify that the results of the parse are consistent
|
||||||
AD.verify();
|
AD.verify();
|
||||||
|
|
||||||
|
// Check defined operands are used
|
||||||
|
AD.check_usage();
|
||||||
|
|
||||||
// Prepare to generate the result files:
|
// Prepare to generate the result files:
|
||||||
AD.generateMatchLists();
|
AD.generateMatchLists();
|
||||||
AD.identify_unique_operands();
|
AD.identify_unique_operands();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -306,22 +306,22 @@ void IR::eliminate_null_checks() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The functionality of this class is to insert a new block between
|
||||||
static int sort_pairs(BlockPair** a, BlockPair** b) {
|
// the 'from' and 'to' block of a critical edge.
|
||||||
if ((*a)->from() == (*b)->from()) {
|
// It first collects the block pairs, and then processes them.
|
||||||
return (*a)->to()->block_id() - (*b)->to()->block_id();
|
//
|
||||||
} else {
|
// Some instructions may introduce more than one edge between two blocks.
|
||||||
return (*a)->from()->block_id() - (*b)->from()->block_id();
|
// By checking if the current 'to' block sets critical_edge_split_flag
|
||||||
}
|
// (all new blocks set this flag) we can avoid repeated processing.
|
||||||
}
|
// This is why BlockPair contains the index rather than the original 'to' block.
|
||||||
|
|
||||||
|
|
||||||
class CriticalEdgeFinder: public BlockClosure {
|
class CriticalEdgeFinder: public BlockClosure {
|
||||||
BlockPairList blocks;
|
BlockPairList blocks;
|
||||||
IR* _ir;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CriticalEdgeFinder(IR* ir): _ir(ir) {}
|
CriticalEdgeFinder(IR* ir) {
|
||||||
|
ir->iterate_preorder(this);
|
||||||
|
}
|
||||||
|
|
||||||
void block_do(BlockBegin* bb) {
|
void block_do(BlockBegin* bb) {
|
||||||
BlockEnd* be = bb->end();
|
BlockEnd* be = bb->end();
|
||||||
int nos = be->number_of_sux();
|
int nos = be->number_of_sux();
|
||||||
@@ -329,20 +329,22 @@ class CriticalEdgeFinder: public BlockClosure {
|
|||||||
for (int i = 0; i < nos; i++) {
|
for (int i = 0; i < nos; i++) {
|
||||||
BlockBegin* sux = be->sux_at(i);
|
BlockBegin* sux = be->sux_at(i);
|
||||||
if (sux->number_of_preds() >= 2) {
|
if (sux->number_of_preds() >= 2) {
|
||||||
blocks.append(new BlockPair(bb, sux));
|
blocks.append(new BlockPair(bb, i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void split_edges() {
|
void split_edges() {
|
||||||
BlockPair* last_pair = nullptr;
|
|
||||||
blocks.sort(sort_pairs);
|
|
||||||
for (int i = 0; i < blocks.length(); i++) {
|
for (int i = 0; i < blocks.length(); i++) {
|
||||||
BlockPair* pair = blocks.at(i);
|
BlockPair* pair = blocks.at(i);
|
||||||
if (last_pair != nullptr && pair->is_same(last_pair)) continue;
|
|
||||||
BlockBegin* from = pair->from();
|
BlockBegin* from = pair->from();
|
||||||
BlockBegin* to = pair->to();
|
int index = pair->index();
|
||||||
|
BlockBegin* to = from->end()->sux_at(index);
|
||||||
|
if (to->is_set(BlockBegin::critical_edge_split_flag)) {
|
||||||
|
// inserted
|
||||||
|
continue;
|
||||||
|
}
|
||||||
BlockBegin* split = from->insert_block_between(to);
|
BlockBegin* split = from->insert_block_between(to);
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if ((PrintIR || PrintIR1) && Verbose) {
|
if ((PrintIR || PrintIR1) && Verbose) {
|
||||||
@@ -350,15 +352,12 @@ class CriticalEdgeFinder: public BlockClosure {
|
|||||||
from->block_id(), to->block_id(), split->block_id());
|
from->block_id(), to->block_id(), split->block_id());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
last_pair = pair;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void IR::split_critical_edges() {
|
void IR::split_critical_edges() {
|
||||||
CriticalEdgeFinder cef(this);
|
CriticalEdgeFinder cef(this);
|
||||||
|
|
||||||
iterate_preorder(&cef);
|
|
||||||
cef.split_edges();
|
cef.split_edges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -586,6 +586,8 @@ void BlockBegin::substitute_sux(BlockBegin* old_sux, BlockBegin* new_sux) {
|
|||||||
// of the inserted block, without recomputing the values of the other blocks
|
// of the inserted block, without recomputing the values of the other blocks
|
||||||
// in the CFG. Therefore the value of "depth_first_number" in BlockBegin becomes meaningless.
|
// in the CFG. Therefore the value of "depth_first_number" in BlockBegin becomes meaningless.
|
||||||
BlockBegin* BlockBegin::insert_block_between(BlockBegin* sux) {
|
BlockBegin* BlockBegin::insert_block_between(BlockBegin* sux) {
|
||||||
|
assert(!sux->is_set(critical_edge_split_flag), "sanity check");
|
||||||
|
|
||||||
int bci = sux->bci();
|
int bci = sux->bci();
|
||||||
// critical edge splitting may introduce a goto after a if and array
|
// critical edge splitting may introduce a goto after a if and array
|
||||||
// bound check elimination may insert a predicate between the if and
|
// bound check elimination may insert a predicate between the if and
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -2423,15 +2423,11 @@ LEAF(MemBar, Instruction)
|
|||||||
class BlockPair: public CompilationResourceObj {
|
class BlockPair: public CompilationResourceObj {
|
||||||
private:
|
private:
|
||||||
BlockBegin* _from;
|
BlockBegin* _from;
|
||||||
BlockBegin* _to;
|
int _index; // sux index of 'to' block
|
||||||
public:
|
public:
|
||||||
BlockPair(BlockBegin* from, BlockBegin* to): _from(from), _to(to) {}
|
BlockPair(BlockBegin* from, int index): _from(from), _index(index) {}
|
||||||
BlockBegin* from() const { return _from; }
|
BlockBegin* from() const { return _from; }
|
||||||
BlockBegin* to() const { return _to; }
|
int index() const { return _index; }
|
||||||
bool is_same(BlockBegin* from, BlockBegin* to) const { return _from == from && _to == to; }
|
|
||||||
bool is_same(BlockPair* p) const { return _from == p->from() && _to == p->to(); }
|
|
||||||
void set_to(BlockBegin* b) { _to = b; }
|
|
||||||
void set_from(BlockBegin* b) { _from = b; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef GrowableArray<BlockPair*> BlockPairList;
|
typedef GrowableArray<BlockPair*> BlockPairList;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
#if INCLUDE_G1GC
|
#if INCLUDE_G1GC
|
||||||
#include "gc/g1/g1CollectedHeap.hpp"
|
#include "gc/g1/g1CollectedHeap.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if INCLUDE_CDS_JAVA_HEAP
|
#if INCLUDE_CDS_JAVA_HEAP
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
#include "utilities/ostream.hpp"
|
#include "utilities/ostream.hpp"
|
||||||
#if INCLUDE_G1GC
|
#if INCLUDE_G1GC
|
||||||
#include "gc/g1/g1CollectedHeap.hpp"
|
#include "gc/g1/g1CollectedHeap.hpp"
|
||||||
#include "gc/g1/heapRegion.hpp"
|
#include "gc/g1/g1HeapRegion.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
|
|||||||
@@ -1327,6 +1327,9 @@ char* MetaspaceShared::reserve_address_space_for_archives(FileMapInfo* static_ma
|
|||||||
release_reserved_spaces(total_space_rs, archive_space_rs, class_space_rs);
|
release_reserved_spaces(total_space_rs, archive_space_rs, class_space_rs);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
// NMT: fix up the space tags
|
||||||
|
MemTracker::record_virtual_memory_type(archive_space_rs.base(), mtClassShared);
|
||||||
|
MemTracker::record_virtual_memory_type(class_space_rs.base(), mtClass);
|
||||||
} else {
|
} else {
|
||||||
if (use_archive_base_addr && base_address != nullptr) {
|
if (use_archive_base_addr && base_address != nullptr) {
|
||||||
total_space_rs = ReservedSpace(total_range_size, archive_space_alignment,
|
total_space_rs = ReservedSpace(total_range_size, archive_space_alignment,
|
||||||
@@ -1356,16 +1359,13 @@ char* MetaspaceShared::reserve_address_space_for_archives(FileMapInfo* static_ma
|
|||||||
(size_t)archive_space_alignment);
|
(size_t)archive_space_alignment);
|
||||||
class_space_rs = total_space_rs.last_part(ccs_begin_offset);
|
class_space_rs = total_space_rs.last_part(ccs_begin_offset);
|
||||||
MemTracker::record_virtual_memory_split_reserved(total_space_rs.base(), total_space_rs.size(),
|
MemTracker::record_virtual_memory_split_reserved(total_space_rs.base(), total_space_rs.size(),
|
||||||
ccs_begin_offset);
|
ccs_begin_offset, mtClassShared, mtClass);
|
||||||
}
|
}
|
||||||
assert(is_aligned(archive_space_rs.base(), archive_space_alignment), "Sanity");
|
assert(is_aligned(archive_space_rs.base(), archive_space_alignment), "Sanity");
|
||||||
assert(is_aligned(archive_space_rs.size(), archive_space_alignment), "Sanity");
|
assert(is_aligned(archive_space_rs.size(), archive_space_alignment), "Sanity");
|
||||||
assert(is_aligned(class_space_rs.base(), class_space_alignment), "Sanity");
|
assert(is_aligned(class_space_rs.base(), class_space_alignment), "Sanity");
|
||||||
assert(is_aligned(class_space_rs.size(), class_space_alignment), "Sanity");
|
assert(is_aligned(class_space_rs.size(), class_space_alignment), "Sanity");
|
||||||
|
|
||||||
// NMT: fix up the space tags
|
|
||||||
MemTracker::record_virtual_memory_type(archive_space_rs.base(), mtClassShared);
|
|
||||||
MemTracker::record_virtual_memory_type(class_space_rs.base(), mtClass);
|
|
||||||
|
|
||||||
return archive_space_rs.base();
|
return archive_space_rs.base();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2023, Red Hat, Inc. and/or its affiliates.
|
* Copyright (c) 2023, 2024, Red Hat, Inc. and/or its affiliates.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -42,11 +42,16 @@
|
|||||||
#include "utilities/ostream.hpp"
|
#include "utilities/ostream.hpp"
|
||||||
#include "utilities/nativeCallStack.hpp"
|
#include "utilities/nativeCallStack.hpp"
|
||||||
|
|
||||||
|
int CompilationFailureInfo::current_compile_id_or_0() {
|
||||||
|
ciEnv* env = ciEnv::current();
|
||||||
|
return (env != nullptr) ? env->compile_id() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
CompilationFailureInfo::CompilationFailureInfo(const char* failure_reason) :
|
CompilationFailureInfo::CompilationFailureInfo(const char* failure_reason) :
|
||||||
_stack(2),
|
_stack(2),
|
||||||
_failure_reason(os::strdup(failure_reason)),
|
_failure_reason(os::strdup(failure_reason)),
|
||||||
_elapsed_seconds(os::elapsedTime()),
|
_elapsed_seconds(os::elapsedTime()),
|
||||||
_compile_id(ciEnv::current()->task()->compile_id())
|
_compile_id(current_compile_id_or_0())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CompilationFailureInfo::~CompilationFailureInfo() {
|
CompilationFailureInfo::~CompilationFailureInfo() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2023, Red Hat, Inc. and/or its affiliates.
|
* Copyright (c) 2023, 2024, Red Hat, Inc. and/or its affiliates.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -40,6 +40,7 @@ class CompilationFailureInfo : public CHeapObj<mtCompiler> {
|
|||||||
char* const _failure_reason;
|
char* const _failure_reason;
|
||||||
const double _elapsed_seconds;
|
const double _elapsed_seconds;
|
||||||
const int _compile_id;
|
const int _compile_id;
|
||||||
|
static int current_compile_id_or_0();
|
||||||
public:
|
public:
|
||||||
CompilationFailureInfo(const char* failure_reason);
|
CompilationFailureInfo(const char* failure_reason);
|
||||||
~CompilationFailureInfo();
|
~CompilationFailureInfo();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user