FLAG_SET_*
macros can change more than one flag (in
diff --git a/doc/hotspot-unit-tests.md b/doc/hotspot-unit-tests.md
index e1222baa2e3a4..69a9530710987 100644
--- a/doc/hotspot-unit-tests.md
+++ b/doc/hotspot-unit-tests.md
@@ -106,7 +106,7 @@ Prefer having checks inside test code.
Not only does having test logic outside, e.g. verification method,
depending on asserts in product code contradict with several items
-above but also decreases test’s readability and stability. It is much
+above but also decreases test's readability and stability. It is much
easier to understand that a test is testing when all testing logic is
located inside a test or nearby in shared test libraries. As a rule of
thumb, the closer a check to a test, the better.
@@ -119,7 +119,7 @@ Prefer `EXPECT` over `ASSERT` if possible.
This is related to the [informativeness](#informativeness) property of
tests, information for other checks can help to better localize a
-defect’s root-cause. One should use `ASSERT` if it is impossible to
+defect's root-cause. One should use `ASSERT` if it is impossible to
continue test execution or if it does not make much sense. Later in
the text, `EXPECT` forms will be used to refer to both
`ASSERT/EXPECT`.
@@ -160,7 +160,7 @@ value of the difference between `v1` and `v2` is not greater than `eps`.
Use string special macros for C strings comparisons.
-`EXPECT_EQ` just compares pointers’ values, which is hardly what one
+`EXPECT_EQ` just compares pointers' values, which is hardly what one
wants comparing C strings. GoogleTest provides `EXPECT_STREQ` and
`EXPECT_STRNE` macros to compare C string contents. There are also
case-insensitive versions `EXPECT_STRCASEEQ`, `EXPECT_STRCASENE`.
@@ -226,7 +226,7 @@ subsystem, etc.
This naming scheme helps to find tests, filter them and simplifies
test failure analysis. For example, class `Foo` - test group `Foo`,
-compiler logging subsystem - test group `CompilerLogging`, G1 GC — test
+compiler logging subsystem - test group `CompilerLogging`, G1 GC - test
group `G1GC`, and so forth.
### Filename
@@ -287,7 +287,7 @@ Fixture classes should be named after tested classes, subsystems, etc
All test purpose friends should have either `Test` or `Testable` suffix.
-It greatly simplifies understanding of friendship’s purpose and allows
+It greatly simplifies understanding of friendship's purpose and allows
statically check that private members are not exposed unexpectedly.
Having `FooTest` as a friend of `Foo` without any comments will be
understood as a necessary evil to get testability.
@@ -397,7 +397,7 @@ and filter out inapplicable tests.
Restore changed flags.
It is quite common for tests to configure JVM in a certain way
-changing flags’ values. GoogleTest provides two ways to set up
+changing flags' values. GoogleTest provides two ways to set up
environment before a test and restore it afterward: using either
constructor and destructor or `SetUp` and `TearDown` functions. Both ways
require to use a test fixture class, which sometimes is too wordy. The
@@ -406,7 +406,7 @@ be used in such cases to restore/set values.
Caveats:
-* Changing a flag’s value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
+* Changing a flag's value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
* `FLAG_SET_*` macros can change more than one flag (in order to
maintain invariants) so it is hard to predict what flags will be
diff --git a/doc/testing.html b/doc/testing.html
index 6285fab1682e4..c1c0f15fed955 100644
--- a/doc/testing.html
+++ b/doc/testing.html
@@ -411,6 +411,13 @@
JCOV
special target jcov-test
instead of test
, e.g.
make jcov-test TEST=jdk_lang
. This will make sure the JCov
image is built, and that JCov reporting is enabled.
+To include JCov coverage for just a subset of all modules, you can
+use the --with-jcov-modules
arguments to
+configure
, e.g.
+--with-jcov-modules=jdk.compiler,java.desktop
.
+For more fine-grained control, you can pass arbitrary filters to JCov
+using --with-jcov-filters
, and you can specify a specific
+JDK to instrument using --with-jcov-input-jdk
.
The JCov report is stored in
build/$BUILD/test-results/jcov-output/report
.
Please note that running with JCov reporting can be very memory
diff --git a/doc/testing.md b/doc/testing.md
index 351690c5e601c..f6a25457b5eae 100644
--- a/doc/testing.md
+++ b/doc/testing.md
@@ -345,6 +345,14 @@ The simplest way to run tests with JCov coverage report is to use the special
target `jcov-test` instead of `test`, e.g. `make jcov-test TEST=jdk_lang`. This
will make sure the JCov image is built, and that JCov reporting is enabled.
+To include JCov coverage for just a subset of all modules, you can use the
+`--with-jcov-modules` arguments to `configure`, e.g.
+`--with-jcov-modules=jdk.compiler,java.desktop`.
+
+For more fine-grained control, you can pass arbitrary filters to JCov using
+`--with-jcov-filters`, and you can specify a specific JDK to instrument
+using `--with-jcov-input-jdk`.
+
The JCov report is stored in `build/$BUILD/test-results/jcov-output/report`.
Please note that running with JCov reporting can be very memory intensive.
diff --git a/make/Bundles.gmk b/make/Bundles.gmk
index 58950b5fb1f71..ba8ec0c864b0e 100644
--- a/make/Bundles.gmk
+++ b/make/Bundles.gmk
@@ -174,9 +174,11 @@ else
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
+ STATIC_JDK_BUNDLE_SUBDIR := static-jdk-$(VERSION_NUMBER)
ifneq ($(DEBUG_LEVEL), release)
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
+ STATIC_JDK_BUNDLE_SUBDIR := $(STATIC_JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
endif
# In certain situations, the JDK_IMAGE_DIR points to an image without the
# the symbols and demos. If so, the symobls and demos can be found in a
@@ -242,7 +244,10 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
)
JDK_SYMBOLS_BUNDLE_FILES := \
- $(call FindFiles, $(SYMBOLS_IMAGE_DIR))
+ $(filter-out \
+ %.stripped.pdb, \
+ $(call FindFiles, $(SYMBOLS_IMAGE_DIR)) \
+ )
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
$(ALL_JDK_DEMOS_FILES))
@@ -497,6 +502,21 @@ ifneq ($(filter static-libs-graal-bundles, $(MAKECMDGOALS)), )
STATIC_LIBS_GRAAL_TARGETS += $(BUILD_STATIC_LIBS_GRAAL_BUNDLE)
endif
+#################################################################################
+
+ifneq ($(filter static-jdk-bundles, $(MAKECMDGOALS)), )
+ STATIC_JDK_BUNDLE_FILES := $(call FindFiles, $(STATIC_JDK_IMAGE_DIR))
+
+ $(eval $(call SetupBundleFile, BUILD_STATIC_JDK_BUNDLE, \
+ BUNDLE_NAME := $(STATIC_JDK_BUNDLE_NAME), \
+ FILES := $(STATIC_JDK_BUNDLE_FILES), \
+ BASE_DIRS := $(STATIC_JDK_IMAGE_DIR), \
+ SUBDIR := $(STATIC_JDK_BUNDLE_SUBDIR), \
+ ))
+
+ STATIC_JDK_TARGETS += $(BUILD_STATIC_JDK_BUNDLE)
+endif
+
################################################################################
product-bundles: $(PRODUCT_TARGETS)
@@ -507,11 +527,12 @@ docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
static-libs-bundles: $(STATIC_LIBS_TARGETS)
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
+static-jdk-bundles: $(STATIC_JDK_TARGETS)
jcov-bundles: $(JCOV_TARGETS)
.PHONY: product-bundles test-bundles \
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
- static-libs-bundles static-libs-graal-bundles jcov-bundles
+ static-libs-bundles static-libs-graal-bundles static-jdk-bundles jcov-bundles
################################################################################
diff --git a/make/CompileInterimLangtools.gmk b/make/CompileInterimLangtools.gmk
index c869ea160c76d..4a2bbaec5b854 100644
--- a/make/CompileInterimLangtools.gmk
+++ b/make/CompileInterimLangtools.gmk
@@ -95,7 +95,7 @@ define SetupInterimModule
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
$(TOPDIR)/src/$1/share/classes, \
- EXCLUDES := sun javax/tools/snippet-files, \
+ EXCLUDES := sun, \
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
@@ -103,6 +103,7 @@ define SetupInterimModule
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryModuleFinder.java \
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/SourceLauncher.java \
Standard.java, \
+ EXCLUDE_PATTERNS := -files, \
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
$($1.interim_EXTRA_FILES), \
COPY := .gif .png .xml .css .svg .js .js.template .txt .woff .woff2 javax.tools.JavaCompilerTool, \
diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk
index b4a193dfadee6..1e26fb2b529cc 100644
--- a/make/CompileJavaModules.gmk
+++ b/make/CompileJavaModules.gmk
@@ -113,6 +113,7 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
DISABLED_WARNINGS := $(DISABLED_WARNINGS_java), \
EXCLUDES := $(EXCLUDES), \
EXCLUDE_FILES := $(EXCLUDE_FILES), \
+ EXCLUDE_PATTERNS := -files, \
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
JAVAC_FLAGS := \
$(DOCLINT) \
diff --git a/make/Coverage.gmk b/make/Coverage.gmk
index 2fd4e4ec6d454..a375c343185e8 100644
--- a/make/Coverage.gmk
+++ b/make/Coverage.gmk
@@ -34,21 +34,28 @@ else
JCOV_INPUT_IMAGE_DIR := $(JDK_IMAGE_DIR)
endif
+JCOV_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/jcov
+
#moving instrumented jdk image in and out of jcov_temp because of CODETOOLS-7902299
-JCOV_TEMP := $(SUPPORT_OUTPUTDIR)/jcov_temp
+JCOV_TEMP := $(JCOV_SUPPORT_DIR)/temp
+
+ifneq ($(JCOV_MODULES), )
+ JCOV_MODULES_FILTER := $(foreach m, $(JCOV_MODULES), -include_module $m)
+endif
$(JCOV_IMAGE_DIR)/release: $(JCOV_INPUT_IMAGE_DIR)/release
$(call LogWarn, Creating instrumented jdk image with JCov)
$(call MakeDir, $(JCOV_TEMP) $(IMAGES_OUTPUTDIR))
$(RM) -r $(JCOV_IMAGE_DIR) $(JCOV_TEMP)/*
$(CP) -r $(JCOV_INPUT_IMAGE_DIR) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
- $(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
+ $(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov, \
+ $(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
-t $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)/template.xml \
-rt $(JCOV_HOME)/lib/jcov_network_saver.jar \
-exclude 'java.lang.Object' \
-exclude jdk.test.Main -exclude '**\$Proxy*' \
- $(JCOV_FILTERS) \
- $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
+ $(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
+ $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR))
$(MV) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR) $(JCOV_IMAGE_DIR)
$(RMDIR) $(JCOV_TEMP)
diff --git a/make/Docs.gmk b/make/Docs.gmk
index 5c67393fb6615..4733b22b1ad4c 100644
--- a/make/Docs.gmk
+++ b/make/Docs.gmk
@@ -79,6 +79,8 @@ JAVADOC_TAGS := \
-tag see \
-taglet build.tools.taglet.ExtLink \
-taglet build.tools.taglet.Incubating \
+ -taglet build.tools.taglet.PreviewNote \
+ --preview-note-tag previewNote \
-tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
$(CUSTOM_JAVADOC_TAGS) \
#
@@ -92,20 +94,16 @@ REFERENCE_TAGS := $(JAVADOC_TAGS)
JAVADOC_DISABLED_DOCLINT_WARNINGS := missing
JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
-# Allow overriding on the command line
-# (intentionally sharing name with the javac option)
-JAVA_WARNINGS_ARE_ERRORS ?= -Werror
-
# The initial set of options for javadoc
JAVADOC_OPTIONS := -use -keywords -notimestamp \
- -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
+ -serialwarn -encoding utf-8 -docencoding utf-8 -breakiterator \
-splitIndex --system none -javafx --expand-requires transitive \
- --override-methods=summary
+ --override-methods=summary --syntax-highlight
# The reference options must stay stable to allow for comparisons across the
# development cycle.
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
- -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
+ -serialwarn -encoding utf-8 -breakiterator -splitIndex --system none \
-html5 -javafx --expand-requires transitive
# Should we add DRAFT stamps to the generated javadoc?
@@ -264,7 +262,7 @@ define create_overview_file
$$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
$$(call LogInfo, Creating overview.html for $1)
$$(call MakeDir, $$(@D))
- $$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)'
+ $$(PRINTF) "%s" '$$($1_OVERVIEW_TEXT)' > $$@
endef
################################################################################
@@ -322,7 +320,9 @@ define SetupApiDocsGenerationBody
# Ignore the doclint warnings in certain packages
$1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$(addprefix -, \
$$(JAVADOC_DISABLED_DOCLINT_PACKAGES)))
- $1_OPTIONS += $$(JAVA_WARNINGS_ARE_ERRORS)
+ ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
+ $1_OPTIONS += -Werror
+ endif
$1_DOC_TITLE := $$($1_LONG_NAME) Version $$(VERSION_SPECIFICATION) API \
Specification
@@ -673,7 +673,7 @@ ifeq ($(ENABLE_PANDOC), true)
$(foreach m, $(ALL_MODULES), \
$(eval MAN_$m := $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, \
- $(call FindModuleManDirs, $m))))) \
+ $(call FindModuleManDirsForDocs, $m))))) \
$(if $(MAN_$m), \
$(eval $(call SetupProcessMarkdown, MAN_TO_HTML_$m, \
FILES := $(MAN_$m), \
diff --git a/make/RunTestsPrebuiltFindTests.gmk b/make/GenerateFindTests.gmk
similarity index 100%
rename from make/RunTestsPrebuiltFindTests.gmk
rename to make/GenerateFindTests.gmk
diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk
index 5fc745ba223f4..1f52b88e1ef77 100644
--- a/make/GenerateLinkOptData.gmk
+++ b/make/GenerateLinkOptData.gmk
@@ -76,10 +76,12 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
$(CLASSLIST_FILE_VM_OPTS) \
+ -Xlog:cds=off \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
$(GREP) -v HelloClasslist $@.raw > $@.interim
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
+ -Xlog:cds=off \
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
-Xmx128M -Xms128M $(LOG_INFO)
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw.2 \
@@ -87,6 +89,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
$(CLASSLIST_FILE_VM_OPTS) \
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
+ -Xlog:cds=off \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist \
2> $(LINK_OPT_DIR)/stderr > $(JLI_TRACE_FILE) \
@@ -100,6 +103,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
$(GREP) -v @cp $@.raw.3 > $@.raw.4
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
+ -Xlog:cds=off \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.SortClasslist $@.raw.4 > $@
diff --git a/make/Images.gmk b/make/Images.gmk
index 6c859fce7a543..3f2b34bc9c696 100644
--- a/make/Images.gmk
+++ b/make/Images.gmk
@@ -97,6 +97,10 @@ ifeq ($(JLINK_PRODUCE_LINKABLE_RUNTIME), true)
JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime
endif
+ifneq ($(JLINK_USER_EXTRA_FLAGS), )
+ JLINK_JDK_EXTRA_OPTS += $(JLINK_USER_EXTRA_FLAGS)
+endif
+
$(eval $(call SetupExecute, jlink_jdk, \
WARN := Creating jdk image, \
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \
diff --git a/make/Init.gmk b/make/Init.gmk
index 6da2fb985b62f..5dd1a71dd9a45 100644
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -37,11 +37,9 @@ include MakeFileStart.gmk
include $(TOPDIR)/make/InitSupport.gmk
include LogUtils.gmk
-# Force early generation of module-deps.gmk and find-tests.gmk
+# Force early generation of module-deps.gmk
GENERATE_MODULE_DEPS_FILE := true
include Modules.gmk
-GENERATE_FIND_TESTS_FILE := true
-include FindTests.gmk
# Inclusion of this pseudo-target will cause make to execute this file
# serially, regardless of -j.
@@ -139,7 +137,7 @@ main: MAKEOVERRIDES :=
main: $(INIT_TARGETS)
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
$(call RotateLogFiles)
- $(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
+ $(ECHO) "Building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
ifneq ($(SEQUENTIAL_TARGETS), )
# Don't touch build output dir since we might be cleaning. That
# means no log pipe.
@@ -160,7 +158,8 @@ main: $(INIT_TARGETS)
-f make/Main.gmk $(USER_MAKE_VARS) \
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
( exitcode=$$? && \
- $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \
+ $(ECHO) "" $(BUILD_LOG_PIPE_SIMPLE) && \
+ $(ECHO) "ERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode)" \
$(BUILD_LOG_PIPE_SIMPLE) && \
cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \
on-failure ; \
@@ -172,7 +171,7 @@ main: $(INIT_TARGETS)
if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
exit 1 ; \
fi
- $(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
+ $(ECHO) "Finished building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
$(call ReportProfileTimes)
endif
@@ -183,7 +182,8 @@ on-failure:
$(call PrintFailureReports)
$(call PrintBuildLogFailures)
$(call ReportProfileTimes)
- $(PRINTF) "HELP: Run 'make doctor' to diagnose build problems.\n\n"
+ $(ECHO) "HELP: Run 'make doctor' to diagnose build problems."
+ $(ECHO) ""
ifneq ($(COMPARE_BUILD), )
$(call CleanupCompareBuild)
endif
diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk
index a9af44e4225b1..809d1128692a9 100644
--- a/make/InitSupport.gmk
+++ b/make/InitSupport.gmk
@@ -173,9 +173,10 @@ define PrintFailureReports
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
( \
- $(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ; \
+ $(ECHO) "" ; \
+ $(ECHO) "=== Output from failing command(s) repeated here ===" ; \
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
- $(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
+ $(ECHO) "* For target $(notdir $(basename $(logfile))):" ; \
$(if $(filter all, $(LOG_REPORT)), \
$(GREP) -v -e "^Note: including file:" < $(logfile) || true ; \
, \
@@ -185,8 +186,9 @@ define PrintFailureReports
fi ; \
) \
) \
- $(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
- $(PRINTF) "=== End of repeated output ===\n" ; \
+ $(ECHO) "" ; \
+ $(ECHO) "* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs." ; \
+ $(ECHO) "=== End of repeated output ===" ; \
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
) \
)
@@ -195,13 +197,16 @@ endef
define PrintBuildLogFailures
$(if $(filter none, $(LOG_REPORT)), , \
if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \
- $(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
+ $(ECHO) "" ; \
+ $(ECHO) "=== Make failed targets repeated here ===" ; \
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
- $(PRINTF) "=== End of repeated output ===\n" ; \
- $(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
+ $(ECHO) "=== End of repeated output ===" ; \
+ $(ECHO) "" ; \
+ $(ECHO) "HELP: Try searching the build log for the name of the first failed target." ; \
else \
- $(PRINTF) "\nNo indication of failed target found.\n" ; \
- $(PRINTF) "HELP: Try searching the build log for '] Error'.\n" ; \
+ $(ECHO) "" ; \
+ $(ECHO) "No indication of failed target found." ; \
+ $(ECHO) "HELP: Try searching the build log for '] Error'." ; \
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
)
diff --git a/make/Main.gmk b/make/Main.gmk
index 4690139e6adff..3535ad16aae3d 100644
--- a/make/Main.gmk
+++ b/make/Main.gmk
@@ -753,6 +753,17 @@ $(eval $(call SetupTarget, test-image-lib, \
DEPS := build-test-lib, \
))
+$(eval $(call SetupTarget, build-test-setup-aot, \
+ MAKEFILE := test/BuildTestSetupAOT, \
+ DEPS := interim-langtools exploded-image, \
+))
+
+$(eval $(call SetupTarget, test-image-setup-aot, \
+ MAKEFILE := test/BuildTestSetupAOT, \
+ TARGET := images, \
+ DEPS := build-test-setup-aot, \
+))
+
ifeq ($(BUILD_FAILURE_HANDLER), true)
# Builds the failure handler jtreg extension
$(eval $(call SetupTarget, build-test-failure-handler, \
@@ -864,6 +875,12 @@ $(eval $(call SetupTarget, static-libs-graal-bundles, \
DEPS := static-libs-graal-image, \
))
+$(eval $(call SetupTarget, static-jdk-bundles, \
+ MAKEFILE := Bundles, \
+ TARGET := static-jdk-bundles, \
+ DEPS := static-jdk-image, \
+))
+
ifeq ($(JCOV_ENABLED), true)
$(eval $(call SetupTarget, jcov-bundles, \
MAKEFILE := Bundles, \
@@ -1281,7 +1298,8 @@ all-docs-bundles: docs-jdk-bundles docs-javase-bundles docs-reference-bundles
# This target builds the test image
test-image: prepare-test-image test-image-jdk-jtreg-native \
test-image-demos-jdk test-image-libtest-jtreg-native \
- test-image-lib test-image-lib-native
+ test-image-lib test-image-lib-native \
+ test-image-setup-aot
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
@@ -1309,10 +1327,7 @@ endif
################################################################################
# all-images builds all our deliverables as images.
-all-images: product-images test-image all-docs-images
-ifeq ($(call isTargetOs, linux macosx windows), true)
- all-images: static-jdk-image
-endif
+all-images: product-images static-jdk-image test-image all-docs-images
# all-bundles packages all our deliverables as tar.gz bundles.
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk
index f7ba4de2d53c5..d8dc894c1e983 100644
--- a/make/MainSupport.gmk
+++ b/make/MainSupport.gmk
@@ -58,76 +58,76 @@ endef
define CleanDocs
@$(PRINTF) "Cleaning docs ..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
$(RM) -r $(SUPPORT_OUTPUTDIR)/javadoc
$(RM) -r $(IMAGES_OUTPUTDIR)/docs
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
# Cleans the dir given as $1
define CleanDir
- @$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
+ @$(ECHO) "" $(LOG_DEBUG)
($(CD) $(OUTPUTDIR) && $(RM) -r $1)
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define CleanSupportDir
- @$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/$(strip $1)
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define CleanMakeSupportDir
- @$(PRINTF) "Cleaning $(strip $1) make support artifacts ..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning %s make support artifacts ..." "$(strip $1)"
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/$(strip $1)
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define CleanTest
- @$(PRINTF) "Cleaning test $(strip $1) ..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning test %s ..." "$(strip $1)"
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
# Remove as much of the test directory structure as is empty
$(RMDIR) -p $(dir $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))) 2> /dev/null || true
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define Clean-gensrc
- @$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning gensrc %s..." "$(if $1,for $(strip $1) )"
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define Clean-java
- @$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning java %s..." "$(if $1,for $(strip $1) )"
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
$(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
- $(PRINTF) " done\n"
- $(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
+ $(ECHO) " done"
+ $(PRINTF) "Cleaning headers %s..." "$(if $1,for $(strip $1) )"
$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define Clean-native
- @$(PRINTF) "Cleaning native $(if $1,for $(strip $1) )..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning native %s..." "$(if $1,for $(strip $1) )"
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define Clean-include
- @$(PRINTF) "Cleaning include $(if $1,for $(strip $1) )..."
- @$(PRINTF) "\n" $(LOG_DEBUG)
+ @$(PRINTF) "Cleaning include %s..." "$(if $1,for $(strip $1) )"
+ @$(ECHO) "" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
- @$(PRINTF) " done\n"
+ @$(ECHO) " done"
endef
define CleanModule
diff --git a/make/PreInit.gmk b/make/PreInit.gmk
index b4c0402da3dfb..bce61ccde5f52 100644
--- a/make/PreInit.gmk
+++ b/make/PreInit.gmk
@@ -48,6 +48,10 @@ include $(TOPDIR)/make/common/LogUtils.gmk
# a configuration. This will define ALL_GLOBAL_TARGETS.
include $(TOPDIR)/make/Global.gmk
+# Targets provided by Init.gmk.
+ALL_INIT_TARGETS := print-modules print-targets print-configuration \
+ print-tests reconfigure pre-compare-build post-compare-build
+
# CALLED_TARGETS is the list of targets that the user provided,
# or "default" if unspecified.
CALLED_TARGETS := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), default)
@@ -75,7 +79,6 @@ ifneq ($(SKIP_SPEC), true)
# Basic checks on environment and command line.
$(eval $(call CheckControlVariables))
- $(eval $(call CheckDeprecatedEnvironment))
$(eval $(call CheckInvalidMakeFlags))
# Check that CONF_CHECK is valid.
@@ -94,10 +97,6 @@ ifneq ($(SKIP_SPEC), true)
# This will setup ALL_MAIN_TARGETS.
$(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
- # Targets provided by Init.gmk.
- ALL_INIT_TARGETS := print-modules print-targets print-configuration \
- print-tests reconfigure pre-compare-build post-compare-build
-
# Separate called targets depending on type.
INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))
@@ -162,19 +161,19 @@ ifneq ($(SKIP_SPEC), true)
( cd $(TOPDIR) && \
$(foreach spec, $(SPECS), \
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
- SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
- main && \
+ SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
+ $(MAKE_INIT_MAIN_TARGET_ARGS) main && \
$(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
- SPEC=$(spec) \
+ SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
COMPARE_BUILD="$(COMPARE_BUILD)" \
pre-compare-build && \
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
- SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
+ SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
- main && \
+ $(MAKE_INIT_MAIN_TARGET_ARGS) main && \
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
- SPEC=$(spec) \
+ SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
post-compare-build && \
) \
diff --git a/make/PreInitSupport.gmk b/make/PreInitSupport.gmk
index c3741589330c9..1d3c3ce913519 100644
--- a/make/PreInitSupport.gmk
+++ b/make/PreInitSupport.gmk
@@ -94,18 +94,6 @@ define CheckControlVariables
endif
endef
-# Check for deprecated ALT_ variables
-define CheckDeprecatedEnvironment
- defined_alt_variables := $$(filter ALT_%, $$(.VARIABLES))
- ifneq ($$(defined_alt_variables), )
- $$(info Warning: You have the following ALT_ variables set:)
- $$(foreach var, $$(defined_alt_variables), $$(info * $$(var)=$$($$(var))))
- $$(info ALT_ variables are deprecated, and may result in a failed build.)
- $$(info Please clean your environment.)
- $$(info )
- endif
-endef
-
# Check for invalid make flags like -j
define CheckInvalidMakeFlags
# This is a trick to get this rule to execute before any other rules
@@ -262,13 +250,14 @@ endef
# Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
# Param 2: The SPEC file to use.
define DefineMainTargets
+ SPEC_FILE := $(strip $2)
# We will start by making sure the main-targets.gmk file is removed, if
# make has not been restarted. By the -include, we will trigger the
# rule for generating the file (which is never there since we removed it),
# thus generating it fresh, and make will restart, incrementing the restart
# count.
- main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk
+ main_targets_file := $$(dir $$(SPEC_FILE))make-support/main-targets.gmk
ifeq ($$(MAKE_RESTARTS), )
# Only do this if make has not been restarted, and if we do not force it.
@@ -279,8 +268,11 @@ define DefineMainTargets
$$(main_targets_file):
@( cd $$(TOPDIR) && \
+ $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
+ -I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR))
+ @( cd $$(TOPDIR) && \
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \
- -I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \
+ -I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR) NO_RECIPES=true \
$$(MAKE_LOG_VARS) \
create-main-targets-include )
diff --git a/make/RunTests.gmk b/make/RunTests.gmk
index 3e20de3f82ed0..3c0280353a9ae 100644
--- a/make/RunTests.gmk
+++ b/make/RunTests.gmk
@@ -75,9 +75,6 @@ endif
# This is the JDK that we will test
JDK_UNDER_TEST := $(JDK_IMAGE_DIR)
-# The JDK used to compile jtreg test code. By default it is the same as
-# JDK_UNDER_TEST.
-JDK_FOR_COMPILE := $(JDK_IMAGE_DIR)
TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results
TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support
@@ -118,6 +115,7 @@ JTREG_COV_OPTIONS :=
ifeq ($(TEST_OPTS_JCOV), true)
JCOV_OUTPUT_DIR := $(TEST_RESULTS_DIR)/jcov-output
+ JCOV_SUPPORT_DIR := $(TEST_SUPPORT_DIR)/jcov-support
JCOV_GRABBER_LOG := $(JCOV_OUTPUT_DIR)/grabber.log
JCOV_RESULT_FILE := $(JCOV_OUTPUT_DIR)/result.xml
JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report
@@ -530,21 +528,33 @@ define SetupRunGtestTestBody
$$(call LogWarn, Test report is stored in $$(strip \
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
$$(if $$(wildcard $$($1_RESULT_FILE)), \
- $$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \
- test (cases?|suites?) ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \
- $$(if $$($1_TOTAL), , $$(eval $1_TOTAL := 0)) \
+ $$(eval $1_RUN := $$(shell $$(AWK) \
+ '/==========.* tests? from .* test (cases?|suites?) ran/ { print $$$$2 }' \
+ $$($1_RESULT_FILE))) \
+ $$(if $$($1_RUN), , $$(eval $1_RUN := 0)) \
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \
{ print $$$$4 }' $$($1_RESULT_FILE))) \
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
+ $$(eval $1_GTEST_DISABLED := $$(shell $$(AWK) '/YOU HAVE .* DISABLED TEST/ \
+ { print $$$$3 }' $$($1_RESULT_FILE))) \
+ $$(if $$($1_GTEST_DISABLED), , $$(eval $1_GTEST_DISABLED := 0)) \
+ $$(eval $1_GTEST_SKIPPED := $$(shell $$(AWK) '/\[ SKIPPED \] .* tests?.*/ \
+ { print $$$$4 }' $$($1_RESULT_FILE))) \
+ $$(if $$($1_GTEST_SKIPPED), , $$(eval $1_GTEST_SKIPPED := 0)) \
+ $$(eval $1_SKIPPED := $$(shell \
+ $$(EXPR) $$($1_GTEST_DISABLED) + $$($1_GTEST_SKIPPED))) \
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) \
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
$$(eval $1_ERROR := $$(shell \
- $$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) \
+ $$(EXPR) $$($1_RUN) - $$($1_PASSED) - $$($1_FAILED) - $$($1_GTEST_SKIPPED))) \
+ $$(eval $1_TOTAL := $$(shell \
+ $$(EXPR) $$($1_RUN) + $$($1_GTEST_DISABLED))) \
, \
$$(eval $1_PASSED := 0) \
$$(eval $1_FAILED := 0) \
$$(eval $1_ERROR := 1) \
+ $$(eval $1_SKIPPED := 0) \
$$(eval $1_TOTAL := 1) \
)
@@ -668,6 +678,7 @@ define SetupRunMicroTestBody
$$(eval $1_ERROR := 1) \
$$(eval $1_TOTAL := 1) \
)
+ $$(eval $1_SKIPPED := 0)
$1: run-test-$1 parse-test-$1
@@ -703,6 +714,9 @@ define SetJtregValue
endif
endef
+################################################################################
+# Helper function for creating a customized AOT cache for running tests
+################################################################################
# Parameter 1 is the name of the rule.
#
@@ -713,48 +727,50 @@ endef
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
#
-SetupAot = $(NamedParamsMacroTemplate)
-define SetupAotBody
- $1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
- $1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache
-
- $1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))
+SetupAOT = $(NamedParamsMacroTemplate)
+define SetupAOTBody
+ $1_AOT_JDK_OUTPUT_DIR := $$($1_TEST_SUPPORT_DIR)/aot
+ $1_AOT_JDK_CONF := $$($1_AOT_JDK_OUTPUT_DIR)/jdk.aotconf
+ $1_AOT_JDK_CACHE := $$($1_AOT_JDK_OUTPUT_DIR)/jdk.aotcache
+ $1_AOT_JDK_LOG := $$($1_AOT_JDK_OUTPUT_DIR)/TestSetupAOT.log
+
+ # We execute the training run with the TestSetupAOT class from $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar
+ # to touch a fair number of classes inside the JDK. Note that we can't specify a classpath,
+ # or else the AOT cache cannot be used with jtreg test cases that use a different value
+ # for their classpaths. Instead, we cd in the $$($1_AOT_JDK_OUTPUT_DIR) directory,
+ # extract the TestSetupAOT.jar there, and run in that directory without specifying a classpath.
+ # The "java" launcher will have an implicit classpath of ".", so it can pick up the TestSetupAOT
+ # class from the JVM's current directory.
+ #
+ # The TestSetupAOT class (or any other classes that are loaded from ".") will be excluded
+ # from the the AOT cache as "." is an unsupported location. As a result, the AOT cache will contain
+ # only classes from the JDK.
$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
- $$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)
-
- $(foreach jtool, javac javap jlink jar, \
- $(info AOT: Create cache configuration for $(jtool)) \
- $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
- $$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
- -J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
- ))
- )
-
- $$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
- $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
- $$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
+ $$(call MakeDir, $$($1_AOT_JDK_OUTPUT_DIR))
+
+ $$(call LogWarn, AOT: Create cache configuration) \
+ $$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
+ cd $$($1_AOT_JDK_OUTPUT_DIR); \
+ $(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
+ $$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
+ -Xlog:class+load,cds,cds+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error \
+ -XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
+ TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
))
- $$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
- $$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
- $(SED) -e 's/id:.*//g' | uniq \
- > $$($1_AOT_JDK_CONF)
- $$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
- >> $$($1_AOT_JDK_CONF)
-
- $$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
- $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
- $$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
- $$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
- -XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
+ $$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
+ $$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
+ $$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
+ $$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error \
+ -XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
+ -XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
))
$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)
endef
-
SetupRunJtregTest = $(NamedParamsMacroTemplate)
define SetupRunJtregTestBody
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
@@ -914,6 +930,11 @@ define SetupRunJtregTestBody
JTREG_AUTO_PROBLEM_LISTS += ProblemList-shenandoah.txt
endif
+ ifneq ($$(findstring --enable-preview, $$(JTREG_ALL_OPTIONS)), )
+ JTREG_AUTO_PROBLEM_LISTS += ProblemList-enable-preview.txt
+ endif
+
+
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
# Accept both absolute paths as well as relative to the current test root.
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
@@ -926,6 +947,11 @@ define SetupRunJtregTestBody
$1_JTREG_BASIC_OPTIONS += -e:JIB_HOME=$$(JIB_HOME)
endif
+ ifneq ($$(JDK_FOR_COMPILE), )
+ # Allow overriding the JDK used for compilation from the command line
+ $1_JTREG_BASIC_OPTIONS += -compilejdk:$$(JDK_FOR_COMPILE)
+ endif
+
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)
$1_JTREG_BASIC_OPTIONS += -e:DOCS_JDK_IMAGE_DIR=$$(DOCS_JDK_IMAGE_DIR)
@@ -946,11 +972,10 @@ define SetupRunJtregTestBody
endif
ifeq ($$(JTREG_AOT_JDK), true)
- $$(info Add AOT target for $1)
- $$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
+ $$(call LogWarn, Add AOT target for $1)
+ $$(eval $$(call SetupAOT, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
- $$(info AOT_TARGETS=$$($1_AOT_TARGETS))
- $$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
+ $$(call LogWarn, AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
endif
@@ -979,7 +1004,6 @@ define SetupRunJtregTestBody
$$(JTREG_JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
$$($1_JTREG_BASIC_OPTIONS) \
- -compilejdk:$$(JDK_FOR_COMPILE) \
-testjdk:$$(JDK_UNDER_TEST) \
-dir:$$(JTREG_TOPDIR) \
-reportDir:$$($1_TEST_RESULTS_DIR) \
@@ -998,7 +1022,8 @@ define SetupRunJtregTestBody
$1_COMMAND_LINE := \
for i in {0..$$(JTREG_RETRY_COUNT)}; do \
if [ "$$$$i" != 0 ]; then \
- $$(PRINTF) "\nRetrying Jtreg run. Attempt: $$$$i\n"; \
+ $$(ECHO) ""; \
+ $$(ECHO) "Retrying Jtreg run. Attempt: $$$$i"; \
fi; \
$$($1_COMMAND_LINE); \
if [ "`$$(CAT) $$($1_EXITCODE)`" = "0" ]; then \
@@ -1011,10 +1036,12 @@ define SetupRunJtregTestBody
ifneq ($$(JTREG_REPEAT_COUNT), 0)
$1_COMMAND_LINE := \
for i in {1..$$(JTREG_REPEAT_COUNT)}; do \
- $$(PRINTF) "\nRepeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)\n"; \
+ $$(ECHO) ""; \
+ $$(ECHO) "Repeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)"; \
$$($1_COMMAND_LINE); \
if [ "`$$(CAT) $$($1_EXITCODE)`" != "0" ]; then \
- $$(PRINTF) "\nFailures detected, no more repeats.\n"; \
+ $$(ECHO) ""; \
+ $$(ECHO) "Failures detected, no more repeats."; \
break; \
fi; \
done
@@ -1035,23 +1062,64 @@ define SetupRunJtregTestBody
$$(call LogWarn, Finished running test '$$($1_TEST)')
$$(call LogWarn, Test report is stored in $$(strip \
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
+
+ # Read jtreg documentation to learn on the test stats categories:
+ # https://github.com/openjdk/jtreg/blob/master/src/share/doc/javatest/regtest/faq.md#what-do-all-those-numbers-in-the-test-results-line-mean
+ # In jtreg, "skipped:" category accounts for tests that threw jtreg.SkippedException at runtime.
+ # At the same time these tests contribute to "passed:" tests.
+ # In here we don't want that and so we substract number of "skipped:" from "passed:".
+
$$(if $$(wildcard $$($1_RESULT_FILE)), \
- $$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
+ $$(eval $1_PASSED_AND_RUNTIME_SKIPPED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
- $$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
+ $$(if $$($1_PASSED_AND_RUNTIME_SKIPPED), , $$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0)) \
$$(eval $1_FAILED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
for (i=1; i<=NF; i++) { if ($$$$i == "failed:") \
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
+ $$(eval $1_RUNTIME_SKIPPED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
+ for (i=1; i<=NF; i++) { if ($$$$i == "skipped:") \
+ print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
+ $$(if $$($1_RUNTIME_SKIPPED), , $$(eval $1_RUNTIME_SKIPPED := 0)) \
+ $$(eval $1_SKIPPED := $$(shell \
+ $$(AWK) \
+ 'BEGIN { \
+ overall_skipped = 0; \
+ patterns[1] = "skipped"; \
+ patterns[2] = "excluded"; \
+ patterns[3] = "not in match-list"; \
+ patterns[4] = "did not match keywords"; \
+ patterns[5] = "did not meet module requirements"; \
+ patterns[6] = "did not meet platform requirements"; \
+ patterns[7] = "did not match prior status"; \
+ patterns[8] = "did not meet time-limit requirements"; \
+ } { \
+ split($$$$0, arr, ";"); \
+ for (item in arr) { \
+ for (p in patterns) { \
+ if (match(arr[item], patterns[p] ": [0-9]+")) { \
+ overall_skipped += substr(arr[item], RSTART + length(patterns[p]) + 2, RLENGTH); \
+ } \
+ } \
+ } \
+ print overall_skipped; \
+ }' \
+ $$($1_RESULT_FILE) \
+ )) \
$$(eval $1_ERROR := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
for (i=1; i<=NF; i++) { if ($$$$i == "error:") \
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
$$(if $$($1_ERROR), , $$(eval $1_ERROR := 0)) \
+ \
+ $$(eval $1_PASSED := $$(shell \
+ $$(EXPR) $$($1_PASSED_AND_RUNTIME_SKIPPED) - $$($1_RUNTIME_SKIPPED))) \
$$(eval $1_TOTAL := $$(shell \
- $$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) \
+ $$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR) + $$($1_SKIPPED))) \
, \
- $$(eval $1_PASSED := 0) \
+ $$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0) \
+ $$(eval $1_RUNTIME_SKIPPED := 0) \
+ $$(eval $1_SKIPPED := 0) \
$$(eval $1_FAILED := 0) \
$$(eval $1_ERROR := 1) \
$$(eval $1_TOTAL := 1) \
@@ -1110,8 +1178,6 @@ define SetupRunSpecialTestBody
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
))
- $1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
-
# We can not parse the various "special" tests.
parse-test-$1: run-test-$1
$$(call LogWarn, Finished running test '$$($1_TEST)')
@@ -1121,6 +1187,7 @@ define SetupRunSpecialTestBody
$$(eval $1_PASSED := $$(shell \
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 1; else $(ECHO) 0; fi \
))
+ $$(eval $1_SKIPPED := 0)
$$(eval $1_FAILED := $$(shell \
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 0; else $(ECHO) 1; fi \
))
@@ -1230,8 +1297,8 @@ run-test-report: post-run-test
$(ECHO) >> $(TEST_SUMMARY) ==============================
$(ECHO) >> $(TEST_SUMMARY) Test summary
$(ECHO) >> $(TEST_SUMMARY) ==============================
- $(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %2s\n" " " \
- TEST TOTAL PASS FAIL ERROR " "
+ $(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %5s %2s\n" " " \
+ TEST TOTAL PASS FAIL ERROR SKIP " "
$(foreach test, $(TESTS_TO_RUN), \
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
@@ -1243,15 +1310,15 @@ run-test-report: post-run-test
, \
$(eval TEST_NAME := $(test)) \
) \
- $(if $(filter $($(TEST_ID)_PASSED), $($(TEST_ID)_TOTAL)), \
- $(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
- " " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
- $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) " " $(NEWLINE) \
- , \
- $(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
+ $(if $(filter-out 0, $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR)), \
+ $(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
">>" "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
- $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) "<<" $(NEWLINE) \
+ $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) "<<" $(NEWLINE) \
$(eval TEST_FAILURE := true) \
+ , \
+ $(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
+ " " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
+ $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) " " $(NEWLINE) \
) \
)
$(ECHO) >> $(TEST_SUMMARY) ==============================
@@ -1277,12 +1344,14 @@ TARGETS += run-all-tests pre-run-test post-run-test run-test-report run-test
ifeq ($(TEST_OPTS_JCOV), true)
+ JCOV_VM_OPTS := -Xmx4g -Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.maxGeneralEntitySizeLimit=0
+
jcov-do-start-grabber:
$(call MakeDir, $(JCOV_OUTPUT_DIR))
if $(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -status 1>/dev/null 2>&1 ; then \
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600 ; \
fi
- $(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
+ $(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
$(JCOV_IMAGE_DIR)/template.xml -o $(JCOV_RESULT_FILE) \
1>$(JCOV_GRABBER_LOG) 2>&1 &
@@ -1295,6 +1364,10 @@ ifeq ($(TEST_OPTS_JCOV), true)
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600
JCOV_REPORT_TITLE := JDK code coverage report
+ ifneq ($(JCOV_MODULES), )
+ JCOV_MODULES_FILTER := $(foreach m, $(JCOV_MODULES), -include_module $m)
+ JCOV_REPORT_TITLE += Included modules: $(JCOV_MODULES)
+ endif
ifneq ($(JCOV_FILTERS), )
JCOV_REPORT_TITLE += Code filters: $(JCOV_FILTERS)
endif
@@ -1302,11 +1375,12 @@ ifeq ($(TEST_OPTS_JCOV), true)
jcov-gen-report: jcov-stop-grabber
$(call LogWarn, Generating JCov report ...)
- $(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
+ $(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov-repgen, \
+ $(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
`$(ECHO) $(TOPDIR)/src/*/share/classes/ | $(TR) ' ' ':'` -fmt html \
- $(JCOV_FILTERS) \
+ $(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
-mainReportTitle "$(JCOV_REPORT_TITLE)" \
- -o $(JCOV_REPORT) $(JCOV_RESULT_FILE)
+ -o $(JCOV_REPORT) $(JCOV_RESULT_FILE))
TARGETS += jcov-do-start-grabber jcov-start-grabber jcov-stop-grabber \
jcov-gen-report
@@ -1326,7 +1400,7 @@ ifeq ($(TEST_OPTS_JCOV), true)
jcov-gen-diffcoverage: jcov-stop-grabber
$(call LogWarn, Generating diff coverage with changeset $(TEST_OPTS_JCOV_DIFF_CHANGESET) ... )
$(DIFF_COMMAND)
- $(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar \
+ $(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar \
DiffCoverage -replaceDiff "src/.*/classes/:" -all \
$(JCOV_RESULT_FILE) $(JCOV_SOURCE_DIFF) > \
$(JCOV_DIFF_COVERAGE_REPORT)
diff --git a/make/RunTestsPrebuilt.gmk b/make/RunTestsPrebuilt.gmk
index 1ca22276c7526..f5fe1d3383023 100644
--- a/make/RunTestsPrebuilt.gmk
+++ b/make/RunTestsPrebuilt.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2025, 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
@@ -140,7 +140,6 @@ $(eval $(call SetupVariable,JIB_JAR,OPTIONAL))
include $(TOPDIR)/make/PreInitSupport.gmk
include $(TOPDIR)/make/common/LogUtils.gmk
-$(eval $(call CheckDeprecatedEnvironment))
$(eval $(call CheckInvalidMakeFlags))
$(eval $(call ParseLogLevel))
@@ -218,9 +217,9 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
else ifeq ($(OPENJDK_TARGET_OS), windows)
NUM_CORES := $(NUMBER_OF_PROCESSORS)
MEMORY_SIZE := $(shell \
- $(EXPR) `wmic computersystem get totalphysicalmemory -value \
- | $(GREP) = | $(SED) 's/\\r//g' \
- | $(CUT) -d "=" -f 2-` / 1024 / 1024 \
+ $(EXPR) `powershell -Command \
+ "(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" \
+ | $(SED) 's/\\r//g' ` / 1024 / 1024 \
)
endif
ifeq ($(NUM_CORES), )
@@ -299,7 +298,7 @@ test-prebuilt:
@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
# We need to fill the FindTest cache before entering RunTests.gmk.
@cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) SPEC=$(SPEC) \
- -f RunTestsPrebuiltFindTests.gmk
+ -f GenerateFindTests.gmk
@cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
TEST="$(TEST)"
diff --git a/make/SourceRevision.gmk b/make/SourceRevision.gmk
index 285aaae17b591..15399527e6a94 100644
--- a/make/SourceRevision.gmk
+++ b/make/SourceRevision.gmk
@@ -55,7 +55,7 @@ ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
SCM_DIR := .git
ID_COMMAND := $(PRINTF) "git:%s%s\n" \
"$$($(GIT) log -n1 --format=%H | cut -c1-12)" \
- "$$(if test -n "$$($(GIT) status --porcelain)"; then printf '+'; fi)"
+ "$$(if test -n "$$($(GIT) status --porcelain)"; then $(PRINTF) '+'; fi)"
endif
ifeq ($(USE_SCM), true)
diff --git a/make/StaticLibs.gmk b/make/StaticLibs.gmk
index 3fcbd0565c3c2..3cf2a4dd136b1 100644
--- a/make/StaticLibs.gmk
+++ b/make/StaticLibs.gmk
@@ -31,6 +31,7 @@ include CopyFiles.gmk
include DebugInfoUtils.gmk
include Modules.gmk
include modules/LauncherCommon.gmk
+include Execute.gmk
################################################################################
#
@@ -68,6 +69,10 @@ else ifeq ($(call isTargetOs, windows), true)
BROKEN_STATIC_LIBS += sspi_bridge
# dt_shmem define jdwpTransport_OnLoad which conflict with dt_socket
BROKEN_STATIC_LIBS += dt_shmem
+else ifeq ($(call isTargetOs, aix), true)
+ # libsplashscreen has a name conflict with libawt in the function
+ # BitmapToYXBandedRectangles, so we exclude it for now.
+ BROKEN_STATIC_LIBS += splashscreen
endif
$(foreach module, $(STATIC_LIB_MODULES), \
@@ -99,6 +104,18 @@ else ifeq ($(call isTargetOs, linux), true)
STATIC_LIBS := -Wl,--export-dynamic -Wl,--whole-archive $(STATIC_LIB_FILES) -Wl,--no-whole-archive
else ifeq ($(call isTargetOs, windows), true)
STATIC_LIBS := $(addprefix -wholearchive:, $(STATIC_LIB_FILES))
+else ifeq ($(call isTargetOs, aix), true)
+ # on AIX we have to generate export files for all static libs, because we have no whole-archive linker flag
+ $(foreach lib, $(STATIC_LIB_FILES), \
+ $(eval $(call SetupExecute, generate_export_list_$(notdir $(lib)), \
+ INFO := Generating export list for $(notdir $(lib)), \
+ DEPS := $(lib), \
+ OUTPUT_FILE := $(lib).exp, \
+ COMMAND := ( $(AR) $(ARFLAGS) -w $(lib) | $(GREP) -v '^\.' | $(AWK) '{print $$1}' | $(SORT) -u > $(lib).exp ), \
+ )) \
+ $(eval STATIC_LIB_EXPORT_FILES += $(lib).exp) \
+ )
+ STATIC_LIBS := -Wl,-bexpfull $(STATIC_LIB_FILES) $(addprefix -Wl$(COMMA)-bE:, $(STATIC_LIB_EXPORT_FILES))
else
$(error Unsupported platform)
endif
@@ -118,6 +135,9 @@ $(eval $(call SetupBuildLauncher, java, \
))
$(java): $(STATIC_LIB_FILES)
+ifeq ($(call isTargetOs, aix), true)
+ $(java): $(STATIC_LIB_EXPORT_FILES)
+endif
TARGETS += $(java)
diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4
index d897cbafba79f..0e9470a1cff31 100644
--- a/make/autoconf/basic.m4
+++ b/make/autoconf/basic.m4
@@ -75,10 +75,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
fi
+ if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$with_jvm_variants" != xzero; then
+ AC_MSG_ERROR([32-bit x86 builds are not supported])
+ fi
+
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
- AC_MSG_ERROR([32-bit Windows builds are not supported])
- fi
BASIC_SETUP_PATHS_WINDOWS
fi
@@ -133,17 +134,33 @@ AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
)
AC_SUBST(BUILD_ENV)
+ AC_MSG_CHECKING([for locale to use])
if test "x$LOCALE" != x; then
# Check if we actually have C.UTF-8; if so, use it
if $LOCALE -a | $GREP -q -E "^C\.(utf8|UTF-8)$"; then
LOCALE_USED=C.UTF-8
+ AC_MSG_RESULT([C.UTF-8 (recommended)])
+ elif $LOCALE -a | $GREP -q -E "^en_US\.(utf8|UTF-8)$"; then
+ LOCALE_USED=en_US.UTF-8
+ AC_MSG_RESULT([en_US.UTF-8 (acceptable fallback)])
else
- AC_MSG_WARN([C.UTF-8 locale not found, using C locale])
- LOCALE_USED=C
+ # As a fallback, check if users locale is UTF-8. USER_LOCALE was saved
+ # by the wrapper configure script before autconf messed up LC_ALL.
+ if $ECHO $USER_LOCALE | $GREP -q -E "\.(utf8|UTF-8)$"; then
+ LOCALE_USED=$USER_LOCALE
+ AC_MSG_RESULT([$USER_LOCALE (untested fallback)])
+ AC_MSG_WARN([Could not find C.UTF-8 or en_US.UTF-8 locale. This is not supported, and the build might fail unexpectedly.])
+ else
+ AC_MSG_RESULT([no UTF-8 locale found])
+ AC_MSG_WARN([No UTF-8 locale found. This is not supported. Proceeding with the C locale, but the build might fail unexpectedly.])
+ LOCALE_USED=C
+ fi
+ AC_MSG_NOTICE([The recommended locale is C.UTF-8, but en_US.UTF-8 is also accepted.])
fi
else
- AC_MSG_WARN([locale command not not found, using C locale])
- LOCALE_USED=C
+ LOCALE_USED=C.UTF-8
+ AC_MSG_RESULT([C.UTF-8 (default)])
+ AC_MSG_WARN([locale command not not found, using C.UTF-8 locale])
fi
export LC_ALL=$LOCALE_USED
@@ -549,9 +566,6 @@ AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
BASIC_CHECK_SRC_PERMS
- # Check if the user has any old-style ALT_ variables set.
- FOUND_ALT_VARIABLES=`env | grep ^ALT_`
-
# Before generating output files, test if they exist. If they do, this is a reconfigure.
# Since we can't properly handle the dependencies for this, warn the user about the situation
if test -e $OUTPUTDIR/spec.gmk; then
@@ -624,10 +638,4 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
# Make the compare script executable
$CHMOD +x $OUTPUTDIR/compare.sh
-
- # Copy the linker wrapper script for clang on AIX and make it executable
- if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
- $CP -f "$TOPDIR/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh"
- $CHMOD +x "$OUTPUTDIR/ld.sh"
- fi
])
diff --git a/make/autoconf/basic_tools.m4 b/make/autoconf/basic_tools.m4
index eceb0ae6cc44f..5815c55c962ab 100644
--- a/make/autoconf/basic_tools.m4
+++ b/make/autoconf/basic_tools.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -57,6 +57,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_LOOKUP_PROGS(LOCALE, locale)
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
+ UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
])
################################################################################
@@ -106,9 +107,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
UTIL_LOOKUP_PROGS(WHOAMI, whoami)
- # Tools only needed on some platforms
- UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
-
# For compare.sh only
UTIL_LOOKUP_PROGS(CMP, cmp)
UTIL_LOOKUP_PROGS(UNIQ, uniq)
@@ -470,7 +468,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
AC_MSG_CHECKING([if the pandoc smart extension needs to be disabled for markdown])
if $PANDOC --list-extensions | $GREP -q '+smart'; then
AC_MSG_RESULT([yes])
- PANDOC_MARKDOWN_FLAG="markdown-smart"
+ PANDOC_MARKDOWN_FLAG="$PANDOC_MARKDOWN_FLAG-smart"
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ AC_MSG_CHECKING([if the pandoc tex_math_dollars extension needs to be disabled for markdown])
+ if $PANDOC --list-extensions | $GREP -q '+tex_math_dollars'; then
+ AC_MSG_RESULT([yes])
+ PANDOC_MARKDOWN_FLAG="$PANDOC_MARKDOWN_FLAG-tex_math_dollars"
else
AC_MSG_RESULT([no])
fi
diff --git a/make/autoconf/basic_windows.m4 b/make/autoconf/basic_windows.m4
index fb6fc526bfa21..dac6ec15db6ca 100644
--- a/make/autoconf/basic_windows.m4
+++ b/make/autoconf/basic_windows.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -159,7 +159,7 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
else
WINENV_PREFIX_ARG="$WINENV_PREFIX"
fi
- FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
+ FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD"
FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh $FIXPATH_ARGS"
FIXPATH="$FIXPATH_BASE exec"
@@ -215,7 +215,7 @@ AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
if test "x$OPENJDK_BUILD_OS" = xwindows; then
FIXPATH_CMDLINE=". $TOPDIR/make/scripts/fixpath.sh -e $PATHTOOL \
-p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR \
- -c $CMD -q"
+ -c $CMD"
$ECHO > $OUTPUTDIR/fixpath '#!/bin/bash'
$ECHO >> $OUTPUTDIR/fixpath export PATH='"[$]PATH:'$PATH'"'
$ECHO >> $OUTPUTDIR/fixpath $FIXPATH_CMDLINE '"[$]@"'
diff --git a/make/autoconf/boot-jdk.m4 b/make/autoconf/boot-jdk.m4
index d39e6e75a94c1..feb16c7d1791f 100644
--- a/make/autoconf/boot-jdk.m4
+++ b/make/autoconf/boot-jdk.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -180,11 +180,13 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
[
- UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac, , NOFIXPATH)
- UTIL_LOOKUP_PROGS(JAVA_CHECK, java, , NOFIXPATH)
- BINARY="$JAVAC_CHECK"
- if test "x$JAVAC_CHECK" = x; then
- BINARY="$JAVA_CHECK"
+ UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac)
+ UTIL_GET_EXECUTABLE(JAVAC_CHECK) # Will setup JAVAC_CHECK_EXECUTABLE
+ UTIL_LOOKUP_PROGS(JAVA_CHECK, java)
+ UTIL_GET_EXECUTABLE(JAVA_CHECK) # Will setup JAVA_CHECK_EXECUTABLE
+ BINARY="$JAVAC_CHECK_EXECUTABLE"
+ if test "x$JAVAC_CHECK_EXECUTABLE" = x; then
+ BINARY="$JAVA_CHECK_EXECUTABLE"
fi
if test "x$BINARY" != x; then
# So there is a java(c) binary, it might be part of a JDK.
diff --git a/make/autoconf/build-aux/config.guess b/make/autoconf/build-aux/config.guess
index afdf7cb5f9205..ce9fb6cd16f38 100644
--- a/make/autoconf/build-aux/config.guess
+++ b/make/autoconf/build-aux/config.guess
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
@@ -53,10 +53,10 @@ if [ "x$OUT" = x ]; then
fi
fi
-# Test and fix cygwin on x86_64
-echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
+# Test and fix cygwin/msys CPUs
+echo $OUT | grep -e "-pc-cygwin" > /dev/null 2> /dev/null
if test $? != 0; then
- echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
+ echo $OUT | grep -e "-pc-mingw" > /dev/null 2> /dev/null
fi
if test $? = 0; then
case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
@@ -64,6 +64,10 @@ if test $? = 0; then
REAL_CPU=x86_64
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
;;
+ ARMv8)
+ REAL_CPU=aarch64
+ OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
+ ;;
esac
fi
diff --git a/make/autoconf/build-performance.m4 b/make/autoconf/build-performance.m4
index 4414ea0d93c9d..10e86e751998e 100644
--- a/make/autoconf/build-performance.m4
+++ b/make/autoconf/build-performance.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -75,7 +75,8 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
FOUND_MEM=yes
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
- MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
+ MEMORY_SIZE=`powershell -Command \
+ "(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" | $SED 's/\\r//g' `
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
fi
diff --git a/make/autoconf/configure b/make/autoconf/configure
index 6fa0aacfbc907..443a37bae77db 100644
--- a/make/autoconf/configure
+++ b/make/autoconf/configure
@@ -49,7 +49,9 @@ fi
export CONFIG_SHELL=$BASH
export _as_can_reexec=no
-# Make sure all shell commands are executed with the C locale
+# Save user's current locale, but make sure all future shell commands are
+# executed with the C locale
+export USER_LOCALE=$LC_ALL
export LC_ALL=C
if test "x$CUSTOM_CONFIG_DIR" != x; then
diff --git a/make/autoconf/configure.ac b/make/autoconf/configure.ac
index 66809127a7587..e05b5ae3b90f0 100644
--- a/make/autoconf/configure.ac
+++ b/make/autoconf/configure.ac
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -174,9 +174,6 @@ SRCDIRS_SETUP_IMPORT_MODULES
#
################################################################################
-# See if we are doing a complete static build or not
-JDKOPT_SETUP_STATIC_BUILD
-
# First determine the toolchain type (compiler family)
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
@@ -259,11 +256,12 @@ LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
-JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
JDKOPT_SETUP_MACOSX_SIGNING
+JDKOPT_SETUP_SIGNING_HOOK
+JDKOPT_SETUP_JAVA_WARNINGS
################################################################################
#
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index 61645cda6ddd2..eb0e5e20e4c5f 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -482,6 +482,16 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
else
DEBUG_CFLAGS_JDK="-DDEBUG"
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang ; then
+ INIT_PATTERN_FLAG="-ftrivial-auto-var-init=pattern"
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_PATTERN_FLAG],
+ IF_TRUE: [
+ DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK $INIT_PATTERN_FLAG"
+ DEBUG_CFLAGS_JVM="$INIT_PATTERN_FLAG"
+ ]
+ )
+ fi
+
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
fi
@@ -563,11 +573,19 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden -fstack-protector"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- # The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
- # compilation of all source files regardless of the active code page on Windows.
- TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -MP"
- TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -Zc:wchar_t-"
+ TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -MP"
+ TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -Zc:wchar_t-"
+ fi
+
+ # Set character encoding in source
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ CHARSET_CFLAGS="-finput-charset=utf-8"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ # The -utf-8 option sets both source and execution character sets
+ CHARSET_CFLAGS="-utf-8 -validate-charset"
fi
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CHARSET_CFLAGS"
+ TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK $CHARSET_CFLAGS"
# CFLAGS C language level for JDK sources (hotspot only uses C++)
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
@@ -711,15 +729,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
$1_CFLAGS_CPU_JVM="-DARM"
elif test "x$FLAGS_CPU_ARCH" = xppc; then
- $1_CFLAGS_CPU_JVM="-minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
+ $1_CFLAGS_CPU_JVM="-mno-multiple -mno-string"
if test "x$FLAGS_CPU" = xppc64; then
# -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
# Use ppc64 instructions, but schedule for power5
- $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc -mcpu=powerpc64 -mtune=power5"
+ $1_CFLAGS_CPU="-mcpu=powerpc64 -mtune=power5"
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc"
elif test "x$FLAGS_CPU" = xppc64le; then
# Little endian machine uses ELFv2 ABI.
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
- $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
+ $1_CFLAGS_CPU="-mcpu=power8 -mtune=power10"
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2"
fi
elif test "x$FLAGS_CPU" = xs390x; then
$1_CFLAGS_CPU="-mbackchain -march=z10"
@@ -740,7 +760,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
if test "x$FLAGS_CPU" = xppc64le; then
# Little endian machine uses ELFv2 ABI.
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
- $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power10"
fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
@@ -912,8 +932,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
# ACLE and this flag are required to build the aarch64 SVE related functions in
- # libvectormath.
- if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
+ # libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
+ # that check.
+ if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_CPU" = "xlinux"; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS"
diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4
index 90947494ec8af..509e0dd825f06 100644
--- a/make/autoconf/flags-ldflags.m4
+++ b/make/autoconf/flags-ldflags.m4
@@ -78,8 +78,8 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
- BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
- -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=$OUTPUTDIR/ld.sh"
+ BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-blibpath:/usr/lib:lib -Wl,-bnoexpall \
+ -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc"
fi
@@ -100,7 +100,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$TOOLCHAIN_TYPE" = xclang; then
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
- OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
+ OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN -Wl,-reproducible"
fi
# Setup debug level-dependent LDFLAGS
diff --git a/make/autoconf/help.m4 b/make/autoconf/help.m4
index 4d1b3c37bbb04..d8c0b2ffaeffb 100644
--- a/make/autoconf/help.m4
+++ b/make/autoconf/help.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -228,19 +228,19 @@ AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
# Print available toolchains
- $PRINTF "The following toolchains are valid as arguments to --with-toolchain-type.\n"
- $PRINTF "Which are available to use depends on the build platform.\n"
+ $ECHO "The following toolchains are valid as arguments to --with-toolchain-type."
+ $ECHO "Which are available to use depends on the build platform."
for toolchain in $VALID_TOOLCHAINS_all; do
# Use indirect variable referencing
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
$PRINTF " %-22s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
done
- $PRINTF "\n"
+ $ECHO ""
# Print available JVM features
- $PRINTF "The following JVM features are valid as arguments to --with-jvm-features.\n"
- $PRINTF "Which are available to use depends on the environment and JVM variant.\n"
+ $ECHO "The following JVM features are valid as arguments to --with-jvm-features."
+ $ECHO "Which are available to use depends on the environment and JVM variant."
m4_foreach(FEATURE, m4_split(jvm_features_valid), [
# Create an m4 variable containing the description for FEATURE.
m4_define(FEATURE_DESCRIPTION, [jvm_feature_desc_]m4_translit(FEATURE, -, _))
@@ -257,123 +257,117 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
[
# Finally output some useful information to the user
- printf "\n"
- printf "====================================================\n"
+ $ECHO ""
+ $ECHO "===================================================="
if test "x$no_create" != "xyes"; then
if test "x$IS_RECONFIGURE" != "xyes"; then
- printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
+ $ECHO "A new configuration has been successfully created in"
+ $ECHO "$OUTPUTDIR"
else
- printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
+ $ECHO "The existing configuration has been successfully updated in"
+ $ECHO "$OUTPUTDIR"
fi
else
if test "x$IS_RECONFIGURE" != "xyes"; then
- printf "A configuration has been successfully checked but not created\n"
+ $ECHO "A configuration has been successfully checked but not created"
else
- printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
+ $ECHO "The existing configuration has been successfully checked in"
+ $ECHO "$OUTPUTDIR"
fi
fi
if test "x$CONFIGURE_COMMAND_LINE" != x; then
- printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
+ $ECHO "using configure arguments '$CONFIGURE_COMMAND_LINE'."
else
- printf "using default settings.\n"
+ $ECHO "using default settings."
fi
if test "x$REAL_CONFIGURE_COMMAND_EXEC_FULL" != x; then
- printf "\n"
- printf "The original configure invocation was '$REAL_CONFIGURE_COMMAND_EXEC_SHORT $REAL_CONFIGURE_COMMAND_LINE'.\n"
+ $ECHO ""
+ $ECHO "The original configure invocation was '$REAL_CONFIGURE_COMMAND_EXEC_SHORT $REAL_CONFIGURE_COMMAND_LINE'."
fi
- printf "\n"
- printf "Configuration summary:\n"
- printf "* Name: $CONF_NAME\n"
- printf "* Debug level: $DEBUG_LEVEL\n"
- printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
- printf "* JVM variants: $JVM_VARIANTS\n"
- printf "* JVM features: "
+ $ECHO ""
+ $ECHO "Configuration summary:"
+ $ECHO "* Name: $CONF_NAME"
+ $ECHO "* Debug level: $DEBUG_LEVEL"
+ $ECHO "* HS debug level: $HOTSPOT_DEBUG_LEVEL"
+ $ECHO "* JVM variants: $JVM_VARIANTS"
+ $PRINTF "* JVM features: "
for variant in $JVM_VARIANTS; do
features_var_name=JVM_FEATURES_$variant
JVM_FEATURES_FOR_VARIANT=${!features_var_name}
- printf "$variant: \'$JVM_FEATURES_FOR_VARIANT\' "
+ $PRINTF "%s: \'%s\' " "$variant" "$JVM_FEATURES_FOR_VARIANT"
done
- printf "\n"
+ $ECHO ""
- printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
- printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
+ $ECHO "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS"
+ $ECHO "* Version string: $VERSION_STRING ($VERSION_SHORT)"
if test "x$SOURCE_DATE" != xupdated; then
source_date_info="$SOURCE_DATE ($SOURCE_DATE_ISO_8601)"
else
source_date_info="Determined at build time"
fi
- printf "* Source date: $source_date_info\n"
+ $ECHO "* Source date: $source_date_info"
- printf "\n"
- printf "Tools summary:\n"
+ $ECHO ""
+ $ECHO "Tools summary:"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- printf "* Environment: %s version %s; windows version %s; prefix \"%s\"; root \"%s\"\n" \
- "$WINENV_VENDOR" "$WINENV_VERSION" "$WINDOWS_VERSION" "$WINENV_PREFIX" "$WINENV_ROOT"
+ $ECHO "* Environment: $WINENV_VENDOR version $WINENV_VERSION; windows version $WINDOWS_VERSION; prefix \"$WINENV_PREFIX\"; root \"$WINENV_ROOT\""
fi
- printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
- printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
+ $ECHO "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)"
+ $ECHO "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)"
if test "x$DEVKIT_NAME" != x; then
- printf "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)\n"
+ $ECHO "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)"
elif test "x$DEVKIT_ROOT" != x; then
- printf "* Devkit: $DEVKIT_ROOT\n"
+ $ECHO "* Devkit: $DEVKIT_ROOT"
elif test "x$SYSROOT" != x; then
- printf "* Sysroot: $SYSROOT\n"
+ $ECHO "* Sysroot: $SYSROOT"
fi
- printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
- printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
+ $ECHO "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})"
+ $ECHO "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})"
- printf "\n"
- printf "Build performance summary:\n"
- printf "* Build jobs: $JOBS\n"
- printf "* Memory limit: $MEMORY_SIZE MB\n"
+ $ECHO ""
+ $ECHO "Build performance summary:"
+ $ECHO "* Build jobs: $JOBS"
+ $ECHO "* Memory limit: $MEMORY_SIZE MB"
if test "x$CCACHE_STATUS" != "x"; then
- printf "* ccache status: $CCACHE_STATUS\n"
+ $ECHO "* ccache status: $CCACHE_STATUS"
fi
- printf "\n"
+ $ECHO ""
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
- printf "NOTE: You have requested to build more than one version of the JVM, which\n"
- printf "will result in longer build times.\n"
- printf "\n"
- fi
-
- if test "x$FOUND_ALT_VARIABLES" != "x"; then
- printf "WARNING: You have old-style ALT_ environment variables set.\n"
- printf "These are not respected, and will be ignored. It is recommended\n"
- printf "that you clean your environment. The following variables are set:\n"
- printf "$FOUND_ALT_VARIABLES\n"
- printf "\n"
+ $ECHO "NOTE: You have requested to build more than one version of the JVM, which"
+ $ECHO "will result in longer build times."
+ $ECHO ""
fi
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
- printf "WARNING: Your build output directory is not on a local disk.\n"
- printf "This will severely degrade build performance!\n"
- printf "It is recommended that you create an output directory on a local disk,\n"
- printf "and run the configure script again from that directory.\n"
- printf "\n"
+ $ECHO "WARNING: Your build output directory is not on a local disk."
+ $ECHO "This will severely degrade build performance!"
+ $ECHO "It is recommended that you create an output directory on a local disk,"
+ $ECHO "and run the configure script again from that directory."
+ $ECHO ""
fi
if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
- printf "WARNING: The result of this configuration has overridden an older\n"
- printf "configuration. You *should* run 'make clean' to make sure you get a\n"
- printf "proper build. Failure to do so might result in strange build problems.\n"
- printf "\n"
+ $ECHO "WARNING: The result of this configuration has overridden an older"
+ $ECHO "configuration. You *should* run 'make clean' to make sure you get a"
+ $ECHO "proper build. Failure to do so might result in strange build problems."
+ $ECHO ""
fi
if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
- printf "WARNING: The result of this configuration was not saved.\n"
- printf "You should run without '--no-create | -n' to create the configuration.\n"
- printf "\n"
+ $ECHO "WARNING: The result of this configuration was not saved."
+ $ECHO "You should run without '--no-create | -n' to create the configuration."
+ $ECHO ""
fi
if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
- printf "WARNING: The toolchain version used is known to have issues. Please\n"
- printf "consider using a supported version unless you know what you are doing.\n"
- printf "\n"
+ $ECHO "WARNING: The toolchain version used is known to have issues. Please"
+ $ECHO "consider using a supported version unless you know what you are doing."
+ $ECHO ""
fi
])
@@ -389,10 +383,10 @@ AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
if test -e "$CONFIG_LOG_PATH/config.log"; then
$GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
if test $? -eq 0; then
- printf "The following warnings were produced. Repeated here for convenience:\n"
+ $ECHO "The following warnings were produced. Repeated here for convenience:"
# We must quote sed expression (using []) to stop m4 from eating the [].
$GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ]
- printf "\n"
+ $ECHO ""
fi
fi
])
diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4
index b90f04a89e255..289ed935fdfed 100644
--- a/make/autoconf/jdk-options.m4
+++ b/make/autoconf/jdk-options.m4
@@ -405,10 +405,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
JCOV_FILTERS="$with_jcov_filters"
fi
fi
+
+ UTIL_ARG_WITH(NAME: jcov-modules, TYPE: string,
+ DEFAULT: [], RESULT: JCOV_MODULES_COMMMA_SEPARATED,
+ DESC: [which modules to include in jcov (comma-separated)],
+ OPTIONAL: true)
+
+ # Replace "," with " ".
+ JCOV_MODULES=${JCOV_MODULES_COMMMA_SEPARATED//,/ }
AC_SUBST(JCOV_ENABLED)
AC_SUBST(JCOV_HOME)
AC_SUBST(JCOV_INPUT_JDK)
AC_SUBST(JCOV_FILTERS)
+ AC_SUBST(JCOV_MODULES)
])
################################################################################
@@ -516,11 +525,25 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
OPTIONAL: true)
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
+ # GCC 13 also for array-bounds and stringop-overflow
# Silence them for now.
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
$ADDITIONAL_UBSAN_CHECKS"
- UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
+ UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-array-bounds -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
+ if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
+ UBSAN_CFLAGS="$UBSAN_CFLAGS -Wno-format-overflow -Wno-stringop-overflow -Wno-stringop-truncation"
+ fi
UBSAN_LDFLAGS="$UBSAN_CHECKS"
+ # On AIX, the llvm_symbolizer is not found out of the box, so we have to provide the
+ # full qualified llvm_symbolizer path in the __ubsan_default_options() function in
+ # make/data/ubsan/ubsan_default_options.c. To get it there we compile our sources
+ # with an additional define LLVM_SYMBOLIZER, which we set here.
+ # To calculate the correct llvm_symbolizer path we can use the location of the compiler, because
+ # their relation is fixed.
+ if test "x$TOOLCHAIN_TYPE" = "xclang" && test "x$OPENJDK_TARGET_OS" = "xaix"; then
+ UBSAN_CFLAGS="$UBSAN_CFLAGS -fno-sanitize=function,vptr -DLLVM_SYMBOLIZER=$(dirname $(dirname $CC))/tools/ibm-llvm-symbolizer"
+ UBSAN_LDFLAGS="$UBSAN_LDFLAGS -fno-sanitize=function,vptr -Wl,-bbigtoc"
+ fi
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
DESC: [enable UndefinedBehaviorSanitizer],
CHECK_AVAILABLE: [
@@ -553,16 +576,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
AC_SUBST(UBSAN_ENABLED)
])
-################################################################################
-#
-# Static build support. When enabled will generate static
-# libraries instead of shared libraries for all JDK libs.
-#
-AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
-[
- UTIL_DEPRECATED_ARG_ENABLE(static-build)
-])
-
################################################################################
#
# jmod options.
@@ -629,6 +642,18 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
DEFAULT_DESC: [enabled by default unless --enable-linkable-runtime is set],
CHECKING_MSG: [if packaged modules are kept])
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
+
+ ################################################################################
+ #
+ # Extra jlink options to be (optionally) passed to the JDK build
+ #
+ UTIL_ARG_WITH(NAME: extra-jlink-flags, TYPE: string,
+ DEFAULT: [],
+ DESC: [extra flags to be passed to jlink during the build],
+ OPTIONAL: true)
+
+ JLINK_USER_EXTRA_FLAGS="$EXTRA_JLINK_FLAGS"
+ AC_SUBST(JLINK_USER_EXTRA_FLAGS)
])
################################################################################
@@ -670,15 +695,6 @@ AC_DEFUN([JDKOPT_EXCLUDE_TRANSLATIONS],
AC_SUBST(EXCLUDE_TRANSLATIONS)
])
-################################################################################
-#
-# Optionally disable man pages (deprecated)
-#
-AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
-[
- UTIL_DEPRECATED_ARG_ENABLE(manpages)
-])
-
################################################################################
#
# Disable the default CDS archive generation
@@ -865,8 +881,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
AC_SUBST(SOURCE_DATE)
AC_SUBST(ISO_8601_FORMAT_STRING)
AC_SUBST(SOURCE_DATE_ISO_8601)
-
- UTIL_DEPRECATED_ARG_ENABLE(reproducible-build)
])
################################################################################
@@ -973,6 +987,41 @@ AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
AC_SUBST(MACOSX_CODESIGN_MODE)
])
+################################################################################
+#
+# Setup a hook to invoke a script that runs for file produced by the native
+# compilation steps, after linking.
+# Parameter is the path to the script to be called.
+#
+AC_DEFUN([JDKOPT_SETUP_SIGNING_HOOK],
+[
+ UTIL_ARG_WITH(NAME: signing-hook, TYPE: executable,
+ OPTIONAL: true, DEFAULT: "",
+ DESC: [specify path to script used to code sign native binaries]
+ )
+
+ AC_MSG_CHECKING([for signing hook])
+ if test "x$SIGNING_HOOK" != x; then
+ UTIL_FIXUP_EXECUTABLE(SIGNING_HOOK)
+ AC_MSG_RESULT([$SIGNING_HOOK])
+ else
+ AC_MSG_RESULT([none])
+ fi
+ AC_SUBST(SIGNING_HOOK)
+])
+
+################################################################################
+#
+# Setup how javac should handle warnings.
+#
+AC_DEFUN([JDKOPT_SETUP_JAVA_WARNINGS],
+[
+ UTIL_ARG_ENABLE(NAME: java-warnings-as-errors, DEFAULT: true,
+ RESULT: JAVA_WARNINGS_AS_ERRORS,
+ DESC: [consider java warnings to be an error])
+ AC_SUBST(JAVA_WARNINGS_AS_ERRORS)
+])
+
################################################################################
#
# fallback linker
diff --git a/make/autoconf/jvm-features.m4 b/make/autoconf/jvm-features.m4
index 9695644bafe63..668de01946931 100644
--- a/make/autoconf/jvm-features.m4
+++ b/make/autoconf/jvm-features.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -50,9 +50,8 @@ m4_define(jvm_features_valid, m4_normalize( \
))
# Deprecated JVM features (these are ignored, but with a warning)
-m4_define(jvm_features_deprecated, m4_normalize(
- cmsgc trace \
-))
+# This list is empty at the moment.
+m4_define(jvm_features_deprecated, m4_normalize( ))
# Feature descriptions
m4_define(jvm_feature_desc_cds, [enable class data sharing (CDS)])
diff --git a/make/autoconf/lib-bundled.m4 b/make/autoconf/lib-bundled.m4
index 091f01cadb5d7..3246697663cef 100644
--- a/make/autoconf/lib-bundled.m4
+++ b/make/autoconf/lib-bundled.m4
@@ -62,19 +62,29 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
if test "x${with_libjpeg}" = "xbundled"; then
USE_EXTERNAL_LIBJPEG=false
+ LIBJPEG_CFLAGS=""
+ LIBJPEG_LIBS=""
elif test "x${with_libjpeg}" = "xsystem"; then
- AC_CHECK_HEADER(jpeglib.h, [],
- [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
- AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
- [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
-
- USE_EXTERNAL_LIBJPEG=true
- LIBJPEG_LIBS="-ljpeg"
+ PKG_CHECK_MODULES(LIBJPEG, libjpeg, [LIBJPEG_FOUND=yes], [LIBJPEG_FOUND=no])
+ if test "x${LIBJPEG_FOUND}" = "xyes"; then
+ # PKG_CHECK_MODULES will set LIBJPEG_CFLAGS and LIBJPEG_LIBS
+ USE_EXTERNAL_LIBJPEG=true
+ else
+ AC_CHECK_HEADER(jpeglib.h, [],
+ [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
+ AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
+ [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
+
+ USE_EXTERNAL_LIBJPEG=true
+ LIBJPEG_CFLAGS=""
+ LIBJPEG_LIBS="-ljpeg"
+ fi
else
AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
fi
AC_SUBST(USE_EXTERNAL_LIBJPEG)
+ AC_SUBST(LIBJPEG_CFLAGS)
AC_SUBST(LIBJPEG_LIBS)
])
@@ -85,6 +95,10 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
[
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+ AC_ARG_WITH(giflib-include, [AS_HELP_STRING([--with-giflib-include],
+ [specify directory for the system giflib include files])])
+ AC_ARG_WITH(giflib-lib, [AS_HELP_STRING([--with-giflib-lib],
+ [specify directory for the system giflib library])])
AC_MSG_CHECKING([for which giflib to use])
# default is bundled
@@ -97,11 +111,40 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
if test "x${with_giflib}" = "xbundled"; then
USE_EXTERNAL_LIBGIF=false
+ GIFLIB_CFLAGS=""
+ GIFLIB_LIBS=""
elif test "x${with_giflib}" = "xsystem"; then
- AC_CHECK_HEADER(gif_lib.h, [],
- [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
- AC_CHECK_LIB(gif, DGifGetCode, [],
- [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
+ GIFLIB_H_FOUND=no
+ if test "x${with_giflib_include}" != x; then
+ GIFLIB_CFLAGS="-I${with_giflib_include}"
+ GIFLIB_H_FOUND=yes
+ fi
+ if test "x$GIFLIB_H_FOUND" = xno; then
+ AC_CHECK_HEADER(gif_lib.h,
+ [
+ GIFLIB_CFLAGS=""
+ GIFLIB_H_FOUND=yes
+ ])
+ fi
+ if test "x$GIFLIB_H_FOUND" = xno; then
+ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])
+ fi
+
+ GIFLIB_LIB_FOUND=no
+ if test "x${with_giflib_lib}" != x; then
+ GIFLIB_LIBS="-L${with_giflib_lib} -lgif"
+ GIFLIB_LIB_FOUND=yes
+ fi
+ if test "x$GIFLIB_LIB_FOUND" = xno; then
+ AC_CHECK_LIB(gif, DGifGetCode,
+ [
+ GIFLIB_LIBS="-lgif"
+ GIFLIB_LIB_FOUND=yes
+ ])
+ fi
+ if test "x$GIFLIB_LIB_FOUND" = xno; then
+ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])
+ fi
USE_EXTERNAL_LIBGIF=true
GIFLIB_LIBS=-lgif
@@ -110,6 +153,7 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
fi
AC_SUBST(USE_EXTERNAL_LIBGIF)
+ AC_SUBST(GIFLIB_CFLAGS)
AC_SUBST(GIFLIB_LIBS)
])
diff --git a/make/autoconf/lib-tests.m4 b/make/autoconf/lib-tests.m4
index afb9403080871..d2a4fcbb191c5 100644
--- a/make/autoconf/lib-tests.m4
+++ b/make/autoconf/lib-tests.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 2025, 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
@@ -28,7 +28,7 @@
################################################################################
# Minimum supported versions
-JTREG_MINIMUM_VERSION=7.4
+JTREG_MINIMUM_VERSION=7.5.1
GTEST_MINIMUM_VERSION=1.14.0
################################################################################
diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4
index b68fef7bbba9e..bf697928f1bb8 100644
--- a/make/autoconf/libraries.m4
+++ b/make/autoconf/libraries.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -98,13 +98,7 @@ AC_DEFUN([LIB_SETUP_JVM_LIBS],
# 32-bit platforms needs fallback library for 8-byte atomic ops on Zero
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
if test "x$OPENJDK_$1_OS" = xlinux &&
- (test "x$OPENJDK_$1_CPU" = xarm ||
- test "x$OPENJDK_$1_CPU" = xm68k ||
- test "x$OPENJDK_$1_CPU" = xmips ||
- test "x$OPENJDK_$1_CPU" = xmipsel ||
- test "x$OPENJDK_$1_CPU" = xppc ||
- test "x$OPENJDK_$1_CPU" = xsh ||
- test "x$OPENJDK_$1_CPU" = xriscv32); then
+ test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
BASIC_JVM_LIBS_$1="$BASIC_JVM_LIBS_$1 -latomic"
fi
fi
@@ -139,7 +133,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
# Threading library
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
- BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD"
fi
# librt for legacy clock_gettime
@@ -197,6 +191,28 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
AC_SUBST(LIBDL)
LIBS="$save_LIBS"
+ # Setup posix pthread support
+ if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
+ LIBPTHREAD="-lpthread"
+ else
+ LIBPTHREAD=""
+ fi
+ AC_SUBST(LIBPTHREAD)
+
+ # Setup libiconv flags and library
+ if test "x$OPENJDK_TARGET_OS" == "xaix" || test "x$OPENJDK_TARGET_OS" == "xmacosx"; then
+ ICONV_CFLAGS=
+ ICONV_LDFLAGS=
+ ICONV_LIBS=-liconv
+ else
+ ICONV_CFLAGS=
+ ICONV_LDFLAGS=
+ ICONV_LIBS=
+ fi
+ AC_SUBST(ICONV_CFLAGS)
+ AC_SUBST(ICONV_LDFLAGS)
+ AC_SUBST(ICONV_LIBS)
+
# Control if libzip can use mmap. Available for purposes of overriding.
LIBZIP_CAN_USE_MMAP=true
AC_SUBST(LIBZIP_CAN_USE_MMAP)
diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4
index 937d8c37927b1..31451d0c37fe4 100644
--- a/make/autoconf/platform.m4
+++ b/make/autoconf/platform.m4
@@ -666,17 +666,7 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
[
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
- # Unfortunately, variants have not been parsed yet, so we have to check the configure option
- # directly. Allow only the directly specified Zero variant, treat any other mix as containing
- # something non-Zero.
- if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$with_jvm_variants" != xzero; then
- if test "x$enable_deprecated_ports" = "xyes"; then
- AC_MSG_WARN([The 32-bit x86 port is deprecated and may be removed in a future release.])
- else
- AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
- Use --enable-deprecated-ports=yes to suppress this error.]))
- fi
- fi
+ # There are no deprecated ports. Implement the deprecation warnings here.
])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
diff --git a/make/autoconf/spec.gmk.template b/make/autoconf/spec.gmk.template
index 2637285334bae..e720916d88a43 100644
--- a/make/autoconf/spec.gmk.template
+++ b/make/autoconf/spec.gmk.template
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -144,6 +144,7 @@ endif
LIBM := @LIBM@
LIBDL := @LIBDL@
+LIBPTHREAD := @LIBPTHREAD@
WINENV_ROOT := @WINENV_ROOT@
WINENV_PREFIX := @WINENV_PREFIX@
@@ -426,6 +427,9 @@ LIBFFI_LIBS := @LIBFFI_LIBS@
LIBFFI_CFLAGS := @LIBFFI_CFLAGS@
ENABLE_LIBFFI_BUNDLING := @ENABLE_LIBFFI_BUNDLING@
LIBFFI_LIB_FILE := @LIBFFI_LIB_FILE@
+ICONV_CFLAGS := @ICONV_CFLAGS@
+ICONV_LDFLAGS := @ICONV_LDFLAGS@
+ICONV_LIBS := @ICONV_LIBS@
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
REPRODUCIBLE_CFLAGS := @REPRODUCIBLE_CFLAGS@
@@ -450,6 +454,7 @@ JCOV_ENABLED := @JCOV_ENABLED@
JCOV_HOME := @JCOV_HOME@
JCOV_INPUT_JDK := @JCOV_INPUT_JDK@
JCOV_FILTERS := @JCOV_FILTERS@
+JCOV_MODULES := @JCOV_MODULES@
# AddressSanitizer
ASAN_ENABLED := @ASAN_ENABLED@
@@ -475,6 +480,9 @@ MACOSX_VERSION_MAX := @MACOSX_VERSION_MAX@
MACOSX_CODESIGN_MODE := @MACOSX_CODESIGN_MODE@
MACOSX_CODESIGN_IDENTITY := @MACOSX_CODESIGN_IDENTITY@
+# The code signing hook configuration
+SIGNING_HOOK := @SIGNING_HOOK@
+
# Toolchain type: gcc, clang, microsoft...
TOOLCHAIN_TYPE := @TOOLCHAIN_TYPE@
TOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@
@@ -510,6 +518,7 @@ DISABLED_WARNINGS_CXX := @DISABLED_WARNINGS_CXX@
# A global flag (true or false) determining if native warnings are considered errors.
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
+JAVA_WARNINGS_AS_ERRORS := @JAVA_WARNINGS_AS_ERRORS@
CFLAGS_CCACHE := @CFLAGS_CCACHE@
ADLC_LANGSTD_CXXFLAGS := @ADLC_LANGSTD_CXXFLAGS@
@@ -708,6 +717,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
JMOD_COMPRESS := @JMOD_COMPRESS@
JLINK_KEEP_PACKAGED_MODULES := @JLINK_KEEP_PACKAGED_MODULES@
JLINK_PRODUCE_LINKABLE_RUNTIME := @JLINK_PRODUCE_LINKABLE_RUNTIME@
+JLINK_USER_EXTRA_FLAGS := @JLINK_USER_EXTRA_FLAGS@
RCFLAGS := @RCFLAGS@
@@ -792,8 +802,10 @@ TAR_SUPPORTS_TRANSFORM := @TAR_SUPPORTS_TRANSFORM@
# Build setup
USE_EXTERNAL_LIBJPEG := @USE_EXTERNAL_LIBJPEG@
+LIBJPEG_CFLAGS := @LIBJPEG_CFLAGS@
LIBJPEG_LIBS := @LIBJPEG_LIBS@
USE_EXTERNAL_LIBGIF := @USE_EXTERNAL_LIBGIF@
+GIFLIB_CFLAGS := @GIFLIB_CFLAGS@
GIFLIB_LIBS := @GIFLIB_LIBS@
USE_EXTERNAL_LIBZ := @USE_EXTERNAL_LIBZ@
LIBZ_CFLAGS := @LIBZ_CFLAGS@
@@ -835,10 +847,12 @@ SVE_CFLAGS := @SVE_CFLAGS@
JDK_IMAGE_SUBDIR := jdk
JRE_IMAGE_SUBDIR := jre
JCOV_IMAGE_SUBDIR := jdk-jcov
+STATIC_JDK_IMAGE_SUBDIR := static-jdk
# Colon left out to be able to override output dir for bootcycle-images
JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
JRE_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
+STATIC_JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(STATIC_JDK_IMAGE_SUBDIR)
JCOV_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JCOV_IMAGE_SUBDIR)
# Test image, as above
@@ -918,6 +932,7 @@ DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
STATIC_LIBS_GRAAL_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs-graal$(DEBUG_PART).tar.gz
+STATIC_JDK_BUNDLE_NAME := static-jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
@@ -928,6 +943,7 @@ TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
DOCS_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JDK_BUNDLE_NAME)
DOCS_JAVASE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JAVASE_BUNDLE_NAME)
DOCS_REFERENCE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_REFERENCE_BUNDLE_NAME)
+STATIC_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(STATIC_JDK_BUNDLE_NAME)
JCOV_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JCOV_BUNDLE_NAME)
# This macro is called to allow inclusion of closed source counterparts.
diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4
index c240b9098bc6f..b7a010746862e 100644
--- a/make/autoconf/toolchain.m4
+++ b/make/autoconf/toolchain.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -291,6 +291,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
+ if test "x$TOOLCHAIN_VERSION" = "x16" || test "x$TOOLCHAIN_VERSION" = "x16.1" ; then
+ AC_MSG_NOTICE([Xcode $TOOLCHAIN_VERSION has a compiler bug that causes the build to fail.])
+ AC_MSG_NOTICE([Please use Xcode 16.2 or later, or a version prior to 16.])
+ AC_MSG_ERROR([Compiler version is not supported.])
+ fi
fi
fi
AC_SUBST(TOOLCHAIN_VERSION)
@@ -620,6 +625,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
# All other toolchains use the compiler to link.
LD="$CC"
LDCXX="$CXX"
+ # Force use of lld, since that is what we expect when setting flags later on
+ if test "x$TOOLCHAIN_TYPE" = xclang; then
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ LD="$LD -fuse-ld=lld"
+ LDCXX="$LDCXX -fuse-ld=lld"
+ fi
+ fi
fi
AC_SUBST(LD)
# FIXME: it should be CXXLD, according to standard (cf CXXCPP)
diff --git a/make/autoconf/toolchain_microsoft.m4 b/make/autoconf/toolchain_microsoft.m4
index 4f970df7b5f7c..17ad2666b3ab8 100644
--- a/make/autoconf/toolchain_microsoft.m4
+++ b/make/autoconf/toolchain_microsoft.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -87,7 +87,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
elif test "x$TARGET_CPU" = xaarch64; then
# for host x86-64, target aarch64
# aarch64 requires Visual Studio 16.8 or higher
- VCVARSFILES="vcvarsamd64_arm64.bat vcvarsx86_arm64.bat"
+ VCVARSFILES="vcvarsarm64.bat vcvarsamd64_arm64.bat vcvarsx86_arm64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
diff --git a/make/autoconf/util.m4 b/make/autoconf/util.m4
index aa9662e210017..12c9c92b49291 100644
--- a/make/autoconf/util.m4
+++ b/make/autoconf/util.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -566,6 +566,14 @@ AC_DEFUN([UTIL_CHECK_TYPE_file],
fi
])
+AC_DEFUN([UTIL_CHECK_TYPE_executable],
+[
+ # Check that the argument is an existing file that the user has execute access to.
+ if (test ! -x "$1") || (test ! -f "$1") ; then
+ FAILURE="File $1 does not exist or is not executable"
+ fi
+])
+
AC_DEFUN([UTIL_CHECK_TYPE_directory],
[
# Check that the argument is an existing directory
@@ -648,7 +656,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_features],
# Arguments:
# NAME: The base name of this option (i.e. what follows --with-). Required.
# TYPE: The type of the value. Can be one of "string", "integer", "file",
-# "directory", "literal", "multivalue" or "features". Required.
+# "executable", "directory", "literal", "multivalue" or "features". Required.
# DEFAULT: The default value for this option. Can be any valid string.
# Required.
# OPTIONAL: If this feature can be disabled. Defaults to false. If true,
@@ -758,7 +766,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
# Need to assign since we can't expand ARG TYPE inside the m4 quoted if statement
TEST_TYPE="ARG_TYPE"
# Additional [] needed to keep m4 from mangling shell constructs.
- [ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|directory|literal|multivalue|features)$ ]] ; then ]
+ [ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|executable|directory|literal|multivalue|features)$ ]] ; then ]
AC_MSG_ERROR([Internal error: Argument TYPE to [UTIL_ARG_WITH] must be a valid type, was: 'ARG_TYPE'])
fi
diff --git a/make/autoconf/util_paths.m4 b/make/autoconf/util_paths.m4
index 9e3e5472c9e49..40864680aadd8 100644
--- a/make/autoconf/util_paths.m4
+++ b/make/autoconf/util_paths.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -58,21 +58,32 @@ AC_DEFUN([UTIL_PREPEND_TO_PATH],
# 2) The path will be absolute, and it will be in unix-style (on
# cygwin).
# $1: The name of the variable to fix
-# $2: if NOFAIL, errors will be silently ignored
+# $2: if NOFAIL, if the path cannot be resolved then errors will not be
+# reported and an empty path will be set
AC_DEFUN([UTIL_FIXUP_PATH],
[
# Only process if variable expands to non-empty
path="[$]$1"
if test "x$path" != x; then
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- if test "x$2" = "xNOFAIL"; then
- quiet_option="-q"
+ imported_path=`$FIXPATH_BASE -q import "$path"`
+ if test $? -ne 0 || test ! -e $imported_path; then
+ if test "x$2" != "xNOFAIL"; then
+ AC_MSG_NOTICE([The path of $1, which is given as "$path", can not be properly resolved.])
+ AC_MSG_NOTICE([Please see the section "Special Considerations" in building.md.])
+ AC_MSG_NOTICE([This is the error message given by fixpath:])
+ # Rerun fixpath without -q to get an error message
+ $FIXPATH_BASE import "$path"
+ AC_MSG_ERROR([Cannot continue])
+ else
+ imported_path=""
+ fi
fi
- imported_path=`$FIXPATH_BASE $quiet_option import "$path"`
- $FIXPATH_BASE verify "$imported_path"
+
+ $FIXPATH_BASE -q verify "$imported_path"
if test $? -ne 0; then
if test "x$2" != "xNOFAIL"; then
- AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be imported.])
+ AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be verified.])
else
imported_path=""
fi
@@ -83,7 +94,7 @@ AC_DEFUN([UTIL_FIXUP_PATH],
if test "x$imported_path_lower" != "x$orig_path_lower"; then
$1="$imported_path"
fi
- else
+ else # non-Windows
[ if [[ "$path" =~ " " ]]; then ]
if test "x$2" != "xNOFAIL"; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
@@ -186,7 +197,6 @@ AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
# it need to be in the PATH.
# $1: The name of the variable to fix
# $2: Where to look for the command (replaces $PATH)
-# $3: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
[
input="[$]$1"
@@ -233,15 +243,19 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
# This is a path with slashes, don't look at $PATH
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
# fixpath.sh import will do all heavy lifting for us
- new_path=`$FIXPATH_BASE import "$path"`
+ new_path=`$FIXPATH_BASE -q import "$path"`
- if test ! -e $new_path; then
+ if test $? -ne 0 || test ! -e $new_path; then
# It failed, but maybe spaces were part of the path and not separating
# the command and argument. Retry using that assumption.
- new_path=`$FIXPATH_BASE import "$input"`
- if test ! -e $new_path; then
- AC_MSG_NOTICE([The command for $1, which resolves as "$input", can not be found.])
- AC_MSG_ERROR([Cannot locate $input])
+ new_path=`$FIXPATH_BASE -q import "$input"`
+ if test $? -ne 0 || test ! -e $new_path; then
+ AC_MSG_NOTICE([The command for $1, which is given as "$input", can not be properly resolved.])
+ AC_MSG_NOTICE([Please see the section "Special Considerations" in building.md.])
+ AC_MSG_NOTICE([This is the error message given by fixpath:])
+ # Rerun fixpath without -q to get an error message
+ $FIXPATH_BASE import "$input"
+ AC_MSG_ERROR([Cannot continue])
fi
# It worked, clear all "arguments"
arguments=""
@@ -282,10 +296,6 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
fi
fi
- if test "x$3" = xNOFIXPATH; then
- fixpath_prefix=""
- fi
-
# Now join together the path and the arguments once again
new_complete="$fixpath_prefix$new_path$arguments"
$1="$new_complete"
@@ -353,7 +363,15 @@ AC_DEFUN([UTIL_SETUP_TOOL],
else
# Otherwise we believe it is a complete path. Use it as it is.
if test ! -x "$tool_command" && test ! -x "${tool_command}.exe"; then
- AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
+ # Maybe the path had spaces in it; try again with the entire argument
+ if test ! -x "$tool_override" && test ! -x "${tool_override}.exe"; then
+ AC_MSG_ERROR([User supplied tool $1="$tool_override" does not exist or is not executable])
+ else
+ # We successfully located the executable assuming the spaces were part of the path.
+ # We can't combine using paths with spaces and arguments, so assume tool_args is empty.
+ tool_command="$tool_override"
+ tool_args=""
+ fi
fi
if test ! -x "$tool_command"; then
tool_command="${tool_command}.exe"
@@ -379,7 +397,6 @@ AC_DEFUN([UTIL_SETUP_TOOL],
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
-# $4: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
AC_DEFUN([UTIL_LOOKUP_PROGS],
[
UTIL_SETUP_TOOL($1, [
@@ -421,10 +438,8 @@ AC_DEFUN([UTIL_LOOKUP_PROGS],
# If we have FIXPATH enabled, strip all instances of it and prepend
# a single one, to avoid double fixpath prefixing.
- if test "x$4" != xNOFIXPATH; then
- [ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
- result="\$FIXPATH ${result#"$FIXPATH "}"
- fi
+ [ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
+ result="\$FIXPATH ${result#"$FIXPATH "}"
fi
AC_MSG_RESULT([$result])
break 2;
@@ -515,6 +530,24 @@ AC_DEFUN([UTIL_ADD_FIXPATH],
fi
])
+################################################################################
+# Return a path to the executable binary from a command line, stripping away
+# any FIXPATH prefix or arguments. The resulting value can be checked for
+# existence using "test -e". The result is returned in a variable named
+# "$1_EXECUTABLE".
+#
+# $1: variable describing the command to get the binary for
+AC_DEFUN([UTIL_GET_EXECUTABLE],
+[
+ # Strip the FIXPATH prefix, if any
+ fixpath_stripped="[$]$1"
+ [ if [[ $FIXPATH != "" && $fixpath_stripped =~ ^"$FIXPATH " ]]; then ]
+ fixpath_stripped="${fixpath_stripped#"$FIXPATH "}"
+ fi
+ # Remove any arguments following the binary
+ $1_EXECUTABLE="${fixpath_stripped%% *}"
+])
+
################################################################################
AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
[
diff --git a/make/common/FindTests.gmk b/make/common/FindTests.gmk
index 1f3a70b30356a..517bb2973f4e6 100644
--- a/make/common/FindTests.gmk
+++ b/make/common/FindTests.gmk
@@ -58,13 +58,15 @@ ifeq ($(GENERATE_FIND_TESTS_FILE), true)
$(TOPDIR)/test/make/TestMake.gmk
$(call MakeTargetDir)
( $(foreach root, $(JTREG_TESTROOTS), \
- $(PRINTF) "\n$(root)_JTREG_TEST_GROUPS := " ; \
+ $(ECHO) ""; \
+ $(PRINTF) "\n%s_JTREG_TEST_GROUPS := " "$(root)"; \
$(SED) -n -e 's/^\#.*//g' -e 's/\([^ ]*\)\w*=.*/\1/gp' \
$($(root)_JTREG_GROUP_FILES) \
| $(SORT) -u | $(TR) '\n' ' ' ; \
) \
) > $@
- $(PRINTF) "\nMAKE_TEST_TARGETS := " >> $@
+ $(ECHO) "" >> $@
+ $(PRINTF) "MAKE_TEST_TARGETS := " >> $@
$(MAKE) -s --no-print-directory $(MAKE_ARGS) \
SPEC=$(SPEC) -f $(TOPDIR)/test/make/TestMake.gmk print-targets \
TARGETS_FILE=$@
diff --git a/make/common/JarArchive.gmk b/make/common/JarArchive.gmk
index 1f8ed1bc002ef..26a98f289498b 100644
--- a/make/common/JarArchive.gmk
+++ b/make/common/JarArchive.gmk
@@ -256,7 +256,7 @@ define SetupJarArchiveBody
$$(if $$($1_JARMAIN), \
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
$$(if $$($1_EXTRA_MANIFEST_ATTR), \
- $(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
+ $(ECHO) "$$($1_EXTRA_MANIFEST_ATTR)" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
$(ECHO) Creating $$($1_NAME) $$(NEWLINE) \
$$($1_JAR_CMD) --create $$($1_JAR_OPTIONS) --file $$@ --manifest $$($1_MANIFEST_FILE) $$(NEWLINE) \
$$($1_SCAPTURE_CONTENTS) \
diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk
index f48aefcd51700..c5a74413de19e 100644
--- a/make/common/JavaCompilation.gmk
+++ b/make/common/JavaCompilation.gmk
@@ -80,15 +80,13 @@ endef
#
# The sed expression does this:
# 1. Add a backslash before any :, = or ! that do not have a backslash already.
-# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
-# conversions.
-# 3. Delete all lines starting with #.
-# 4. Delete empty lines.
-# 5. Append lines ending with \ with the next line.
-# 6. Remove leading and trailing white space. Note that tabs must be explicit
+# 2. Delete all lines starting with #.
+# 3. Delete empty lines.
+# 4. Append lines ending with \ with the next line.
+# 5. Remove leading and trailing white space. Note that tabs must be explicit
# as sed on macosx does not understand '\t'.
-# 7. Replace the first \= with just =.
-# 8. Finally it's all sorted to create a stable output.
+# 6. Replace the first \= with just =.
+# 7. Finally it's all sorted to create a stable output.
#
# It is assumed that = is the character used for separating names and values.
define add_file_to_clean
@@ -108,7 +106,6 @@ define add_file_to_clean
( $(CAT) $$< && $(ECHO) "" ) \
| $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
-e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \
- | $(SED) -f "$$(TOPDIR)/make/common/support/unicode2x.sed" \
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
-e 's/^[ ]*//;s/[ ]*$$$$//' \
@@ -155,6 +152,7 @@ endef
# INCLUDE_FILES "com/sun/SolarisFoobar.java" means only compile this file!
# EXCLUDE_FILES "com/sun/SolarisFoobar.java" means do not compile this particular file!
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
+# EXCLUDE_PATTERNS Exclude files matching any of these substrings
# EXTRA_FILES List of extra source files to include in compilation. Can be used to
# specify files that need to be generated by other rules first.
# HEADERS path to directory where all generated c-headers are written.
@@ -264,14 +262,17 @@ define SetupJavaCompilationBody
$$(error Invalid value for COMPILER in SetupJavaCompilation for $1: '$$($1_COMPILER)')
endif
- # Allow overriding on the command line
- JAVA_WARNINGS_ARE_ERRORS ?= -Werror
-
# Tell javac to do exactly as told and no more
- PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii
+ PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true
- $1_FLAGS += -g -Xlint:all $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS) $$(JAVA_WARNINGS_ARE_ERRORS)
+ $1_FLAGS += -g -Xlint:all $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS)
$1_FLAGS += $$($1_JAVAC_FLAGS)
+ # Set character encoding in source
+ $1_FLAGS += -encoding utf-8
+
+ ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
+ $1_FLAGS += -Werror
+ endif
ifneq ($$($1_DISABLED_WARNINGS), )
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
@@ -332,6 +333,20 @@ define SetupJavaCompilationBody
$1_INCLUDE_PATTERN += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_INCLUDES))))
endif
+ ifneq ($$($1_EXCLUDE_PATTERNS), )
+ # We must not match the exclude pattern against the src roots, so first
+ # strip the src prefixes from the absolute file paths in SRCS.
+ $1_SRCS_WITHOUT_ROOTS := $$(foreach i, $$($1_SRC), \
+ $$(patsubst $$i/%,%, $$(filter $$i/%, $$($1_SRCS))))
+ $1_EXCLUDE_PATTERNS_WITHOUT_ROOTS := $$(call containing, \
+ $$($1_EXCLUDE_PATTERNS), $$($1_SRCS_WITHOUT_ROOTS))
+ # The add back all possible src prefixes; this will generate more paths
+ # than really exists, but it does not matter since we will use this as
+ # input to filter-out.
+ $1_EXCLUDE_PATTERN += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, \
+ $$($1_EXCLUDE_PATTERNS_WITHOUT_ROOTS)))
+ endif
+
# Apply include/exclude patterns to java sources
ifneq ($$($1_EXCLUDE_PATTERN), )
$1_SRCS := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_SRCS))
diff --git a/make/common/JdkNativeCompilation.gmk b/make/common/JdkNativeCompilation.gmk
index 372ad39305c59..0285669ffd8ff 100644
--- a/make/common/JdkNativeCompilation.gmk
+++ b/make/common/JdkNativeCompilation.gmk
@@ -227,6 +227,8 @@ endef
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
+# \xA9 is the copyright symbol in ANSI encoding (Windows-1252), which rc.exe
+# assumes the resource file is in.
JDK_RCFLAGS=$(RCFLAGS) \
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
-D"JDK_COMPANY=$(JDK_RC_COMPANY_NAME)" \
diff --git a/make/common/LogUtils.gmk b/make/common/LogUtils.gmk
index b32f6179ac732..50969733320bf 100644
--- a/make/common/LogUtils.gmk
+++ b/make/common/LogUtils.gmk
@@ -64,12 +64,6 @@ define ParseLogValue
endef
define ParseLogLevel
- # Catch old-style VERBOSE= command lines.
- ifneq ($$(origin VERBOSE), undefined)
- $$(info Error: VERBOSE is deprecated. Use LOG= instead.)
- $$(error Cannot continue)
- endif
-
# Setup logging according to LOG
# If "nofile" is present, do not log to a file
diff --git a/make/common/MakeFileStart.gmk b/make/common/MakeFileStart.gmk
index f1dd0abb792c3..f18c623d3e8d2 100644
--- a/make/common/MakeFileStart.gmk
+++ b/make/common/MakeFileStart.gmk
@@ -47,7 +47,7 @@ endif
# We need spec.gmk to get $(TOPDIR)
include $(SPEC)
-THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH)))
+THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH))))
ifeq ($(LOG_FLOW), true)
$(info :Enter $(THIS_MAKEFILE))
diff --git a/make/common/MakeIncludeEnd.gmk b/make/common/MakeIncludeEnd.gmk
index f0520d84b6ca2..7023a861fa149 100644
--- a/make/common/MakeIncludeEnd.gmk
+++ b/make/common/MakeIncludeEnd.gmk
@@ -34,12 +34,12 @@ ifneq ($(NO_CUSTOM_EXTENSIONS), true)
endif
# Pop our helper name off the stack
-HELPER_STACK := $(wordlist 2, $(words $(HELPER_STACK)), $(HELPER_STACK))
+INCLUDE_STACK := $(wordlist 2, $(words $(INCLUDE_STACK)), $(INCLUDE_STACK))
# Print an indented message, also counting the top-level makefile as a level
ifeq ($(LOG_FLOW), true)
- $(info :$(foreach s, top $(HELPER_STACK), )Leave $(THIS_INCLUDE))
+ $(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Leave $(THIS_INCLUDE))
endif
# Restore the previous helper name
-THIS_INCLUDE := $(firstword $(HELPER_STACK))
+THIS_INCLUDE := $(firstword $(INCLUDE_STACK))
diff --git a/make/common/MakeIncludeStart.gmk b/make/common/MakeIncludeStart.gmk
index e754114211c4b..3904633f9f218 100644
--- a/make/common/MakeIncludeStart.gmk
+++ b/make/common/MakeIncludeStart.gmk
@@ -29,7 +29,7 @@
# Get the next to last word (by prepending a padding element)
THIS_INCLUDE_PATH := $(word $(words ${MAKEFILE_LIST}),padding ${MAKEFILE_LIST})
-THIS_INCLUDE := $(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH))
+THIS_INCLUDE := $(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH)))
# Print an indented message, also counting the top-level makefile as a level
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
@@ -39,11 +39,11 @@ else
endif
ifeq ($(LOG_FLOW), true)
- $(info :$(foreach s, top $(HELPER_STACK), )Enter $(THIS_INCLUDE) [$(THIS_INCLUDE_MSG)])
+ $(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Enter $(THIS_INCLUDE) [$(THIS_INCLUDE_MSG)])
endif
-ifneq ($(filter $(THIS_INCLUDE), $(HELPER_STACK)), )
- $(error Internal makefile error: Include loop detected: $(THIS_INCLUDE) $(HELPER_STACK))
+ifneq ($(filter $(THIS_INCLUDE), $(INCLUDE_STACK)), )
+ $(error Internal makefile error: Include loop detected: $(THIS_INCLUDE) $(INCLUDE_STACK))
endif
ifeq ($(words $(MAKEFILE_LIST)), 2)
@@ -66,7 +66,7 @@ ifneq ($(IS_PREINIT_ENV), true)
endif
# Push our helper name onto the stack
-HELPER_STACK := $(THIS_INCLUDE) $(HELPER_STACK)
+INCLUDE_STACK := $(THIS_INCLUDE) $(INCLUDE_STACK)
# Setup an automatic include guard
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
diff --git a/make/common/MakeSnippetEnd.gmk b/make/common/MakeSnippetEnd.gmk
index 833df2e9edb45..7b46310330ac6 100644
--- a/make/common/MakeSnippetEnd.gmk
+++ b/make/common/MakeSnippetEnd.gmk
@@ -34,12 +34,12 @@ ifneq ($(NO_CUSTOM_EXTENSIONS), true)
endif
# Pop our helper name off the stack
-HELPER_STACK := $(wordlist 2, $(words $(HELPER_STACK)), $(HELPER_STACK))
+SNIPPET_STACK := $(wordlist 2, $(words $(SNIPPET_STACK)), $(SNIPPET_STACK))
# Print an indented message, also counting the top-level makefile as a level
ifeq ($(LOG_FLOW), true)
- $(info :$(foreach s, top $(HELPER_STACK), )Leave $(THIS_SNIPPET))
+ $(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Leave $(THIS_SNIPPET))
endif
# Restore the previous helper name
-THIS_SNIPPET := $(firstword $(HELPER_STACK))
+THIS_SNIPPET := $(firstword $(SNIPPET_STACK))
diff --git a/make/common/MakeSnippetStart.gmk b/make/common/MakeSnippetStart.gmk
index dfe7f9f0007d7..1df5a1e20cb8d 100644
--- a/make/common/MakeSnippetStart.gmk
+++ b/make/common/MakeSnippetStart.gmk
@@ -33,11 +33,11 @@ endif
# Print an indented message, also counting the top-level makefile as a level
ifeq ($(LOG_FLOW), true)
- $(info :$(foreach s, top $(HELPER_STACK), )Enter $(THIS_SNIPPET) [snippet])
+ $(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Enter $(THIS_SNIPPET) [snippet])
endif
# Push our helper name onto the stack
-HELPER_STACK := $(THIS_SNIPPET) $(HELPER_STACK)
+SNIPPET_STACK := $(THIS_SNIPPET) $(SNIPPET_STACK)
# Hook to include the corresponding custom file, if present.
ifneq ($(NO_CUSTOM_EXTENSIONS), true)
diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk
index 03548ca877817..725424d7618da 100644
--- a/make/common/Modules.gmk
+++ b/make/common/Modules.gmk
@@ -87,7 +87,10 @@ SRC_SUBDIRS += share/classes
SPEC_SUBDIRS += share/specs
-MAN_SUBDIRS += share/man windows/man
+MAN_SUBDIRS += share/man $(TARGET_OS)/man
+
+# The docs should include the sum of all man pages for all platforms
+MAN_DOCS_SUBDIRS += share/man windows/man
# Find all module-info.java files for the current build target platform and
# configuration.
@@ -153,6 +156,10 @@ FindModuleManDirs = \
$(strip $(wildcard \
$(foreach sub, $(MAN_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
+FindModuleManDirsForDocs = \
+ $(strip $(wildcard \
+ $(foreach sub, $(MAN_DOCS_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
+
# Construct the complete module source path
GetModuleSrcPath = \
$(call PathList, \
@@ -173,7 +180,7 @@ ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
$(call MakeTargetDir)
$(RM) $@
$(foreach m, $(MODULE_INFOS), \
- ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) := " && \
+ ( $(PRINTF) "DEPS_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
/^ *requires/ { sub(/;/, ""); \
@@ -187,7 +194,7 @@ ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
gsub(/\r/, ""); \
printf(" %s", $$0) } \
END { printf("\n") }' $m && \
- $(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) := " && \
+ $(PRINTF) "TRANSITIVE_MODULES_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
/^ *requires *transitive/ { \
diff --git a/make/common/TestFilesCompilation.gmk b/make/common/TestFilesCompilation.gmk
index 9e076590cf31c..fd1c54eaf4848 100644
--- a/make/common/TestFilesCompilation.gmk
+++ b/make/common/TestFilesCompilation.gmk
@@ -43,6 +43,9 @@ include JdkNativeCompilation.gmk
# OUTPUT_DIR Where to put the resulting files
# EXCLUDE A list of filenames to exclude from compilation
# EXTRA_FILES List of extra files not in SOURCE_DIRS
+# CFLAGS List of extra CFLAGS to pass on for each test
+# LDFLAGS List of extra LDFLAGS to pass on for each test
+# LIBS List of extra LIBS to pass on for each test
SetupTestFilesCompilation = $(NamedParamsMacroTemplate)
define SetupTestFilesCompilationBody
@@ -108,7 +111,7 @@ define SetupTestFilesCompilationBody
CFLAGS := $$(TEST_CFLAGS) $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
CXXFLAGS := $$(TEST_CFLAGS) $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
LD_SET_ORIGIN := $$($1_LD_SET_ORIGIN), \
- LDFLAGS := $$($1_LDFLAGS_$$(name)), \
+ LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$(name)), \
DISABLED_WARNINGS_gcc := format undef unused-but-set-variable \
unused-const-variable unused-function unused-value \
unused-variable, \
@@ -117,7 +120,7 @@ define SetupTestFilesCompilationBody
unused-but-set-variable unused-function unused-variable, \
DEFAULT_LIBCXX := false, \
JDK_LIBS := $$($1_JDK_LIBS_$$(name)), \
- LIBS := $$($1_LIBS_$$(name)), \
+ LIBS := $$($1_LIBS) $$($1_LIBS_$$(name)), \
DEFAULT_VERSIONINFO_RESOURCE := false, \
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)), $$($1_OPTIMIZATION_$$(name)), LOW), \
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
diff --git a/make/common/modules/GensrcCommon.gmk b/make/common/modules/GensrcCommon.gmk
index 64d1f71d82e65..2a94c3f9a4200 100644
--- a/make/common/modules/GensrcCommon.gmk
+++ b/make/common/modules/GensrcCommon.gmk
@@ -41,8 +41,8 @@ include $(TOPDIR)/make/ToolsJdk.gmk
define SetupVersionProperties
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2):
$$(call MakeTargetDir)
- $(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \
- > $$@
+ $(PRINTF) "jdk=%s\nfull=%s\nrelease=%s\n" \
+ $(VERSION_NUMBER) $(VERSION_STRING) $(VERSION_SHORT) > $$@
$$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
endef
diff --git a/make/common/native/Link.gmk b/make/common/native/Link.gmk
index 7cf6c97b27c30..e888edfcc4c98 100644
--- a/make/common/native/Link.gmk
+++ b/make/common/native/Link.gmk
@@ -203,6 +203,10 @@ define CreateDynamicLibraryOrExecutable
$(CODESIGN) -f -s $$($1_CODESIGN_OPTS) --entitlements \
$$(call GetEntitlementsFile, $$@) $$@)
endif
+ ifneq ($(SIGNING_HOOK), )
+ $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_call_signing_hook, \
+ $(SIGNING_HOOK) $$($1_TARGET))
+ endif
# This is for IDE integration purposes only, and is not normally generated
$1_LDFLAGS_FILE := $$(MAKESUPPORT_OUTPUTDIR)/compile-commands/$$($1_UNIQUE_NAME)-ldflags.txt
diff --git a/make/common/native/LinkMicrosoft.gmk b/make/common/native/LinkMicrosoft.gmk
index 55f8e5684e74d..a53afba400113 100644
--- a/make/common/native/LinkMicrosoft.gmk
+++ b/make/common/native/LinkMicrosoft.gmk
@@ -117,6 +117,10 @@ define CreateDynamicLibraryOrExecutableMicrosoft
-identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" \
-outputresource:$$@;#1
endif
+ ifneq ($(SIGNING_HOOK), )
+ $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_call_signing_hook, \
+ $(SIGNING_HOOK) $$($1_TARGET))
+ endif
endef
################################################################################
diff --git a/make/common/native/Paths.gmk b/make/common/native/Paths.gmk
index ee097b2e134ff..bdb8828eb3279 100644
--- a/make/common/native/Paths.gmk
+++ b/make/common/native/Paths.gmk
@@ -128,10 +128,9 @@ define SetupSourceFiles
# Extract the C/C++ files.
ifneq ($$($1_EXCLUDE_PATTERNS), )
# We must not match the exclude pattern against the src root(s).
- $1_SRCS_WITHOUT_ROOTS := $$($1_SRCS)
- $$(foreach i, $$($1_SRC), $$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
- $$i/%,%, $$($1_SRCS_WITHOUT_ROOTS))))
- $1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
+ $1_SRCS_WITHOUT_ROOTS := $$(foreach i, $$($1_SRC), \
+ $$(patsubst $$i/%,%, $$(filter $$i/%, $$($1_SRCS))))
+ $1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
$$($1_SRCS_WITHOUT_ROOTS))
endif
ifneq ($$($1_EXCLUDE_FILES), )
diff --git a/make/common/support/unicode2x.sed b/make/common/support/unicode2x.sed
deleted file mode 100644
index 5188b97fe032a..0000000000000
--- a/make/common/support/unicode2x.sed
+++ /dev/null
@@ -1,100 +0,0 @@
-s/\\u0020/\x20/g
-s/\\u003A/\x3A/g
-s/\\u006B/\x6B/g
-s/\\u0075/\x75/g
-s/\\u00A0/\xA0/g
-s/\\u00A3/\xA3/g
-s/\\u00B0/\xB0/g
-s/\\u00B7/\xB7/g
-s/\\u00BA/\xBA/g
-s/\\u00BF/\xBF/g
-s/\\u00C0/\xC0/g
-s/\\u00C1/\xC1/g
-s/\\u00C2/\xC2/g
-s/\\u00C4/\xC4/g
-s/\\u00C5/\xC5/g
-s/\\u00C8/\xC8/g
-s/\\u00C9/\xC9/g
-s/\\u00CA/\xCA/g
-s/\\u00CD/\xCD/g
-s/\\u00CE/\xCE/g
-s/\\u00D3/\xD3/g
-s/\\u00D4/\xD4/g
-s/\\u00D6/\xD6/g
-s/\\u00DA/\xDA/g
-s/\\u00DC/\xDC/g
-s/\\u00DD/\xDD/g
-s/\\u00DF/\xDF/g
-s/\\u00E0/\xE0/g
-s/\\u00E1/\xE1/g
-s/\\u00E2/\xE2/g
-s/\\u00E3/\xE3/g
-s/\\u00E4/\xE4/g
-s/\\u00E5/\xE5/g
-s/\\u00E6/\xE6/g
-s/\\u00E7/\xE7/g
-s/\\u00E8/\xE8/g
-s/\\u00E9/\xE9/g
-s/\\u00EA/\xEA/g
-s/\\u00EB/\xEB/g
-s/\\u00EC/\xEC/g
-s/\\u00ED/\xED/g
-s/\\u00EE/\xEE/g
-s/\\u00EF/\xEF/g
-s/\\u00F1/\xF1/g
-s/\\u00F2/\xF2/g
-s/\\u00F3/\xF3/g
-s/\\u00F4/\xF4/g
-s/\\u00F5/\xF5/g
-s/\\u00F6/\xF6/g
-s/\\u00F9/\xF9/g
-s/\\u00FA/\xFA/g
-s/\\u00FC/\xFC/g
-s/\\u0020/\x20/g
-s/\\u003f/\x3f/g
-s/\\u006f/\x6f/g
-s/\\u0075/\x75/g
-s/\\u00a0/\xa0/g
-s/\\u00a3/\xa3/g
-s/\\u00b0/\xb0/g
-s/\\u00ba/\xba/g
-s/\\u00bf/\xbf/g
-s/\\u00c1/\xc1/g
-s/\\u00c4/\xc4/g
-s/\\u00c5/\xc5/g
-s/\\u00c8/\xc8/g
-s/\\u00c9/\xc9/g
-s/\\u00ca/\xca/g
-s/\\u00cd/\xcd/g
-s/\\u00d6/\xd6/g
-s/\\u00dc/\xdc/g
-s/\\u00dd/\xdd/g
-s/\\u00df/\xdf/g
-s/\\u00e0/\xe0/g
-s/\\u00e1/\xe1/g
-s/\\u00e2/\xe2/g
-s/\\u00e3/\xe3/g
-s/\\u00e4/\xe4/g
-s/\\u00e5/\xe5/g
-s/\\u00e7/\xe7/g
-s/\\u00e8/\xe8/g
-s/\\u00e9/\xe9/g
-s/\\u00ea/\xea/g
-s/\\u00eb/\xeb/g
-s/\\u00ec/\xec/g
-s/\\u00ed/\xed/g
-s/\\u00ee/\xee/g
-s/\\u00ef/\xef/g
-s/\\u00f0/\xf0/g
-s/\\u00f1/\xf1/g
-s/\\u00f2/\xf2/g
-s/\\u00f3/\xf3/g
-s/\\u00f4/\xf4/g
-s/\\u00f5/\xf5/g
-s/\\u00f6/\xf6/g
-s/\\u00f7/\xf7/g
-s/\\u00f8/\xf8/g
-s/\\u00f9/\xf9/g
-s/\\u00fa/\xfa/g
-s/\\u00fc/\xfc/g
-s/\\u00ff/\xff/g
diff --git a/make/conf/github-actions.conf b/make/conf/github-actions.conf
index a6b383daa8fd4..27845ffbd7aa0 100644
--- a/make/conf/github-actions.conf
+++ b/make/conf/github-actions.conf
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2020, 2025, 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
@@ -26,24 +26,24 @@
# Versions and download locations for dependencies used by GitHub Actions (GHA)
GTEST_VERSION=1.14.0
-JTREG_VERSION=7.4+1
+JTREG_VERSION=7.5.1+1
LINUX_X64_BOOT_JDK_EXT=tar.gz
-LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk23/3c5b90190c68498b986a97f276efd28a/37/GPL/openjdk-23_linux-x64_bin.tar.gz
-LINUX_X64_BOOT_JDK_SHA256=08fea92724127c6fa0f2e5ea0b07ff4951ccb1e2f22db3c21eebbd7347152a67
+LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_linux-x64_bin.tar.gz
+LINUX_X64_BOOT_JDK_SHA256=88b090fa80c6c1d084ec9a755233967458788e2c0777ae2e172230c5c692d7ef
ALPINE_LINUX_X64_BOOT_JDK_EXT=tar.gz
-ALPINE_LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_x64_alpine-linux_hotspot_23_37.tar.gz
-ALPINE_LINUX_X64_BOOT_JDK_SHA256=bff4c78f30d8d173e622bf2f40c36113df47337fc6d1ee5105ed2459841165aa
+ALPINE_LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24%2B36/OpenJDK24U-jdk_x64_alpine-linux_hotspot_24_36.tar.gz
+ALPINE_LINUX_X64_BOOT_JDK_SHA256=a642608f0da78344ee6812fb1490b8bc1d7ad5a18064c70994d6f330568c51cb
MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
-MACOS_AARCH64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk23/3c5b90190c68498b986a97f276efd28a/37/GPL/openjdk-23_macos-aarch64_bin.tar.gz
-MACOS_AARCH64_BOOT_JDK_SHA256=9527bf080a74ae6dca51df413aa826f0c011c6048885e4c8ad112172be8815f3
+MACOS_AARCH64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_macos-aarch64_bin.tar.gz
+MACOS_AARCH64_BOOT_JDK_SHA256=f7133238a12714a62c5ad2bd4da6741130be1a82512065da9ca23dee26b2d3d3
MACOS_X64_BOOT_JDK_EXT=tar.gz
-MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk23/3c5b90190c68498b986a97f276efd28a/37/GPL/openjdk-23_macos-x64_bin.tar.gz
-MACOS_X64_BOOT_JDK_SHA256=5c3a909fd2079d0e376dd43c85c4f7d02d08914866f196480bd47784b2a0121e
+MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_macos-x64_bin.tar.gz
+MACOS_X64_BOOT_JDK_SHA256=6bbfb1d01741cbe55ab90299cb91464b695de9a3ace85c15131aa2f50292f321
WINDOWS_X64_BOOT_JDK_EXT=zip
-WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk23/3c5b90190c68498b986a97f276efd28a/37/GPL/openjdk-23_windows-x64_bin.zip
-WINDOWS_X64_BOOT_JDK_SHA256=cba5013874ba50cae543c86fe6423453816c77281e2751a8a9a633d966f1dc04
+WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_windows-x64_bin.zip
+WINDOWS_X64_BOOT_JDK_SHA256=11d1d9f6ac272d5361c8a0bef01894364081c7fb1a6914c2ad2fc312ae83d63b
diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js
index 9f04fce2ca6c5..172ed74f4cddf 100644
--- a/make/conf/jib-profiles.js
+++ b/make/conf/jib-profiles.js
@@ -207,7 +207,8 @@ var getJibProfiles = function (input) {
// Exclude list to use when Jib creates a source bundle
data.src_bundle_excludes = [
"build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork*", "{,**/}JTreport*",
- "{,**/}.git"
+ "{,**/}.git",
+ "{,**/}core.[0-9]*"
];
// Include list to use when creating a minimal jib source bundle which
// contains just the jib configuration files.
@@ -240,10 +241,10 @@ var getJibProfilesCommon = function (input, data) {
// List of the main profile names used for iteration
common.main_profile_names = [
- "linux-x64", "linux-x86", "macosx-x64", "macosx-aarch64",
+ "macosx-x64", "macosx-aarch64",
"windows-x64", "windows-aarch64",
- "linux-aarch64", "linux-arm32", "linux-ppc64le", "linux-s390x",
- "linux-riscv64"
+ "linux-x64", "linux-aarch64",
+ "linux-arm32", "linux-ppc64le", "linux-s390x", "linux-riscv64"
];
// These are the base settings for all the main build profiles.
@@ -282,9 +283,6 @@ var getJibProfilesCommon = function (input, data) {
labels: "open"
};
- common.configure_args_64bit = ["--with-target-bits=64"];
- common.configure_args_32bit = ["--with-target-bits=32"];
-
/**
* Define common artifacts template for all main profiles
* @param o - Object containing data for artifacts
@@ -390,8 +388,8 @@ var getJibProfilesCommon = function (input, data) {
};
};
- common.boot_jdk_version = "23";
- common.boot_jdk_build_number = "37";
+ common.boot_jdk_version = "24";
+ common.boot_jdk_build_number = "36";
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
+ common.boot_jdk_version
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
@@ -411,58 +409,34 @@ var getJibProfilesProfiles = function (input, common, data) {
// Main SE profiles
var profiles = {
-
- "linux-x64": {
- target_os: "linux",
- target_cpu: "x64",
- dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
- configure_args: concat(
- (input.build_cpu == "x64" ? common.configure_args_64bit
- : "--openjdk-target=x86_64-linux-gnu"),
- "--with-zlib=system", "--disable-dtrace",
- (isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu",
- "--build=x86_64-unknown-linux-gnu" ] : [])),
- },
-
- "linux-x86": {
- target_os: "linux",
- target_cpu: "x86",
- build_cpu: "x64",
- dependencies: ["devkit", "gtest", "libffi"],
- configure_args: concat(common.configure_args_32bit, [
- "--with-jvm-variants=minimal,server",
- "--with-zlib=system",
- "--with-libffi=" + input.get("libffi", "home_path"),
- "--enable-libffi-bundling",
- "--enable-fallback-linker"
- ])
- },
-
"macosx-x64": {
target_os: "macosx",
target_cpu: "x64",
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "tidy"],
- configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
+ configure_args: [
+ "--with-zlib=system",
"--with-macosx-version-max=11.00.00",
"--enable-compatible-cds-alignment",
// Use system SetFile instead of the one in the devkit as the
// devkit one may not work on Catalina.
- "SETFILE=/usr/bin/SetFile"),
+ "SETFILE=/usr/bin/SetFile"
+ ],
},
"macosx-aarch64": {
target_os: "macosx",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "tidy"],
- configure_args: concat(common.configure_args_64bit,
- "--with-macosx-version-max=11.00.00"),
+ configure_args: [
+ "--with-macosx-version-max=11.00.00"
+ ],
},
"windows-x64": {
target_os: "windows",
target_cpu: "x64",
dependencies: ["devkit", "gtest", "pandoc"],
- configure_args: concat(common.configure_args_64bit),
+ configure_args: [],
},
"windows-aarch64": {
@@ -474,7 +448,19 @@ var getJibProfilesProfiles = function (input, common, data) {
],
},
- "linux-aarch64": {
+ "linux-x64": {
+ target_os: "linux",
+ target_cpu: "x64",
+ dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
+ configure_args: concat(
+ "--with-zlib=system",
+ "--disable-dtrace",
+ (cross_compiling ? [ "--openjdk-target=x86_64-linux-gnu" ] : []),
+ (isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu",
+ "--build=x86_64-unknown-linux-gnu" ] : [])),
+ },
+
+ "linux-aarch64": {
target_os: "linux",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
@@ -491,8 +477,10 @@ var getJibProfilesProfiles = function (input, common, data) {
build_cpu: "x64",
dependencies: ["devkit", "gtest", "build_devkit"],
configure_args: [
- "--openjdk-target=arm-linux-gnueabihf", "--with-freetype=bundled",
- "--with-abi-profile=arm-vfp-hflt", "--disable-warnings-as-errors"
+ "--openjdk-target=arm-linux-gnueabihf",
+ "--with-freetype=bundled",
+ "--with-abi-profile=arm-vfp-hflt",
+ "--disable-warnings-as-errors"
],
},
@@ -502,7 +490,8 @@ var getJibProfilesProfiles = function (input, common, data) {
build_cpu: "x64",
dependencies: ["devkit", "gtest", "build_devkit"],
configure_args: [
- "--openjdk-target=ppc64le-linux-gnu", "--with-freetype=bundled",
+ "--openjdk-target=ppc64le-linux-gnu",
+ "--with-freetype=bundled",
"--disable-warnings-as-errors"
],
},
@@ -513,7 +502,8 @@ var getJibProfilesProfiles = function (input, common, data) {
build_cpu: "x64",
dependencies: ["devkit", "gtest", "build_devkit"],
configure_args: [
- "--openjdk-target=s390x-linux-gnu", "--with-freetype=bundled",
+ "--openjdk-target=s390x-linux-gnu",
+ "--with-freetype=bundled",
"--disable-warnings-as-errors"
],
},
@@ -524,7 +514,8 @@ var getJibProfilesProfiles = function (input, common, data) {
build_cpu: "x64",
dependencies: ["devkit", "gtest", "build_devkit"],
configure_args: [
- "--openjdk-target=riscv64-linux-gnu", "--with-freetype=bundled",
+ "--openjdk-target=riscv64-linux-gnu",
+ "--with-freetype=bundled",
"--disable-warnings-as-errors"
],
},
@@ -585,24 +576,24 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: "linux",
target_cpu: "x64",
dependencies: ["devkit", "gtest", "libffi"],
- configure_args: concat(common.configure_args_64bit, [
+ configure_args: [
"--with-zlib=system",
"--with-jvm-variants=zero",
"--with-libffi=" + input.get("libffi", "home_path"),
"--enable-libffi-bundling",
- ])
+ ]
},
"linux-aarch64-zero": {
target_os: "linux",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest", "libffi"],
- configure_args: concat(common.configure_args_64bit, [
+ configure_args: [
"--with-zlib=system",
"--with-jvm-variants=zero",
"--with-libffi=" + input.get("libffi", "home_path"),
"--enable-libffi-bundling"
- ])
+ ]
},
"linux-x86-zero": {
@@ -610,12 +601,13 @@ var getJibProfilesProfiles = function (input, common, data) {
target_cpu: "x86",
build_cpu: "x64",
dependencies: ["devkit", "gtest", "libffi"],
- configure_args: concat(common.configure_args_32bit, [
+ configure_args: [
+ "--with-target-bits=32",
"--with-zlib=system",
"--with-jvm-variants=zero",
"--with-libffi=" + input.get("libffi", "home_path"),
"--enable-libffi-bundling"
- ])
+ ]
}
}
profiles = concatObjects(profiles, zeroProfiles);
@@ -634,8 +626,10 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: "linux",
target_cpu: "x64",
dependencies: ["devkit", "gtest"],
- configure_args: concat(common.configure_args_64bit,
- "--with-zlib=system", "--disable-precompiled-headers"),
+ configure_args: [
+ "--with-zlib=system",
+ "--disable-precompiled-headers"
+ ],
},
};
profiles = concatObjects(profiles, noPchProfiles);
@@ -692,9 +686,6 @@ var getJibProfilesProfiles = function (input, common, data) {
"linux-x64": {
platform: "linux-x64",
},
- "linux-x86": {
- platform: "linux-x86",
- },
"macosx-x64": {
platform: "macos-x64",
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home",
@@ -1087,14 +1078,14 @@ var getJibProfilesProfiles = function (input, common, data) {
var getJibProfilesDependencies = function (input, common) {
var devkit_platform_revisions = {
- linux_x64: "gcc13.2.0-OL6.4+1.0",
- macosx: "Xcode14.3.1+1.0",
- windows_x64: "VS2022-17.6.5+1.0",
- linux_aarch64: "gcc13.2.0-OL7.6+1.0",
+ linux_x64: "gcc14.2.0-OL6.4+1.0",
+ macosx: "Xcode15.4+1.0",
+ windows_x64: "VS2022-17.13.2+1.0",
+ linux_aarch64: "gcc14.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",
- linux_ppc64le: "gcc13.2.0-Fedora_41+1.0",
- linux_s390x: "gcc13.2.0-Fedora_41+1.0",
- linux_riscv64: "gcc13.2.0-Fedora_41+1.0"
+ linux_ppc64le: "gcc14.2.0-Fedora_41+1.0",
+ linux_s390x: "gcc14.2.0-Fedora_41+1.0",
+ linux_riscv64: "gcc14.2.0-Fedora_41+1.0"
};
var devkit_platform = (input.target_cpu == "x86"
@@ -1186,9 +1177,9 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "jpg",
product: "jtreg",
- version: "7.4",
+ version: "7.5.1",
build_number: "1",
- file: "bundles/jtreg-7.4+1.zip",
+ file: "bundles/jtreg-7.5.1+1.zip",
environment_name: "JT_HOME",
environment_path: input.get("jtreg", "home_path") + "/bin",
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
@@ -1236,7 +1227,7 @@ var getJibProfilesDependencies = function (input, common) {
organization: common.organization,
ext: "tar.gz",
revision: "9.0.0+1.0",
- module: "graphviz-" + input.target_platform,
+ module: "graphviz-" + input.build_platform,
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
environment_path: input.get("graphviz", "install_path")
},
diff --git a/make/conf/version-numbers.conf b/make/conf/version-numbers.conf
index 383b7533dee5f..ce9e32315a9c1 100644
--- a/make/conf/version-numbers.conf
+++ b/make/conf/version-numbers.conf
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2025, 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
@@ -37,6 +37,6 @@ DEFAULT_VERSION_DATE=2025-09-16
DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
-DEFAULT_ACCEPTABLE_BOOT_VERSIONS="23 24 25"
+DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25"
DEFAULT_JDK_SOURCE_TARGET_VERSION=25
DEFAULT_PROMOTED_VERSION_PRE=ea
diff --git a/make/data/cldr/LICENSE b/make/data/cldr/LICENSE
index 99bd0beafbb07..ca907d75617c8 100644
--- a/make/data/cldr/LICENSE
+++ b/make/data/cldr/LICENSE
@@ -2,7 +2,7 @@ UNICODE LICENSE V3
COPYRIGHT AND PERMISSION NOTICE
-Copyright © 1991-2024 Unicode, Inc.
+Copyright © 2019-2025 Unicode, Inc.
NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
diff --git a/make/data/cldr/common/bcp47/collation.xml b/make/data/cldr/common/bcp47/collation.xml
index bb51229ede1ae..d8c29685cad0f 100644
--- a/make/data/cldr/common/bcp47/collation.xml
+++ b/make/data/cldr/common/bcp47/collation.xml
@@ -10,14 +10,14 @@ For terms of use, see http://www.unicode.org/copyright.html
-
+
-
+
diff --git a/make/data/cldr/common/dtd/ldml.dtd b/make/data/cldr/common/dtd/ldml.dtd
index efe1565f53d01..4ef94ba67ca05 100644
--- a/make/data/cldr/common/dtd/ldml.dtd
+++ b/make/data/cldr/common/dtd/ldml.dtd
@@ -1,5 +1,5 @@
-
+
@@ -61,7 +61,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -95,7 +95,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
diff --git a/make/data/cldr/common/dtd/ldml.xsd b/make/data/cldr/common/dtd/ldml.xsd
index ee03c2275cc9b..973251f2f69c8 100644
--- a/make/data/cldr/common/dtd/ldml.xsd
+++ b/make/data/cldr/common/dtd/ldml.xsd
@@ -5,7 +5,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-->
-
+
diff --git a/make/data/cldr/common/dtd/ldmlBCP47.xsd b/make/data/cldr/common/dtd/ldmlBCP47.xsd
index d55d3f40728ab..3abe97853347a 100644
--- a/make/data/cldr/common/dtd/ldmlBCP47.xsd
+++ b/make/data/cldr/common/dtd/ldmlBCP47.xsd
@@ -5,7 +5,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-->
-
+
-
+
@@ -65,12 +65,13 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
+
@@ -113,7 +114,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -156,6 +157,17 @@ CLDR data files are interpreted according to the LDML specification (http://unic
+
+
+
+
+
+
+
+
+
+
+
@@ -284,7 +296,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -297,7 +309,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -702,7 +714,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -711,7 +723,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -720,9 +732,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
-
+
@@ -738,7 +750,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -914,7 +926,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
@@ -962,9 +974,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
-
+
@@ -996,7 +1008,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
diff --git a/make/data/cldr/common/dtd/ldmlSupplemental.xsd b/make/data/cldr/common/dtd/ldmlSupplemental.xsd
index 6716f017f6263..b7c64ddb38db8 100644
--- a/make/data/cldr/common/dtd/ldmlSupplemental.xsd
+++ b/make/data/cldr/common/dtd/ldmlSupplemental.xsd
@@ -5,7 +5,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-->
@@ -372,6 +374,24 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/make/data/cldr/common/main/aa.xml b/make/data/cldr/common/main/aa.xml
index bb823863fa49e..3ff6fb6dd0662 100644
--- a/make/data/cldr/common/main/aa.xml
+++ b/make/data/cldr/common/main/aa.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+ [ⲁ ⲃ ⲅ ⲇ ⲉ ⲋ ⲍ ⲏ ⲑ ⲓ ⲕ ⲗ ⲙ ⲛ ⲝ ⲟ ⲡ ⲣ ⲥ ⲧ ⲩ ⲫ ⲭ ⲯ ⲱ ϣ ϥ ϧ ϩ ϫ ϭ ϯ]
+ [⳥ ⳦ ⳧ ⳨ ⳩ ⳪ ⳤ]
+ [– ⸗ , ; \: . ⳹ ⳾ ⳼ ⳿ ( )]
+
+
diff --git a/make/data/cldr/common/main/cop_EG.xml b/make/data/cldr/common/main/cop_EG.xml
new file mode 100644
index 0000000000000..e96913cb57586
--- /dev/null
+++ b/make/data/cldr/common/main/cop_EG.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/make/data/cldr/common/main/cs.xml b/make/data/cldr/common/main/cs.xml
index 2b2ece1554995..47b0c97a132fa 100644
--- a/make/data/cldr/common/main/cs.xml
+++ b/make/data/cldr/common/main/cs.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+
+
+
+
diff --git a/make/data/cldr/common/main/en_DE.xml b/make/data/cldr/common/main/en_DE.xml
index e0a78572fb7c5..6294b4013690d 100644
--- a/make/data/cldr/common/main/en_DE.xml
+++ b/make/data/cldr/common/main/en_DE.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+ .
+
+
+
diff --git a/make/data/cldr/common/main/en_FI.xml b/make/data/cldr/common/main/en_FI.xml
index c5bd77f0004ed..de95149f382ed 100644
--- a/make/data/cldr/common/main/en_FI.xml
+++ b/make/data/cldr/common/main/en_FI.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+
+
+
+
diff --git a/make/data/cldr/common/main/en_GB.xml b/make/data/cldr/common/main/en_GB.xml
index 8469b5eccbdae..2954f553cf419 100644
--- a/make/data/cldr/common/main/en_GB.xml
+++ b/make/data/cldr/common/main/en_GB.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+ HH:mm:ss zzzz
+ HHmmsszzzz
+
+
+
+
+ HH:mm:ss z
+ HHmmssz
+
+
+
+
+ HH:mm:ss
+ HHmmss
+
+
+
+
+ HH:mm
+ HHmm
+
+
+
+
+
+
+
diff --git a/make/data/cldr/common/main/en_GU.xml b/make/data/cldr/common/main/en_GU.xml
index 2da80b51ca7db..d4d325ef67cf0 100644
--- a/make/data/cldr/common/main/en_GU.xml
+++ b/make/data/cldr/common/main/en_GU.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+
+
+
+
diff --git a/make/data/cldr/common/main/en_ID.xml b/make/data/cldr/common/main/en_ID.xml
index d8967d4d32ea0..48f8dff29325e 100644
--- a/make/data/cldr/common/main/en_ID.xml
+++ b/make/data/cldr/common/main/en_ID.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+ .
+
+
+
diff --git a/make/data/cldr/common/main/en_JE.xml b/make/data/cldr/common/main/en_JE.xml
index bb03432537533..90189dfc452a6 100644
--- a/make/data/cldr/common/main/en_JE.xml
+++ b/make/data/cldr/common/main/en_JE.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+ [ \- ‑ , % ‰ + 0 1 2 3 4 5 6 7 8 9]
+
+
+
+ ,
+
+
+
+
+
+ #,##0 %
+
+
+
+
+
+ kr
+
+
+
+
diff --git a/make/data/cldr/common/main/en_NR.xml b/make/data/cldr/common/main/en_NR.xml
index 461a309c8e632..63b142124c364 100644
--- a/make/data/cldr/common/main/en_NR.xml
+++ b/make/data/cldr/common/main/en_NR.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+ .
+
+
+
+
+ #,##0.00 ¤;(#,##0.00 ¤)
+
+
+
+
+
diff --git a/make/data/cldr/common/main/en_PN.xml b/make/data/cldr/common/main/en_PN.xml
index 41dfaf5a2bc70..ce49f3fb1a1e4 100644
--- a/make/data/cldr/common/main/en_PN.xml
+++ b/make/data/cldr/common/main/en_PN.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+
+
+
+
+
+ #,##0.00 ¤;(#,##0.00 ¤)
+
+
+
+
+
diff --git a/make/data/cldr/common/main/en_PW.xml b/make/data/cldr/common/main/en_PW.xml
index 9dc9d40e06c2c..8252ebc2c7e5c 100644
--- a/make/data/cldr/common/main/en_PW.xml
+++ b/make/data/cldr/common/main/en_PW.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+ .
+
+
+
+
+ #,##0.00 ¤;(#,##0.00 ¤)
+
+
+
+
+
diff --git a/make/data/cldr/common/main/en_RW.xml b/make/data/cldr/common/main/en_RW.xml
index 16cec0390437c..2ebe3630383c9 100644
--- a/make/data/cldr/common/main/en_RW.xml
+++ b/make/data/cldr/common/main/en_RW.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+ ,
+
+ e
+
+
+
+
+ #,##0.00 ¤;(#,##0.00 ¤)
+
+
+
+
+
diff --git a/make/data/cldr/common/main/en_SL.xml b/make/data/cldr/common/main/en_SL.xml
index f4a944bcf938b..96b3da01929de 100644
--- a/make/data/cldr/common/main/en_SL.xml
+++ b/make/data/cldr/common/main/en_SL.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+ Kreyòl Ayisyen
+
+
+
+ [a {an} b {ch} d eè {en} f g h i j k l m n {ng} oò {on} {ou} {oun} p r s t {ui} v w y z]
+ [x]
+ [\- ‑ , ; \: ! ? . … '‘’ "“” ( ) \[ \] § @ / \& # % ′ ″]
+
+
+
+
+ %
+ -
+
+
+
diff --git a/make/data/cldr/common/main/ht_HT.xml b/make/data/cldr/common/main/ht_HT.xml
new file mode 100644
index 0000000000000..c4f5bb4d5acf2
--- /dev/null
+++ b/make/data/cldr/common/main/ht_HT.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/make/data/cldr/common/main/hu.xml b/make/data/cldr/common/main/hu.xml
index d386b4c4eae49..2cfb4d1607345 100644
--- a/make/data/cldr/common/main/hu.xml
+++ b/make/data/cldr/common/main/hu.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
diff --git a/make/data/cldr/common/main/za.xml b/make/data/cldr/common/main/za.xml
index d6b56c0fedd85..0a0cba9b2e802 100644
--- a/make/data/cldr/common/main/za.xml
+++ b/make/data/cldr/common/main/za.xml
@@ -1,6 +1,6 @@
-
-
+
@@ -107,7 +108,7 @@ For terms of use, see http://www.unicode.org/copyright.html
-
+
@@ -171,6 +172,7 @@ For terms of use, see http://www.unicode.org/copyright.html
+
@@ -228,6 +230,38 @@ For terms of use, see http://www.unicode.org/copyright.html
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
+
+
diff --git a/make/data/cldr/common/supplemental/dayPeriods.xml b/make/data/cldr/common/supplemental/dayPeriods.xml
index d898ad0a4a30b..a19e6779d87a7 100644
--- a/make/data/cldr/common/supplemental/dayPeriods.xml
+++ b/make/data/cldr/common/supplemental/dayPeriods.xml
@@ -7,6 +7,7 @@
-->
+
@@ -15,10 +16,10 @@
-
+
-
+
@@ -693,10 +694,10 @@
-
+
-
+
diff --git a/make/data/cldr/common/supplemental/languageInfo.xml b/make/data/cldr/common/supplemental/languageInfo.xml
index 69206ac3569ee..3c1061494814c 100644
--- a/make/data/cldr/common/supplemental/languageInfo.xml
+++ b/make/data/cldr/common/supplemental/languageInfo.xml
@@ -36,7 +36,7 @@ For terms of use, see http://www.unicode.org/copyright.html
and in the absence of better information. -->
-
+
diff --git a/make/data/cldr/common/supplemental/likelySubtags.xml b/make/data/cldr/common/supplemental/likelySubtags.xml
index e983ecb385225..8b87d7e23d7e0 100644
--- a/make/data/cldr/common/supplemental/likelySubtags.xml
+++ b/make/data/cldr/common/supplemental/likelySubtags.xml
@@ -1,7 +1,7 @@
-
+
@@ -128,6 +128,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
@@ -182,6 +183,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
@@ -240,13 +242,13 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
-
-
+
@@ -261,6 +263,8 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
+
@@ -321,7 +325,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -366,6 +370,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
@@ -403,6 +408,8 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
+
@@ -427,6 +434,8 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
+
@@ -434,13 +443,14 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
+
-
@@ -498,6 +508,8 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
+
@@ -525,6 +537,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
@@ -538,6 +551,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
@@ -567,7 +581,12 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
+
+
+
+
@@ -630,7 +649,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -657,7 +676,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -712,6 +730,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
@@ -831,7 +850,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -864,10 +883,11 @@ not be patched by hand, as any changes made in that fashion may be lost.
+
-
-
+
+
@@ -882,7 +902,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -954,7 +974,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -993,16 +1013,15 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
-
+
-
+
@@ -1029,13 +1048,13 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -1049,7 +1068,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -1076,7 +1094,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -1189,7 +1207,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -1197,7 +1215,8 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
+
@@ -1206,7 +1225,7 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
+
@@ -2325,7 +2344,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -2799,7 +2817,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -3099,7 +3116,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -3970,7 +3986,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -4232,7 +4247,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -4243,7 +4257,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -4422,14 +4435,12 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
-
@@ -5322,7 +5333,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -5461,7 +5471,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -5766,7 +5775,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
@@ -6653,7 +6661,6 @@ not be patched by hand, as any changes made in that fashion may be lost.
-
diff --git a/make/data/cldr/common/supplemental/supplementalData.xml b/make/data/cldr/common/supplemental/supplementalData.xml
index 65b2d6819eaff..1c9a5a0c62e7e 100644
--- a/make/data/cldr/common/supplemental/supplementalData.xml
+++ b/make/data/cldr/common/supplemental/supplementalData.xml
@@ -1,7 +1,7 @@
@@ -1145,12 +1145,12 @@ The printed version of ISO-4217:2001
-
-
-
+
+
+
@@ -1291,7 +1291,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1302,7 +1302,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1311,11 +1311,14 @@ XXX Code for transations where no currency is involved
-
+
+
+
+
@@ -1326,7 +1329,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1339,11 +1342,11 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -1386,7 +1389,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1396,6 +1399,7 @@ XXX Code for transations where no currency is involved
+
@@ -1420,7 +1424,8 @@ XXX Code for transations where no currency is involved
-
+
+
@@ -1443,7 +1448,8 @@ XXX Code for transations where no currency is involved
-
+
+
@@ -1454,7 +1460,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1471,15 +1477,15 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -1487,10 +1493,11 @@ XXX Code for transations where no currency is involved
-
+
+
-
+
@@ -1522,7 +1529,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1530,21 +1537,22 @@ XXX Code for transations where no currency is involved
+
-
+
-
-
-
+
+
+
-
+
@@ -1572,11 +1580,11 @@ XXX Code for transations where no currency is involved
-
-
+
+
-
-
+
+
@@ -1609,7 +1617,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1618,17 +1626,18 @@ XXX Code for transations where no currency is involved
-
+
+
-
+
-
+
-
+
@@ -1644,10 +1653,10 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -1659,7 +1668,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1691,13 +1700,13 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -1709,6 +1718,7 @@ XXX Code for transations where no currency is involved
+
@@ -1718,12 +1728,13 @@ XXX Code for transations where no currency is involved
+
-
+
@@ -1735,6 +1746,8 @@ XXX Code for transations where no currency is involved
+
+
@@ -1745,6 +1758,7 @@ XXX Code for transations where no currency is involved
+
@@ -1770,7 +1784,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1782,6 +1796,7 @@ XXX Code for transations where no currency is involved
+
@@ -1809,7 +1824,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1825,10 +1840,11 @@ XXX Code for transations where no currency is involved
-
+
-
-
+
+
+
@@ -1841,10 +1857,11 @@ XXX Code for transations where no currency is involved
+
-
+
@@ -1852,7 +1869,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1877,20 +1894,21 @@ XXX Code for transations where no currency is involved
-
+
-
+
-
-
+
+
+
@@ -1920,6 +1938,7 @@ XXX Code for transations where no currency is involved
+
@@ -1939,7 +1958,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1954,7 +1973,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -1975,11 +1994,11 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -2011,13 +2030,14 @@ XXX Code for transations where no currency is involved
+
-
-
+
+
@@ -2041,6 +2061,7 @@ XXX Code for transations where no currency is involved
+
@@ -2051,9 +2072,9 @@ XXX Code for transations where no currency is involved
-
-
-
+
+
+
@@ -2067,23 +2088,26 @@ XXX Code for transations where no currency is involved
-
+
-
-
+
+
+
-
+
+
+
-
-
+
+
@@ -2141,7 +2165,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2171,12 +2195,13 @@ XXX Code for transations where no currency is involved
-
+
-
+
+
-
+
@@ -2192,13 +2217,15 @@ XXX Code for transations where no currency is involved
+
-
+
+
@@ -2240,7 +2267,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2263,7 +2290,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2274,22 +2301,25 @@ XXX Code for transations where no currency is involved
-
+
-
+
+
-
-
+
+
+
-
+
+
@@ -2309,8 +2339,8 @@ XXX Code for transations where no currency is involved
-
-
+
+
@@ -2324,25 +2354,25 @@ XXX Code for transations where no currency is involved
-
+
-
+
-
+
-
+
-
+
@@ -2353,8 +2383,8 @@ XXX Code for transations where no currency is involved
-
-
+
+
@@ -2380,23 +2410,23 @@ XXX Code for transations where no currency is involved
-
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
+
@@ -2406,7 +2436,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2414,11 +2444,11 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -2426,7 +2456,25 @@ XXX Code for transations where no currency is involved
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2496,7 +2544,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2559,7 +2607,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2581,13 +2629,13 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -2634,7 +2682,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2650,74 +2698,75 @@ XXX Code for transations where no currency is involved
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -2725,20 +2774,20 @@ XXX Code for transations where no currency is involved
-
+
-
+
-
-
-
-
-
+
+
+
+
+
@@ -2746,7 +2795,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2826,7 +2875,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2853,9 +2902,10 @@ XXX Code for transations where no currency is involved
-
+
+
@@ -2895,10 +2945,10 @@ XXX Code for transations where no currency is involved
+
-
@@ -2919,7 +2969,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -2943,6 +2993,7 @@ XXX Code for transations where no currency is involved
+
@@ -3013,7 +3064,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3032,12 +3083,12 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -3072,9 +3123,10 @@ XXX Code for transations where no currency is involved
+
-
+
@@ -3107,32 +3159,34 @@ XXX Code for transations where no currency is involved
+
-
+
-
+
+
-
+
-
+
-
+
@@ -3140,9 +3194,11 @@ XXX Code for transations where no currency is involved
+
+
-
+
@@ -3154,6 +3210,7 @@ XXX Code for transations where no currency is involved
+
@@ -3182,13 +3239,13 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -3228,11 +3285,13 @@ XXX Code for transations where no currency is involved
+
+
-
+
@@ -3377,7 +3436,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3452,9 +3511,9 @@ XXX Code for transations where no currency is involved
-
+
@@ -3489,9 +3548,9 @@ XXX Code for transations where no currency is involved
+
-
@@ -3530,7 +3589,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3548,18 +3607,18 @@ XXX Code for transations where no currency is involved
+
-
-
+
-
+
@@ -3574,11 +3633,11 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -3592,7 +3651,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3624,20 +3683,23 @@ XXX Code for transations where no currency is involved
-
+
+
-
+
+
+
-
+
-
+
@@ -3649,14 +3711,14 @@ XXX Code for transations where no currency is involved
-
+
-
+
+
-
+
-
@@ -3678,7 +3740,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3719,12 +3781,12 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -3763,7 +3825,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3837,7 +3899,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3908,7 +3970,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -3944,14 +4006,14 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -3999,10 +4061,11 @@ XXX Code for transations where no currency is involved
+
-
+
@@ -4013,7 +4076,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -4026,10 +4089,11 @@ XXX Code for transations where no currency is involved
-
+
+
@@ -4098,7 +4162,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -4131,9 +4195,13 @@ XXX Code for transations where no currency is involved
+
+
+
+
@@ -4145,7 +4213,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -4162,14 +4230,14 @@ XXX Code for transations where no currency is involved
-
+
-
+
@@ -4197,8 +4265,9 @@ XXX Code for transations where no currency is involved
-
-
+
+
+
@@ -4214,7 +4283,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -4226,7 +4295,6 @@ XXX Code for transations where no currency is involved
-
@@ -4235,11 +4303,13 @@ XXX Code for transations where no currency is involved
+
+
@@ -4257,6 +4327,8 @@ XXX Code for transations where no currency is involved
+
+
@@ -4376,11 +4448,11 @@ XXX Code for transations where no currency is involved
-
+
+
-
@@ -4399,7 +4471,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -4419,10 +4491,17 @@ XXX Code for transations where no currency is involved
-
+
+
-
-
+
+
+
+
+
+
+
+
@@ -4890,7 +4969,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -4908,7 +4987,7 @@ XXX Code for transations where no currency is involved
-
+
@@ -5448,8 +5527,8 @@ XXX Code for transations where no currency is involved
-
-
+
+
@@ -5475,11 +5554,11 @@ XXX Code for transations where no currency is involved
Dutch official
At most 6% are not fluent in English
- French official, the figure is derived from literacy * population
+ Precise data not available, added so Balinese script defaults to Balinese
While Cyrillic is customary, the vast majority of the population can read both.For languages not customarily written, the writing populiation is artificially set to 5% in the absence of better information.
The figure includes 'Vlaams' population from Ethnologue
It is estimated that Walloon is used actively by 10-20% of the total population of Wallonia or between 300,000 and 600,000 people. For languages not customarily written, the writing population is artificially set to 5% in the absence of better information.
- http://en.wikipedia.org/wiki/Demographics_of_Switzerland Literacy rate for gsw is 5% of reported speaker population; literacy is mostly in standard German. For languages not customarily written, the writing population is artificially set to 5% in the absence of better information.
+ Precise data not available
Arabic official, the figure is derived from literacy * lang pop
Spanish is the official language, only about 60-70% of the population speaks it at all ;
English official, 81% literacy; the figure is derived from literacy * lang pop
@@ -5492,18 +5571,18 @@ XXX Code for transations where no currency is involved
100k+ native, plus 1.5 mil 2nd lang speakers. For languages not customarily written, the writing population is artificially set to 5% in the absence of better information.
For languages not customarily written, the writing population is artificially set to 5% in the absence of better information.
English official; the figure is derived from literacy * lang pop
- French official; the figure is derived from literacy * lang pop
+ Canada 2021 Census language "Knowledge of Language"; official status from Wikipedia Languages_of_Canada
[missing]
- Crude estimate based on import partner data. http://www.answers.com/topic/mauritania
+ Actually literacy in Nko writing unknown but historically they used the Latin script
English official, the figure is derived from literacy * lang pop
- French official; the figure is derived from literacy * lang pop
+ Actually literacy in Nko writing unknown
Some 99% of users are literate in French or German. For languages not customarily written, the writing population is artificially set to 5% in the absence of better information.
2nd lang literacy 15-25%
Nearly all speakers are literate in a 2nd language. For languages not customarily written, the writing population is artificially set to 5%
Many minor langs; Portuguese official
In this and other sources, such as Ethnologue, there is no estimate for number of users. http://en.wikipedia.org/wiki/Filipino_language http://www.ethnologue.com/show_language.asp?code=fil
Most of the population uses Creole; see also http://www.country-studies.com/haiti/creole,-literacy,-and-education.html http://en.wikipedia.org/wiki/French_language#Haiti
- 400k 2nd language speakers
+ [missing]
Official language, 37-77% literacy
Official language, used in some schools.
http://www.censusindia.net/cendat/datatable26.html
@@ -5513,8 +5592,7 @@ XXX Code for transations where no currency is involved
English official; Kiribati widespread
[missing]
German official
- No figures found for use of French. Used literacy 29.5% times population to get the writing pop; French is the only official language.
- French official; the figure is derived from literacy * lang pop
+ 2020 Russian Census
Used CIA literacy figure times population, added 'Vlaams' population
[missing]
70,000 in 1991, 100,000 who understand it, but do not speak it ; ethnic pop 530,000 in 2002
@@ -5535,7 +5613,7 @@ XXX Code for transations where no currency is involved
English official on some islands, total 9.4%
http://astro.uchicago.edu/cara/vtour/mcmurdo/ http://www.usap.gov/videoclipsandmaps/mcmwebcam.cfm Winter population is listed.
1.2mil 1st lang + 240k 2nd lang users, low literacy
- [missing]
+ Has rotating Norwegian population at Norvegia Station
http://www.mavicanet.com/directory/eng/2436.html
Uninhabited, barren, sub-Antarctic islands
[missing]
@@ -5557,8 +5635,7 @@ XXX Code for transations where no currency is involved
English (official, primary language of commerce, administration, and higher education)
Ethnologue lists 1 million 2nd lang users of English; no other good figures found.
also: http://en.wikipedia.org/wiki/Bosnian_language
- French is a minority official language. Crude estimate of usage based on import partner data.
- Macao reported 5% native Portuguese speakers.
+ 2021 Census, counting people who are fluent in the language
5% writing pop estimated in absence of other data
[missing]
Crude estimate based on import partner data.
@@ -5577,7 +5654,7 @@ XXX Code for transations where no currency is involved
[missing]
Deva is the official script for sd in India; set to 55%. Arab, Guru, Khoj also used.
The lingua franca of 80% of the population
- [missing]
+ 2016 Census
and https://en.wikipedia.org/wiki/Mru_language
- More than 95% of Pakistanis can speak or understand Urdu as their second or third language
[missing]
@@ -5597,20 +5674,17 @@ XXX Code for transations where no currency is involved
Latin script official, used 98.8% of pop * 90% for the usage figure
- five eastern provinces of the DRC are Swahili speaking. Nearly half the 66 million Congolese speak it.
[missing]
- estimate 20% of Algerians can use French
[missing]
[missing]
- Most educated Kenyans are able to communicate fluently in Swahili, since it is a compulsory subject in school
[missing]
[missing]
- - Education is in French; using literacy rate * pop for French-using population
English is the first language learned by half the children by the time they reach preschool age; using 92.6% of pop for the English figure
- - using pop * literacy rate
+ Organisation internationale de la Francophonie Meta-study. Data from 2012 and 2016 Eurostat studies on first and second language usage across Europe
- 90 percent of approximately 39 million Tanzanians speak Swahili
- Baganda generally don't speak Swahili, but it is in common use among the 25 million people elsewhere in the country, and is currently being implemented in schools nationwide (use 75% of Cpop for this figure)
[missing]
[missing]
- [missing]
http://www.ofis-bzh.org/fr/langue_bretonne/chiffres_cles/index.php France blocks other languages in state schools; 1.4% attended Breton schools and 3% is estimated as family transmission rate
15.8% of population
The 2008 estimate is ~2000 speakers due to revival efforts
@@ -5634,16 +5708,13 @@ XXX Code for transations where no currency is involved
Spoken by 70% of population, assumed to use Arabic script in Pakistan
Reported to be (regional) official in Chuvashia, central Russia: taught at schools. However: http://cv.wikipedia.org/ Chuvash Wikipedia on-line.
[missing]
- [missing]
'A lingua franca and a first language for 10% of the population but understood by 95%' http://en.wikipedia.org/wiki/Krio_language
Dutch is spoken as a mother tongue by about 60% of the Surinamese, while most others speak it as a second or third language.
main language of trade and comm. in Isan region, except ... media where it gives way to Thai; now largely an unwritten language. 10% writing pop estimated in absence of other data
- primarily written using an Arabic-derived alphabet
and https://islandstudies.com/files/2016/11/Guernsey-Herm-Sark.pdf - extrapolated GDP from per capita x population
understood by 10 million, perhaps. Figure is questionable writing pop artificially set to 5% see also: http://en.wikipedia.org/wiki/Low_German (understood by 10 million people, and native to about 3 million people all around northern Germany)
- [missing]
See the 2006 language survey data for 2nd langs = Shimaore
- See the 2006 language survey data for 2nd langs
Common lingua franca, widely used. High literacy.
but subtracting 270,000 per https://en.wikipedia.org/wiki/Swiss_Italian
[missing]
@@ -5651,14 +5722,14 @@ XXX Code for transations where no currency is involved
[missing]
98.8% speak Spanish. Also, https://www.cia.gov/library/publications/the-world-factbook/geos/sp.html
[missing]
- No indigenous inhabitants. http://en.wikipedia.org/wiki/Heard_Island_and_McDonald_Islands
+ Colony of France but uninhabited
No indigenous inhabitants. http://en.wikipedia.org/wiki/British_Indian_Ocean_Territory
Many also use Swahili
Latin is not shown as being used, rather Arabic
Used in schools up to University.
Also called Sakha.
No indigenous inhabitants. http://en.wikipedia.org/wiki/French_Southern_Territories
- [missing]
+ 2022 Census language spoken at home
Shows 50% literacy
Most also use Swahili with 50% literacy. Only 5% monolingual.
Most also use Swahili
@@ -5692,6 +5763,7 @@ XXX Code for transations where no currency is involved
This is base pop for """"""""""""""""""""""""""""""""fub"""""""""""""""""""""""""""""""" lang code; ff shows as a macrolanguage
[missing]
(could be higher if 2nd lang included; no data yet)
+ [missing]
[missing]
[missing]
pop 7k. Figure is questionable writing pop artificially set to 5% see also http://en.wikipedia.org/wiki/Lower_Sorbian
@@ -5724,7 +5796,6 @@ XXX Code for transations where no currency is involved
population figure from CLDR-17483 ticket
No Data Available at present.
co-official in South Tyrol
- Aosta Valley
in Trieste and Gorizia
[missing]
Information on the Latin/Cyrillic script percentages for Montenegro not currently found.
@@ -5745,7 +5816,7 @@ XXX Code for transations where no currency is involved
Mainly unwritten
Vai script is the main script for this language.
Latin listed as being used (Scriptsource) but no pop figures available.
- and https://en.wikipedia.org/wiki/Macau
+ 2011 Census -- the language is not distinguished in the 2021 census
but no literacy data
Including 1st and 2nd lang speakers
[missing]
@@ -5757,7 +5828,7 @@ XXX Code for transations where no currency is involved
near zero literacy; pop ~80000 (2009) see David Lawrence, Tanzania and its People, page 121, Google books
(baseline)
No population figure yet on use of Latin in Vatican. Estimate 100% of Vatican residents can use Latin.
- [missing]
+ 2010 Census: Widely Spoken Language of Communication
No figures available for this language. Estimating at 5%.
[missing]
[missing]
@@ -5801,9 +5872,45 @@ XXX Code for transations where no currency is involved
[missing]
[missing]
Mainly in Guangdong Prov, ~70-80 million. Script unspecified so both listed
- Canada 2016 census language data; official status from Wikipedia Languages_of_Canada
Analyzed from 2011 UK census and other sources
- In total 86.2% of Canadians have working knowledge of English while 29.8% have a working knowledge of French.
2014 Maldives: 98% literacy in Divehi, 75% in English
+ [missing]
+ [missing]
+ Greek population in Russia -- most ancestrally used Pontic Greek -- modern usage almost certainly has dropped off but we don't have clear statistics on current usage.
+ [missing]
+ Lower estimate of Coptic population, actual language literacy unknown
+ [missing]
+ Organisation internationale de la Francophonie Meta-study. Data from 2013 Census
+ Organisation internationale de la Francophonie Meta-study. Data from IVQ survey in 2009
+ 2021 Census Knowledge of Language
+ Organisation internationale de la Francophonie Meta-study. Data from 2014 study
+ Organisation internationale de la Francophonie Meta-study. Data from 1994 study
+ Organisation internationale de la Francophonie Meta-study. Data from 2009 and 2012 studies
+ Regelmässig verwendete Sprachen - Percent of people that regularly use the language
+ Regelmässig verwendete Sprachen - Percent of people that regularly use the language; literacy is mostly in standard German. For languages not customarily written, the writing population is artificially set to 5% in the absence of better information."
+ Organisation internationale de la Francophonie Meta-study. Data from 2014 census
+ Organisation internationale de la Francophonie Meta-study. Data from 2010 questionnaire
+ Organisation internationale de la Francophonie Meta-study. Data from 2008 Census
+ Organisation internationale de la Francophonie Meta-study. Data from 2017 survey from Gabon authorities
+ Organisation internationale de la Francophonie Meta-study. Data from 2011 IVQ survey
+ Organisation internationale de la Francophonie Meta-study. Data from 2005 Study
+ Organisation internationale de la Francophonie Meta-study. Data from 2012 Census
+ Organisation internationale de la Francophonie Meta-study. Data from 2014 questionnaire
+ Organisation internationale de la Francophonie Meta-study. Data from 2003 census
+ Organisation internationale de la Francophonie Meta-study. Data from 2012, mixed methods
+ Organisation internationale de la Francophonie Meta-study. Data from 2014 Census
+ Organisation internationale de la Francophonie Meta-study. Data from 2017 questionnaire
+ Organisation internationale de la Francophonie Meta-study. Data from 2018 census
+ Organisation internationale de la Francophonie Meta-study. Data from 2009 census
+ Organisation internationale de la Francophonie Meta-study. Data from IVQ survey in 2014
+ Organisation internationale de la Francophonie Meta-study. Data from 2009 Census
+ Organisation internationale de la Francophonie Meta-study. Data from 2012 census
+ Organisation internationale de la Francophonie Meta-study. Data from 2017 Census
+ Organisation internationale de la Francophonie Meta-study. Data from 2018 Census
+ Organisation internationale de la Francophonie Meta-study. Data from IVQ survey in 2007
+ Organisation internationale de la Francophonie Meta-study. Data from 2013 census. Literacy is based on the language of instruction
+ Organisation internationale de la Francophonie Meta-study. Data from 2014
+ Organisation internationale de la Francophonie Meta-study. Data from 2010 census
+ Organisation internationale de la Francophonie Meta-study. Data from 2007 Census
diff --git a/make/data/cldr/common/supplemental/supplementalMetadata.xml b/make/data/cldr/common/supplemental/supplementalMetadata.xml
index a4011a09aa4bc..d8e5052adef1a 100644
--- a/make/data/cldr/common/supplemental/supplementalMetadata.xml
+++ b/make/data/cldr/common/supplemental/supplementalMetadata.xml
@@ -179,7 +179,7 @@ For terms of use, see http://www.unicode.org/copyright.html
-
+
@@ -306,6 +306,9 @@ For terms of use, see http://www.unicode.org/copyright.html
+
+
+
@@ -1880,14 +1883,14 @@ For terms of use, see http://www.unicode.org/copyright.html
bgc_IN bgn_PK bho_IN blo_BJ blt_VN bm_ML bm_Nkoo_ML bn_BD bo_CN br_FR brx_IN
bs_Cyrl_BA bs_Latn bs_Latn_BA bss_CM byn_ER
ca_ES cad_US cch_NG ccp_BD ce_RU ceb_PH cgg_UG cho_US chr_US cic_US ckb_IQ
- co_FR cs_CZ csw_CA cu_RU cv_RU cy_GB
+ co_FR cop_EG cs_CZ csw_CA cu_RU cv_RU cy_GB
da_DK dav_KE de_DE dje_NE doi_IN dsb_DE dua_CM dv_MV dyo_SN dz_BT
ebu_KE ee_GH el_GR en_Dsrt_US en_Shaw_GB en_US eo_001 es_ES et_EE eu_ES ewo_CM
fa_IR ff_Adlm_GN ff_Latn ff_Latn_SN fi_FI fil_PH fo_FO fr_FR frr_DE fur_IT
fy_NL
ga_IE gaa_GH gd_GB gez_ET gl_ES gn_PY gsw_CH gu_IN guz_KE gv_IM
ha_Arab_NG ha_NG haw_US he_IL hi_IN hi_Latn_IN hnj_Hmnp hnj_Hmnp_US hr_HR
- hsb_DE hu_HU hy_AM
+ hsb_DE ht_HT hu_HU hy_AM
ia_001 id_ID ie_EE ife_TG ig_NG ii_CN io_001 is_IS it_IT iu_CA iu_Latn_CA
ja_JP jbo_001 jgo_CM jmc_TZ jv_ID
ka_GE kaa_Cyrl kaa_Cyrl_UZ kaa_Latn_UZ kab_DZ kaj_NG kam_KE kcg_NG kde_TZ kea_CV ken_CM kgp_BR
diff --git a/make/data/ubsan/ubsan_default_options.c b/make/data/ubsan/ubsan_default_options.c
index 011d1a675a90f..05e4722e45a27 100644
--- a/make/data/ubsan/ubsan_default_options.c
+++ b/make/data/ubsan/ubsan_default_options.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025, 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
@@ -43,6 +43,18 @@
#define ATTRIBUTE_USED
#endif
+// On AIX, the llvm_symbolizer is not found out of the box, so we have to provide the
+// full qualified llvm_symbolizer path in the __ubsan_default_options() function.
+// To get it here we compile our sources with an additional define LLVM_SYMBOLIZER
+// containing the path, which we set in make/autoconf/jdk-options.m4.
+#ifdef LLVM_SYMBOLIZER
+#define _LLVM_SYMBOLIZER(X) ",external_symbolizer_path=" X_LLVM_SYMBOLIZER(X)
+#define X_LLVM_SYMBOLIZER(X) #X
+#else
+#define LLVM_SYMBOLIZER
+#define _LLVM_SYMBOLIZER(X)
+#endif
+
// Override weak symbol exposed by UBSan to override default options. This is called by UBSan
// extremely early during library loading, before main is called. We need to override the default
// options because by default UBSan only prints a warning for each occurrence. We want jtreg tests
@@ -50,5 +62,5 @@
// thread so it is easier to track down. You can override these options by setting the environment
// variable UBSAN_OPTIONS.
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __ubsan_default_options() {
- return "halt_on_error=1,print_stacktrace=1";
+ return "halt_on_error=1,print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
}
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
index 249eaa6624715..1b9240df49c8c 100644
--- a/make/devkit/Tools.gmk
+++ b/make/devkit/Tools.gmk
@@ -39,6 +39,8 @@
# Fix this...
#
+uppercase = $(shell echo $1 | tr a-z A-Z)
+
$(info TARGET=$(TARGET))
$(info HOST=$(HOST))
$(info BUILD=$(BUILD))
@@ -91,89 +93,28 @@ endif
################################################################################
# Define external dependencies
-# Latest that could be made to work.
-GCC_VER := 13.2.0
-ifeq ($(GCC_VER), 13.2.0)
- gcc_ver := gcc-13.2.0
- binutils_ver := binutils-2.41
- ccache_ver := ccache-3.7.12
- mpfr_ver := mpfr-4.2.0
- gmp_ver := gmp-6.3.0
- mpc_ver := mpc-1.3.1
- gdb_ver := gdb-13.2
- REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
-else ifeq ($(GCC_VER), 11.3.0)
- gcc_ver := gcc-11.3.0
- binutils_ver := binutils-2.39
- ccache_ver := ccache-3.7.12
- mpfr_ver := mpfr-4.1.1
- gmp_ver := gmp-6.2.1
- mpc_ver := mpc-1.2.1
- gdb_ver := gdb-11.2
- REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
-else ifeq ($(GCC_VER), 11.2.0)
- gcc_ver := gcc-11.2.0
- binutils_ver := binutils-2.37
- ccache_ver := ccache-3.7.12
- mpfr_ver := mpfr-4.1.0
- gmp_ver := gmp-6.2.1
- mpc_ver := mpc-1.2.1
- gdb_ver := gdb-11.1
- REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
-else ifeq ($(GCC_VER), 10.3.0)
- gcc_ver := gcc-10.3.0
- binutils_ver := binutils-2.36.1
- ccache_ver := ccache-3.7.11
- mpfr_ver := mpfr-4.1.0
- gmp_ver := gmp-6.2.0
- mpc_ver := mpc-1.1.0
- gdb_ver := gdb-10.1
- REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
-else ifeq ($(GCC_VER), 10.2.0)
- gcc_ver := gcc-10.2.0
- binutils_ver := binutils-2.35
- ccache_ver := ccache-3.7.11
- mpfr_ver := mpfr-4.1.0
- gmp_ver := gmp-6.2.0
- mpc_ver := mpc-1.1.0
- gdb_ver := gdb-9.2
- REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
-else ifeq ($(GCC_VER), 9.2.0)
- gcc_ver := gcc-9.2.0
- binutils_ver := binutils-2.34
- ccache_ver := ccache-3.7.3
- mpfr_ver := mpfr-3.1.5
- gmp_ver := gmp-6.1.2
- mpc_ver := mpc-1.0.3
- gdb_ver := gdb-8.3
-else ifeq ($(GCC_VER), 8.3.0)
- gcc_ver := gcc-8.3.0
- binutils_ver := binutils-2.32
- ccache_ver := ccache-3.7.3
- mpfr_ver := mpfr-3.1.5
- gmp_ver := gmp-6.1.2
- mpc_ver := mpc-1.0.3
- gdb_ver := gdb-8.3
-else ifeq ($(GCC_VER), 7.3.0)
- gcc_ver := gcc-7.3.0
- binutils_ver := binutils-2.30
- ccache_ver := ccache-3.3.6
- mpfr_ver := mpfr-3.1.5
- gmp_ver := gmp-6.1.2
- mpc_ver := mpc-1.0.3
- gdb_ver := gdb-8.1
-else ifeq ($(GCC_VER), 4.9.2)
- gcc_ver := gcc-4.9.2
- binutils_ver := binutils-2.25
- ccache_ver := ccache-3.2.1
- mpfr_ver := mpfr-3.0.1
- gmp_ver := gmp-4.3.2
- mpc_ver := mpc-1.0.1
- gdb_ver := gdb-7.12.1
-else
- $(error Unsupported GCC version)
-endif
+gcc_ver_only := 14.2.0
+binutils_ver_only := 2.43
+ccache_ver_only := 4.10.2
+CCACHE_CMAKE_BASED := 1
+mpfr_ver_only := 4.2.1
+gmp_ver_only := 6.3.0
+mpc_ver_only := 1.3.1
+gdb_ver_only := 15.2
+
+dependencies := gcc binutils ccache mpfr gmp mpc gdb
+
+$(foreach dep,$(dependencies),$(eval $(dep)_ver := $(dep)-$($(dep)_ver_only)))
+
+GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
+BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.gz
+CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver_only)/$(ccache_ver).tar.xz
+MPFR := https://www.mpfr.org/$(mpfr_ver)/$(mpfr_ver).tar.bz2
+GMP := http://ftp.gnu.org/pub/gnu/gmp/$(gmp_ver).tar.bz2
+MPC := http://ftp.gnu.org/pub/gnu/mpc/$(mpc_ver).tar.gz
+GDB := http://ftp.gnu.org/gnu/gdb/$(gdb_ver).tar.xz
+REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
ifneq ($(REQUIRED_MIN_MAKE_MAJOR_VERSION),)
MAKE_MAJOR_VERSION := $(word 1,$(subst ., ,$(MAKE_VERSION)))
SUPPORTED_MAKE_VERSION := $(shell [ $(MAKE_MAJOR_VERSION) -ge $(REQUIRED_MIN_MAKE_MAJOR_VERSION) ] && echo true)
@@ -182,17 +123,6 @@ ifneq ($(REQUIRED_MIN_MAKE_MAJOR_VERSION),)
endif
endif
-ccache_ver_only := $(patsubst ccache-%,%,$(ccache_ver))
-
-
-GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
-BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.gz
-CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver_only)/$(ccache_ver).tar.xz
-MPFR := https://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
-GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
-MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
-GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
-
# RPMs used by all BASE_OS
RPM_LIST := \
$(KERNEL_HEADERS_RPM) \
@@ -262,10 +192,18 @@ define Download
# Allow override
$(1)_DIRNAME ?= $(basename $(basename $(notdir $($(1)))))
$(1)_DIR = $(abspath $(SRCDIR)/$$($(1)_DIRNAME))
- $(1)_CFG = $$($(1)_DIR)/configure
+ ifeq ($$($(1)_CMAKE_BASED),)
+ $(1)_CFG = $$($(1)_DIR)/configure
+ $(1)_SRC_MARKER = $$($(1)_DIR)/configure
+ $(1)_CONFIG = $(CONFIG)
+ else
+ $(1)_CFG = cmake
+ $(1)_SRC_MARKER = $$($(1)_DIR)/CMakeLists.txt
+ $(1)_CONFIG = $$(CMAKE_CONFIG) $$($(1)_DIR)
+ endif
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
- $$($(1)_CFG) : $$($(1)_FILE)
+ $$($(1)_SRC_MARKER) : $$($(1)_FILE)
mkdir -p $$(SRCDIR)
tar -C $$(SRCDIR) -xf $$<
$$(foreach p,$$(abspath $$(wildcard patches/$$(ARCH)-$$(notdir $$($(1)_DIR)).patch)), \
@@ -279,7 +217,7 @@ define Download
endef
# Download and unpack all source packages
-$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p))))
+$(foreach dep,$(dependencies),$(eval $(call Download,$(call uppercase,$(dep)))))
################################################################################
# Unpack RPMS
@@ -356,7 +294,7 @@ endif
################################################################################
# Define marker files for each source package to be compiled
-$(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
+$(foreach dep,$(dependencies),$(eval $(dep) = $(TARGETDIR)/$($(dep)_ver).done))
################################################################################
@@ -365,6 +303,8 @@ CONFIG = --target=$(TARGET) \
--host=$(HOST) --build=$(BUILD) \
--prefix=$(PREFIX)
+CMAKE_CONFIG = -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX)
+
PATHEXT = $(PREFIX)/bin:
PATHPRE = PATH=$(PATHEXT)$(PATH)
@@ -576,6 +516,8 @@ ifeq ($(HOST), $(TARGET))
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" $(GDB_CFG) \
$(CONFIG) \
--with-sysroot=$(SYSROOT) \
+ --with-mpfr=$(PREFIX) \
+ --with-gmp=$(PREFIX) \
) > $(@D)/log.config 2>&1
@echo 'done'
@@ -591,13 +533,13 @@ endif
################################################################################
# very straightforward. just build a ccache. it is only for host.
$(BUILDDIR)/$(ccache_ver)/Makefile \
- : $(CCACHE_CFG)
+ : $(CCACHE_SRC_MARKER)
$(info Configuring $@. Log in $(@D)/log.config)
@mkdir -p $(@D)
@( \
cd $(@D) ; \
$(PATHPRE) $(ENVS) $(CCACHE_CFG) \
- $(CONFIG) \
+ $(CCACHE_CONFIG) \
) > $(@D)/log.config 2>&1
@echo 'done'
@@ -699,10 +641,18 @@ ifeq ($(TARGET), $(HOST))
ln -s $(TARGET)-$* $@
missing-links := $(addprefix $(PREFIX)/bin/, \
- addr2line ar as c++ c++filt dwp elfedit g++ gcc gcc-$(GCC_VER) gprof ld ld.bfd \
+ addr2line ar as c++ c++filt dwp elfedit g++ gcc gcc-$(gcc_ver_only) gprof ld ld.bfd \
ld.gold nm objcopy objdump ranlib readelf size strings strip)
endif
+# Add link to work around "plugin needed to handle lto object" (JDK-8344272)
+$(PREFIX)/lib/bfd-plugins/liblto_plugin.so: $(PREFIX)/libexec/gcc/$(TARGET)/$(gcc_ver_only)/liblto_plugin.so
+ @echo 'Creating missing $(@F) soft link'
+ @mkdir -p $(@D)
+ ln -s $$(realpath -s --relative-to=$(@D) $<) $@
+
+missing-links += $(PREFIX)/lib/bfd-plugins/liblto_plugin.so
+
################################################################################
bfdlib : $(bfdlib)
diff --git a/make/devkit/createAutoconfBundle.sh b/make/devkit/createAutoconfBundle.sh
index 7363b9cd8a71a..ebe9c427f76ea 100644
--- a/make/devkit/createAutoconfBundle.sh
+++ b/make/devkit/createAutoconfBundle.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
#
-# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 2025, 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
@@ -24,10 +24,21 @@
# questions.
#
-# Create a bundle in the current directory, containing what's needed to run
+# Create a bundle in OpenJDK build folder, containing what's needed to run
# the 'autoconf' program by the OpenJDK build. To override TARGET_PLATFORM
# just set the variable before running this script.
+# This script fetches sources from network so make sure your proxy is setup appropriately.
+
+# colored print to highlight some of the logs
+function print_log()
+{
+ Color_Cyan='\033[1;36m' # Cyan
+ Color_Off='\033[0m' # Reset color
+ printf "${Color_Cyan}> $1${Color_Off}\n"
+}
+
+
# Autoconf depends on m4, so download and build that first.
AUTOCONF_VERSION=2.69
M4_VERSION=1.4.18
@@ -58,11 +69,12 @@ MODULE_NAME=autoconf-$TARGET_PLATFORM-$AUTOCONF_VERSION+$PACKAGE_VERSION
BUNDLE_NAME=$MODULE_NAME.tar.gz
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-OUTPUT_ROOT="${SCRIPT_DIR}/../../build/autoconf"
+BASEDIR="$(cd "$SCRIPT_DIR/../.." > /dev/null && pwd)"
+OUTPUT_ROOT="$BASEDIR/build/autoconf"
-cd $OUTPUT_ROOT
IMAGE_DIR=$OUTPUT_ROOT/$MODULE_NAME
mkdir -p $IMAGE_DIR/usr
+cd $OUTPUT_ROOT
# Download and build m4
@@ -76,7 +88,7 @@ elif test "x$TARGET_PLATFORM" = xcygwin_x86; then
cp /usr/bin/m4 $IMAGE_DIR/usr/bin
elif test "x$TARGET_PLATFORM" = xlinux_x64; then
M4_VERSION=1.4.13-5
- wget http://yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/m4-$M4_VERSION.el6.x86_64.rpm
+ wget https://yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/m4-$M4_VERSION.el6.x86_64.rpm
cd $IMAGE_DIR
rpm2cpio $OUTPUT_ROOT/m4-$M4_VERSION.el6.x86_64.rpm | cpio -d -i
elif test "x$TARGET_PLATFORM" = xlinux_x86; then
@@ -85,27 +97,38 @@ elif test "x$TARGET_PLATFORM" = xlinux_x86; then
cd $IMAGE_DIR
rpm2cpio $OUTPUT_ROOT/m4-$M4_VERSION.el6.i686.rpm | cpio -d -i
else
+ print_log "m4: download"
wget https://ftp.gnu.org/gnu/m4/m4-$M4_VERSION.tar.gz
- tar xzf m4-$M4_VERSION.tar.gz
+ tar -xzf m4-$M4_VERSION.tar.gz
cd m4-$M4_VERSION
+ print_log "m4: configure"
./configure --prefix=$IMAGE_DIR/usr CFLAGS="-w -Wno-everything"
+ print_log "m4: make"
make
+ print_log "m4: make install"
make install
cd ..
fi
# Download and build autoconf
+print_log "autoconf: download"
wget https://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.gz
-tar xzf autoconf-$AUTOCONF_VERSION.tar.gz
+tar -xzf autoconf-$AUTOCONF_VERSION.tar.gz
cd autoconf-$AUTOCONF_VERSION
+print_log "autoconf: configure"
./configure --prefix=$IMAGE_DIR/usr M4=$IMAGE_DIR/usr/bin/m4
+print_log "autoconf: make"
make
+print_log "autoconf: make install"
make install
cd ..
+# The resulting scripts from installation folder use absolute paths to reference other files within installation folder
+print_log "replace absolue paths from installation files with a relative ."
perl -pi -e "s!$IMAGE_DIR/!./!" $IMAGE_DIR/usr/bin/auto* $IMAGE_DIR/usr/share/autoconf/autom4te.cfg
+print_log "creating $IMAGE_DIR/autoconf wrapper script"
cat > $IMAGE_DIR/autoconf << EOF
#!/bin/bash
# Get an absolute path to this script
@@ -123,6 +146,9 @@ PREPEND_INCLUDE="--prepend-include \$this_script_dir/usr/share/autoconf"
exec \$this_script_dir/usr/bin/autoconf \$PREPEND_INCLUDE "\$@"
EOF
+
chmod +x $IMAGE_DIR/autoconf
+
+print_log "archiving $IMAGE_DIR directory as $OUTPUT_ROOT/$BUNDLE_NAME"
cd $IMAGE_DIR
tar -cvzf $OUTPUT_ROOT/$BUNDLE_NAME *
diff --git a/make/devkit/createWindowsDevkit.sh b/make/devkit/createWindowsDevkit.sh
index 0646cb68ef44d..757fb157ad443 100644
--- a/make/devkit/createWindowsDevkit.sh
+++ b/make/devkit/createWindowsDevkit.sh
@@ -56,16 +56,22 @@ BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
UNAME_SYSTEM=`uname -s`
UNAME_RELEASE=`uname -r`
+UNAME_OS=`uname -o`
# Detect cygwin or WSL
IS_CYGWIN=`echo $UNAME_SYSTEM | grep -i CYGWIN`
IS_WSL=`echo $UNAME_RELEASE | grep Microsoft`
+IS_MSYS=`echo $UNAME_OS | grep -i Msys`
+MSYS2_ARG_CONV_EXCL="*" # make "cmd.exe /c" work for msys2
+CMD_EXE="cmd.exe /c"
if test "x$IS_CYGWIN" != "x"; then
BUILD_ENV="cygwin"
+elif test "x$IS_MSYS" != "x"; then
+ BUILD_ENV="cygwin"
elif test "x$IS_WSL" != "x"; then
BUILD_ENV="wsl"
else
- echo "Unknown environment; only Cygwin and WSL are supported."
+ echo "Unknown environment; only Cygwin/MSYS2/WSL are supported."
exit 1
fi
@@ -76,7 +82,7 @@ elif test "x$BUILD_ENV" = "xwsl"; then
fi
# Work around the insanely named ProgramFiles(x86) env variable
-PROGRAMFILES_X86="$($WINDOWS_PATH_TO_UNIX_PATH "$(cmd.exe /c set | sed -n 's/^ProgramFiles(x86)=//p' | tr -d '\r')")"
+PROGRAMFILES_X86="$($WINDOWS_PATH_TO_UNIX_PATH "$(${CMD_EXE} set | sed -n 's/^ProgramFiles(x86)=//p' | tr -d '\r')")"
PROGRAMFILES="$($WINDOWS_PATH_TO_UNIX_PATH "$PROGRAMFILES")"
case $VS_VERSION in
@@ -99,13 +105,15 @@ esac
# Find Visual Studio installation dir
-VSNNNCOMNTOOLS=`cmd.exe /c echo %VS${VS_VERSION_NUM_NODOT}COMNTOOLS% | tr -d '\r'`
+VSNNNCOMNTOOLS=`${CMD_EXE} echo %VS${VS_VERSION_NUM_NODOT}COMNTOOLS% | tr -d '\r'`
+VSNNNCOMNTOOLS="$($WINDOWS_PATH_TO_UNIX_PATH "$VSNNNCOMNTOOLS")"
if [ -d "$VSNNNCOMNTOOLS" ]; then
- VS_INSTALL_DIR="$($WINDOWS_PATH_TO_UNIX_PATH "$VSNNNCOMNTOOLS/../..")"
+ VS_INSTALL_DIR="$VSNNNCOMNTOOLS/../.."
else
VS_INSTALL_DIR="${MSVC_PROGRAMFILES_DIR}/Microsoft Visual Studio/$VS_VERSION"
VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional,Enterprise} 2>/dev/null | head -n1)"
fi
+echo "VSNNNCOMNTOOLS: $VSNNNCOMNTOOLS"
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
# Extract semantic version
@@ -180,7 +188,11 @@ cp $DEVKIT_ROOT/VC/redist/arm64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/arm64
################################################################################
# Copy SDK files
-SDK_INSTALL_DIR="$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION"
+SDK_INSTALL_DIR=`${CMD_EXE} echo %WindowsSdkDir% | tr -d '\r'`
+SDK_INSTALL_DIR="$($WINDOWS_PATH_TO_UNIX_PATH "$SDK_INSTALL_DIR")"
+if [ ! -d "$SDK_INSTALL_DIR" ]; then
+ SDK_INSTALL_DIR="$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION"
+fi
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
SDK_FULL_VERSION="$(ls "$SDK_INSTALL_DIR/bin" | sort -r -n | head -n1)"
diff --git a/make/hotspot/gensrc/GensrcDtrace.gmk b/make/hotspot/gensrc/GensrcDtrace.gmk
index fd243ea82692d..e71c3cb961d4b 100644
--- a/make/hotspot/gensrc/GensrcDtrace.gmk
+++ b/make/hotspot/gensrc/GensrcDtrace.gmk
@@ -47,7 +47,7 @@ ifeq ($(call check-jvm-feature, dtrace), true)
$(call LogInfo, Generating dtrace header file $(@F))
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
- ($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
+ ($(CPP) $(DTRACE_CPP_FLAGS) $(SYSROOT_CFLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
# Process all .d files in DTRACE_SOURCE_DIR. They are:
diff --git a/make/hotspot/lib/CompileGtest.gmk b/make/hotspot/lib/CompileGtest.gmk
index 5c576cbbf0d66..d2cdc7685c922 100644
--- a/make/hotspot/lib/CompileGtest.gmk
+++ b/make/hotspot/lib/CompileGtest.gmk
@@ -104,6 +104,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
undef stringop-overflow, \
DISABLED_WARNINGS_gcc_test_metaspace_misc.cpp := unused-const-variable, \
DISABLED_WARNINGS_gcc_test_threadCpuLoad.cpp := address, \
+ DISABLED_WARNINGS_gcc_test_tribool.cpp := uninitialized, \
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
undef switch format-nonliteral tautological-undefined-compare \
self-assign-overloaded, \
diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
index b2c59505f9a43..6b5edc85b2369 100644
--- a/make/hotspot/lib/CompileJvm.gmk
+++ b/make/hotspot/lib/CompileJvm.gmk
@@ -89,6 +89,7 @@ CFLAGS_VM_VERSION := \
-DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
-DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
-DHOTSPOT_BUILD_TIME='"$(HOTSPOT_BUILD_TIME)"' \
+ -DJVM_VARIANT='"$(JVM_VARIANT)"' \
#
################################################################################
diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk
index 0efb8671da846..ffea9aa3926b9 100644
--- a/make/hotspot/lib/JvmFeatures.gmk
+++ b/make/hotspot/lib/JvmFeatures.gmk
@@ -125,6 +125,7 @@ endif
ifneq ($(call check-jvm-feature, cds), true)
JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
JVM_EXCLUDE_FILES += \
+ aotCodeCache.cpp \
classLoaderDataShared.cpp \
classLoaderExt.cpp \
systemDictionaryShared.cpp
@@ -224,11 +225,9 @@ ifeq ($(call check-jvm-feature, opt-size), true)
frame_ppc.cpp \
frame_s390.cpp \
frame_x86.cpp \
- genCollectedHeap.cpp \
generation.cpp \
growableArray.cpp \
handles.cpp \
- hashtable.cpp \
heap.cpp \
icache.cpp \
icache_arm.cpp \
@@ -246,7 +245,6 @@ ifeq ($(call check-jvm-feature, opt-size), true)
linkResolver.cpp \
klass.cpp \
klassVtable.cpp \
- markSweep.cpp \
memRegion.cpp \
memoryPool.cpp \
method.cpp \
diff --git a/make/hotspot/lib/JvmFlags.gmk b/make/hotspot/lib/JvmFlags.gmk
index 97538da74c730..57b632ee53236 100644
--- a/make/hotspot/lib/JvmFlags.gmk
+++ b/make/hotspot/lib/JvmFlags.gmk
@@ -91,7 +91,6 @@ JVM_CFLAGS += \
$(JVM_CFLAGS_TARGET_DEFINES) \
$(JVM_CFLAGS_FEATURES) \
$(JVM_CFLAGS_INCLUDES) \
- $(EXTRA_CFLAGS) \
#
ifneq ($(HOTSPOT_OVERRIDE_LIBPATH), )
diff --git a/make/ide/vscode/hotspot/indexers/ccls-settings.txt b/make/ide/vscode/hotspot/indexers/ccls-settings.txt
index 53fad0df8d4aa..bacc49c6112e9 100644
--- a/make/ide/vscode/hotspot/indexers/ccls-settings.txt
+++ b/make/ide/vscode/hotspot/indexers/ccls-settings.txt
@@ -22,7 +22,7 @@
],
// Disable conflicting features from cpptools
- "C_Cpp.autocomplete": "Disabled",
- "C_Cpp.errorSquiggles": "Disabled",
- "C_Cpp.formatting": "Disabled",
- "C_Cpp.intelliSenseEngine": "Disabled",
+ "C_Cpp.autocomplete": "disabled",
+ "C_Cpp.errorSquiggles": "disabled",
+ "C_Cpp.formatting": "disabled",
+ "C_Cpp.intelliSenseEngine": "disabled",
diff --git a/make/ide/vscode/hotspot/indexers/clangd-settings.txt b/make/ide/vscode/hotspot/indexers/clangd-settings.txt
index 0333954029191..2a5b5e4a8cb1f 100644
--- a/make/ide/vscode/hotspot/indexers/clangd-settings.txt
+++ b/make/ide/vscode/hotspot/indexers/clangd-settings.txt
@@ -11,7 +11,7 @@
],
// Disable conflicting features from cpptools
- "C_Cpp.autocomplete": "Disabled",
- "C_Cpp.errorSquiggles": "Disabled",
- "C_Cpp.formatting": "Disabled",
- "C_Cpp.intelliSenseEngine": "Disabled",
+ "C_Cpp.autocomplete": "disabled",
+ "C_Cpp.errorSquiggles": "disabled",
+ "C_Cpp.formatting": "disabled",
+ "C_Cpp.intelliSenseEngine": "disabled",
diff --git a/make/ide/vscode/hotspot/indexers/rtags-settings.txt b/make/ide/vscode/hotspot/indexers/rtags-settings.txt
index b19e6869b6c0a..75727ae17f195 100644
--- a/make/ide/vscode/hotspot/indexers/rtags-settings.txt
+++ b/make/ide/vscode/hotspot/indexers/rtags-settings.txt
@@ -8,7 +8,7 @@
"rtags.misc.compilationDatabaseDirectory": "{{OUTPUTDIR}}",
// Disable conflicting features from cpptools
- "C_Cpp.autocomplete": "Disabled",
- "C_Cpp.errorSquiggles": "Disabled",
- "C_Cpp.formatting": "Disabled",
- "C_Cpp.intelliSenseEngine": "Disabled",
+ "C_Cpp.autocomplete": "disabled",
+ "C_Cpp.errorSquiggles": "disabled",
+ "C_Cpp.formatting": "disabled",
+ "C_Cpp.intelliSenseEngine": "disabled",
diff --git a/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java b/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java
index 1b930ca752777..fa1b33bb03e34 100644
--- a/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java
+++ b/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2025, 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
@@ -59,6 +59,7 @@ public class HelloClasslist {
private static final Logger LOGGER = Logger.getLogger("Hello");
+ @SuppressWarnings("restricted")
public static void main(String ... args) throws Throwable {
FileSystems.getDefault();
@@ -141,6 +142,7 @@ public static void main(String ... args) throws Throwable {
HelloClasslist.class.getMethod("staticMethod_V").invoke(null);
var obj = HelloClasslist.class.getMethod("staticMethod_L_L", Object.class).invoke(null, instance);
HelloClasslist.class.getField("field").get(instance);
+ MethodHandles.Lookup.ClassOption.class.getEnumConstants();
// A selection of trivial and relatively common MH operations
invoke(MethodHandles.identity(double.class), 1.0);
@@ -160,6 +162,9 @@ record B(int b) { }
case B b -> b.b;
default -> 17;
};
+ // record run-time methods
+ o.equals(new B(5));
+ o.hashCode();
LOGGER.log(Level.FINE, "Value: " + value);
// The Striped64$Cell is loaded rarely only when there's a contention among
diff --git a/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java b/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
index 61395f982b2aa..d8752bca1424d 100644
--- a/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
+++ b/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025, 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
@@ -198,7 +198,6 @@ Map getTargetMap() throws Exception {
String[] cldrBundles = getCLDRPath().split(",");
// myMap contains resources for id.
- @SuppressWarnings("unchecked")
Map myMap = new HashMap<>();
int index;
for (index = 0; index < cldrBundles.length; index++) {
diff --git a/make/jdk/src/classes/build/tools/cldrconverter/LDMLParseHandler.java b/make/jdk/src/classes/build/tools/cldrconverter/LDMLParseHandler.java
index d2d7e94fc98cd..6d5dde0d181a3 100644
--- a/make/jdk/src/classes/build/tools/cldrconverter/LDMLParseHandler.java
+++ b/make/jdk/src/classes/build/tools/cldrconverter/LDMLParseHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025, 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
@@ -1079,7 +1079,6 @@ private String getTarget(String path, String calType, String context, String wid
}
@Override
- @SuppressWarnings("fallthrough")
public void endElement(String uri, String localName, String qName) throws SAXException {
assert qName.equals(currentContainer.getqName()) : "current=" + currentContainer.getqName() + ", param=" + qName;
switch (qName) {
diff --git a/make/jdk/src/classes/build/tools/taglet/PreviewNote.java b/make/jdk/src/classes/build/tools/taglet/PreviewNote.java
new file mode 100644
index 0000000000000..ee3f9bea52717
--- /dev/null
+++ b/make/jdk/src/classes/build/tools/taglet/PreviewNote.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2025, 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.
+ */
+
+package build.tools.taglet;
+
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+
+
+import javax.lang.model.element.Element;
+import javax.tools.Diagnostic;
+
+
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.UnknownInlineTagTree;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.StandardDoclet;
+import jdk.javadoc.doclet.Taglet;
+
+import static com.sun.source.doctree.DocTree.Kind.UNKNOWN_INLINE_TAG;
+
+/**
+ * An inline tag to insert a note formatted as preview note.
+ * The tag can be used as follows:
+ *
+ *
+ * {@previewNote jep-number [Preview note heading]}
+ * Preview note content
+ * {@previewNote}
+ *
+ *
+ */
+public class PreviewNote implements Taglet {
+
+ static final String TAG_NAME = "previewNote";
+ Reporter reporter = null;
+
+ @Override
+ public void init(DocletEnvironment env, Doclet doclet) {
+ if (doclet instanceof StandardDoclet stdoclet) {
+ reporter = stdoclet.getReporter();
+ }
+ }
+
+ /**
+ * Returns the set of locations in which the tag may be used.
+ */
+ @Override
+ public Set getAllowedLocations() {
+ return EnumSet.allOf(Taglet.Location.class);
+ }
+
+ @Override
+ public boolean isInlineTag() {
+ return true;
+ }
+
+ @Override
+ public String getName() {
+ return TAG_NAME;
+ }
+
+ @Override
+ public String toString(List extends DocTree> tags, Element elem) {
+
+ for (DocTree tag : tags) {
+ if (tag.getKind() == UNKNOWN_INLINE_TAG) {
+ UnknownInlineTagTree inlineTag = (UnknownInlineTagTree) tag;
+ String[] content = inlineTag.getContent().toString().trim().split("\\s+", 2);
+ if (!content[0].isBlank()) {
+ StringBuilder sb = new StringBuilder("""
+
+ """);
+ if (content.length == 2) {
+ sb.append("""
+
+ """)
+ .append(content[1])
+ .append("""
+
+ """);
+ }
+ sb.append("""
+
+
+ """;
+ }
+ }
+ }
+
+ if (reporter == null) {
+ throw new IllegalArgumentException("@" + TAG_NAME + " taglet content must be begin or end");
+ }
+ reporter.print(Diagnostic.Kind.ERROR, "@" + TAG_NAME + " taglet content must be begin or end");
+ return "";
+ }
+}
diff --git a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java
index 6faefecd4247a..db8924c79fbf4 100644
--- a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java
+++ b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2025, 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
@@ -45,6 +45,18 @@
import java.io.OutputStream;
import java.io.StringWriter;
import java.io.Writer;
+import java.lang.classfile.*;
+import java.lang.classfile.attribute.*;
+import java.lang.classfile.constantpool.ClassEntry;
+import java.lang.classfile.constantpool.ConstantPoolBuilder;
+import java.lang.classfile.constantpool.ConstantValueEntry;
+import java.lang.classfile.constantpool.IntegerEntry;
+import java.lang.classfile.constantpool.Utf8Entry;
+import java.lang.constant.ClassDesc;
+import java.lang.constant.MethodTypeDesc;
+import java.lang.constant.ModuleDesc;
+import java.lang.constant.PackageDesc;
+import java.lang.reflect.AccessFlag;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.FileVisitResult;
@@ -88,63 +100,6 @@
import javax.tools.StandardLocation;
import com.sun.source.util.JavacTask;
-import com.sun.tools.classfile.AccessFlags;
-import com.sun.tools.classfile.Annotation;
-import com.sun.tools.classfile.Annotation.Annotation_element_value;
-import com.sun.tools.classfile.Annotation.Array_element_value;
-import com.sun.tools.classfile.Annotation.Class_element_value;
-import com.sun.tools.classfile.Annotation.Enum_element_value;
-import com.sun.tools.classfile.Annotation.Primitive_element_value;
-import com.sun.tools.classfile.Annotation.element_value;
-import com.sun.tools.classfile.Annotation.element_value_pair;
-import com.sun.tools.classfile.AnnotationDefault_attribute;
-import com.sun.tools.classfile.Attribute;
-import com.sun.tools.classfile.Attributes;
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.ClassWriter;
-import com.sun.tools.classfile.ConstantPool;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Double_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Float_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Integer_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Long_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Module_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Package_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_String_info;
-import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info;
-import com.sun.tools.classfile.ConstantPool.CPInfo;
-import com.sun.tools.classfile.ConstantPool.InvalidIndex;
-import com.sun.tools.classfile.ConstantPoolException;
-import com.sun.tools.classfile.ConstantValue_attribute;
-import com.sun.tools.classfile.Deprecated_attribute;
-import com.sun.tools.classfile.Descriptor;
-import com.sun.tools.classfile.Exceptions_attribute;
-import com.sun.tools.classfile.Field;
-import com.sun.tools.classfile.InnerClasses_attribute;
-import com.sun.tools.classfile.InnerClasses_attribute.Info;
-import com.sun.tools.classfile.Method;
-import com.sun.tools.classfile.ModulePackages_attribute;
-import com.sun.tools.classfile.MethodParameters_attribute;
-import com.sun.tools.classfile.ModuleMainClass_attribute;
-import com.sun.tools.classfile.ModuleResolution_attribute;
-import com.sun.tools.classfile.ModuleTarget_attribute;
-import com.sun.tools.classfile.Module_attribute;
-import com.sun.tools.classfile.Module_attribute.ExportsEntry;
-import com.sun.tools.classfile.Module_attribute.OpensEntry;
-import com.sun.tools.classfile.Module_attribute.ProvidesEntry;
-import com.sun.tools.classfile.Module_attribute.RequiresEntry;
-import com.sun.tools.classfile.NestHost_attribute;
-import com.sun.tools.classfile.NestMembers_attribute;
-import com.sun.tools.classfile.PermittedSubclasses_attribute;
-import com.sun.tools.classfile.Record_attribute;
-import com.sun.tools.classfile.Record_attribute.ComponentInfo;
-import com.sun.tools.classfile.RuntimeAnnotations_attribute;
-import com.sun.tools.classfile.RuntimeInvisibleAnnotations_attribute;
-import com.sun.tools.classfile.RuntimeInvisibleParameterAnnotations_attribute;
-import com.sun.tools.classfile.RuntimeParameterAnnotations_attribute;
-import com.sun.tools.classfile.RuntimeVisibleAnnotations_attribute;
-import com.sun.tools.classfile.RuntimeVisibleParameterAnnotations_attribute;
-import com.sun.tools.classfile.Signature_attribute;
import com.sun.tools.javac.api.JavacTool;
import com.sun.tools.javac.jvm.Target;
import com.sun.tools.javac.util.Assert;
@@ -154,13 +109,15 @@
import java.util.Optional;
import java.util.function.Consumer;
+import static java.lang.classfile.ClassFile.ACC_PROTECTED;
+import static java.lang.classfile.ClassFile.ACC_PUBLIC;
+
/**
* A tool for processing the .sym.txt files.
*
* To add historical data for JDK N, N >= 11, do the following:
* * cd /src/jdk.compiler/share/data/symbols
- * * /bin/java --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
- * --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
+ * * /bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
* --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
* --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
* --add-modules jdk.jdeps \
@@ -409,7 +366,7 @@ LoadDescriptions load(Path ctDescriptionWithExtraContent, Path ctDescriptionOpen
reader.moveNext();
break;
default:
- throw new IllegalStateException("Unknown key: " + reader.lineKey);
+ throw new IllegalArgumentException("Unknown key: " + reader.lineKey);
}
}
}
@@ -432,7 +389,7 @@ LoadDescriptions load(Path ctDescriptionWithExtraContent, Path ctDescriptionOpen
reader.moveNext();
break;
default:
- throw new IllegalStateException("Unknown key: " + reader.lineKey);
+ throw new IllegalArgumentException("Unknown key: " + reader.lineKey);
}
}
}
@@ -830,31 +787,12 @@ void writeModule(Map> directory2FileData,
ModuleHeaderDescription header,
char version,
Function version2ModuleVersion) throws IOException {
- List constantPool = new ArrayList<>();
- constantPool.add(null);
- int currentClass = addClass(constantPool, "module-info");
- int superclass = 0;
- int[] interfaces = new int[0];
- AccessFlags flags = new AccessFlags(header.flags);
- Map attributesMap = new HashMap<>();
- String versionString = Character.toString(version);
- addAttributes(moduleDescription, header, constantPool, attributesMap,
- version2ModuleVersion.apply(version));
- Attributes attributes = new Attributes(attributesMap);
- CPInfo[] cpData = constantPool.toArray(new CPInfo[constantPool.size()]);
- ConstantPool cp = new ConstantPool(cpData);
- ClassFile classFile = new ClassFile(0xCAFEBABE,
- Target.DEFAULT.minorVersion,
- Target.DEFAULT.majorVersion,
- cp,
- flags,
- currentClass,
- superclass,
- interfaces,
- new Field[0],
- new Method[0],
- attributes);
+ var classFile = ClassFile.of().build(ClassDesc.of("module-info"), clb -> {
+ clb.withFlags(header.flags);
+ addAttributes(moduleDescription, header, clb, version2ModuleVersion.apply(version));
+ });
+ String versionString = Character.toString(version);
doWrite(directory2FileData, versionString, moduleDescription.name, "module-info" + EXTENSION, classFile);
}
@@ -863,57 +801,26 @@ void writeClass(Map> directory2FileData,
ClassHeaderDescription header,
String module,
String version) throws IOException {
- List constantPool = new ArrayList<>();
- constantPool.add(null);
- List methods = new ArrayList<>();
- for (MethodDescription methDesc : classDescription.methods) {
- if (disjoint(methDesc.versions, version))
- continue;
- Descriptor descriptor = new Descriptor(addString(constantPool, methDesc.descriptor));
- //TODO: LinkedHashMap to avoid param annotations vs. Signature problem in javac's ClassReader:
- Map attributesMap = new LinkedHashMap<>();
- addAttributes(methDesc, constantPool, attributesMap);
- Attributes attributes = new Attributes(attributesMap);
- AccessFlags flags = new AccessFlags(methDesc.flags);
- int nameString = addString(constantPool, methDesc.name);
- methods.add(new Method(flags, nameString, descriptor, attributes));
- }
- List fields = new ArrayList<>();
- for (FieldDescription fieldDesc : classDescription.fields) {
- if (disjoint(fieldDesc.versions, version))
- continue;
- Descriptor descriptor = new Descriptor(addString(constantPool, fieldDesc.descriptor));
- Map attributesMap = new HashMap<>();
- addAttributes(fieldDesc, constantPool, attributesMap);
- Attributes attributes = new Attributes(attributesMap);
- AccessFlags flags = new AccessFlags(fieldDesc.flags);
- int nameString = addString(constantPool, fieldDesc.name);
- fields.add(new Field(flags, nameString, descriptor, attributes));
- }
- int currentClass = addClass(constantPool, classDescription.name);
- int superclass = header.extendsAttr != null ? addClass(constantPool, header.extendsAttr) : 0;
- int[] interfaces = new int[header.implementsAttr.size()];
- int i = 0;
- for (String intf : header.implementsAttr) {
- interfaces[i++] = addClass(constantPool, intf);
- }
- AccessFlags flags = new AccessFlags(header.flags);
- Map attributesMap = new HashMap<>();
- addAttributes(header, constantPool, attributesMap);
- Attributes attributes = new Attributes(attributesMap);
- ConstantPool cp = new ConstantPool(constantPool.toArray(new CPInfo[constantPool.size()]));
- ClassFile classFile = new ClassFile(0xCAFEBABE,
- Target.DEFAULT.minorVersion,
- Target.DEFAULT.majorVersion,
- cp,
- flags,
- currentClass,
- superclass,
- interfaces,
- fields.toArray(new Field[0]),
- methods.toArray(new Method[0]),
- attributes);
-
+ var classFile = ClassFile.of().build(ClassDesc.ofInternalName(classDescription.name), clb -> {
+ if (header.extendsAttr != null)
+ clb.withSuperclass(ClassDesc.ofInternalName(header.extendsAttr));
+ clb.withInterfaceSymbols(header.implementsAttr.stream().map(ClassDesc::ofInternalName).collect(Collectors.toList()))
+ .withFlags(header.flags);
+ for (FieldDescription fieldDesc : classDescription.fields) {
+ if (disjoint(fieldDesc.versions, version))
+ continue;
+ clb.withField(fieldDesc.name, ClassDesc.ofDescriptor(fieldDesc.descriptor), fb -> {
+ addAttributes(fieldDesc, fb);
+ fb.withFlags(fieldDesc.flags);
+ });
+ }
+ for (MethodDescription methDesc : classDescription.methods) {
+ if (disjoint(methDesc.versions, version))
+ continue;
+ clb.withMethod(methDesc.name, MethodTypeDesc.ofDescriptor(methDesc.descriptor), methDesc.flags, mb -> addAttributes(methDesc, mb));
+ }
+ addAttributes(header, clb);
+ });
doWrite(directory2FileData, version, module, classDescription.name + EXTENSION, classFile);
}
@@ -921,19 +828,13 @@ private void doWrite(Map> directory2FileData,
String version,
String moduleName,
String fileName,
- ClassFile classFile) throws IOException {
+ byte[] classFile) throws IOException {
int lastSlash = fileName.lastIndexOf('/');
String pack = lastSlash != (-1) ? fileName.substring(0, lastSlash + 1) : "/";
String directory = version + "/" + moduleName + "/" + pack;
String fullFileName = version + "/" + moduleName + "/" + fileName;
- try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
- ClassWriter w = new ClassWriter();
-
- w.write(classFile, out);
-
- openDirectory(directory2FileData, directory)
- .add(new FileData(fullFileName, out.toByteArray()));
- }
+ openDirectory(directory2FileData, directory)
+ .add(new FileData(fullFileName, classFile));
}
private Set openDirectory(Map> directory2FileData,
@@ -955,278 +856,147 @@ public FileData(String fileName, byte[] fileData) {
private void addAttributes(ModuleDescription md,
ModuleHeaderDescription header,
- List cp,
- Map attributes,
+ ClassBuilder builder,
String moduleVersion) {
- addGenericAttributes(header, cp, attributes);
+ addGenericAttributes(header, builder);
if (header.moduleResolution != null) {
- int attrIdx = addString(cp, Attribute.ModuleResolution);
- final ModuleResolution_attribute resIdx =
- new ModuleResolution_attribute(attrIdx,
- header.moduleResolution);
- attributes.put(Attribute.ModuleResolution, resIdx);
+ builder.with(ModuleResolutionAttribute.of(header.moduleResolution));
}
if (header.moduleTarget != null) {
- int attrIdx = addString(cp, Attribute.ModuleTarget);
- int targetIdx = addString(cp, header.moduleTarget);
- attributes.put(Attribute.ModuleTarget,
- new ModuleTarget_attribute(attrIdx, targetIdx));
+ builder.with(ModuleTargetAttribute.of(header.moduleTarget));
}
if (header.moduleMainClass != null) {
- int attrIdx = addString(cp, Attribute.ModuleMainClass);
- int targetIdx = addClassName(cp, header.moduleMainClass);
- attributes.put(Attribute.ModuleMainClass,
- new ModuleMainClass_attribute(attrIdx, targetIdx));
- }
- int versionIdx = addString(cp, moduleVersion);
- int attrIdx = addString(cp, Attribute.Module);
- attributes.put(Attribute.Module,
- new Module_attribute(attrIdx,
- addModuleName(cp, md.name),
- 0,
- versionIdx,
- header.requires
- .stream()
- .map(r -> createRequiresEntry(cp, r))
- .collect(Collectors.toList())
- .toArray(new RequiresEntry[0]),
- header.exports
- .stream()
- .map(e -> createExportsEntry(cp, e))
- .collect(Collectors.toList())
- .toArray(new ExportsEntry[0]),
- header.opens
- .stream()
- .map(e -> createOpensEntry(cp, e))
- .collect(Collectors.toList())
- .toArray(new OpensEntry[0]),
- header.uses
- .stream()
- .mapToInt(u -> addClassName(cp, u))
- .toArray(),
- header.provides
- .stream()
- .map(p -> createProvidesEntry(cp, p))
- .collect(Collectors.toList())
- .toArray(new ProvidesEntry[0])));
- addInnerClassesAttribute(header, cp, attributes);
- }
-
- private static RequiresEntry createRequiresEntry(List cp,
- RequiresDescription r) {
- final int idx = addModuleName(cp, r.moduleName);
- return new RequiresEntry(idx,
- r.flags,
- r.version != null
- ? addString(cp, r.version)
- : 0);
- }
-
- private static ExportsEntry createExportsEntry(List cp,
- ExportsDescription export) {
- int[] to;
- if (export.isQualified()) {
- to = export.to.stream()
- .mapToInt(module -> addModuleName(cp, module))
- .toArray();
- } else {
- to = new int[0];
+ builder.with(ModuleMainClassAttribute.of(ClassDesc.ofInternalName(header.moduleMainClass)));
}
- return new ExportsEntry(addPackageName(cp, export.packageName()), 0, to);
- }
-
- private static OpensEntry createOpensEntry(List cp, String e) {
- return new OpensEntry(addPackageName(cp, e), 0, new int[0]);
- }
-
- private static ProvidesEntry createProvidesEntry(List cp,
- ModuleHeaderDescription.ProvidesDescription p) {
- final int idx = addClassName(cp, p.interfaceName);
- return new ProvidesEntry(idx, p.implNames
- .stream()
- .mapToInt(i -> addClassName(cp, i))
- .toArray());
+ builder.with(ModuleAttribute.of(ModuleDesc.of(md.name), mb -> {
+ mb.moduleVersion(moduleVersion);
+ for (var req : header.requires) {
+ mb.requires(ModuleDesc.of(req.moduleName), req.flags, req.version); // nullable version
+ }
+ for (var exp : header.exports) {
+ if (exp.isQualified()) {
+ mb.exports(PackageDesc.ofInternalName(exp.packageName()), 0, exp.to.stream().map(ModuleDesc::of).toArray(ModuleDesc[]::new));
+ } else {
+ mb.exports(PackageDesc.ofInternalName(exp.packageName()), 0);
+ }
+ }
+ for (var open : header.opens) {
+ mb.opens(PackageDesc.ofInternalName(open), 0);
+ }
+ for (var use : header.uses) {
+ mb.uses(ClassDesc.ofInternalName(use));
+ }
+ for (var provide : header.provides) {
+ mb.provides(ClassDesc.ofInternalName(provide.interfaceName),
+ provide.implNames.stream().map(ClassDesc::ofInternalName).toArray(ClassDesc[]::new));
+ }
+ }));
+ addInnerClassesAttribute(header, builder);
}
- private void addAttributes(ClassHeaderDescription header,
- List constantPool, Map attributes) {
- addGenericAttributes(header, constantPool, attributes);
+ private void addAttributes(ClassHeaderDescription header, ClassBuilder builder) {
+ addGenericAttributes(header, builder);
if (header.nestHost != null) {
- int attributeString = addString(constantPool, Attribute.NestHost);
- int nestHost = addClass(constantPool, header.nestHost);
- attributes.put(Attribute.NestHost,
- new NestHost_attribute(attributeString, nestHost));
+ builder.with(NestHostAttribute.of(ClassDesc.ofInternalName(header.nestHost)));
}
if (header.nestMembers != null && !header.nestMembers.isEmpty()) {
- int attributeString = addString(constantPool, Attribute.NestMembers);
- int[] nestMembers = new int[header.nestMembers.size()];
- int i = 0;
- for (String intf : header.nestMembers) {
- nestMembers[i++] = addClass(constantPool, intf);
- }
- attributes.put(Attribute.NestMembers,
- new NestMembers_attribute(attributeString, nestMembers));
+ builder.with(NestMembersAttribute.ofSymbols(header.nestMembers.stream().map(ClassDesc::ofInternalName).collect(Collectors.toList())));
}
if (header.isRecord) {
- assert header.recordComponents != null;
- int attributeString = addString(constantPool, Attribute.Record);
- ComponentInfo[] recordComponents = new ComponentInfo[header.recordComponents.size()];
- int i = 0;
- for (RecordComponentDescription rcd : header.recordComponents) {
- int name = addString(constantPool, rcd.name);
- Descriptor desc = new Descriptor(addString(constantPool, rcd.descriptor));
- Map nestedAttrs = new HashMap<>();
- addGenericAttributes(rcd, constantPool, nestedAttrs);
- Attributes attrs = new Attributes(nestedAttrs);
- recordComponents[i++] = new ComponentInfo(name, desc, attrs);
- }
- attributes.put(Attribute.Record,
- new Record_attribute(attributeString, recordComponents));
+ builder.with(RecordAttribute.of(header.recordComponents.stream().map(desc -> {
+ List> attributes = new ArrayList<>();
+ addGenericAttributes(desc, attributes::add, builder.constantPool());
+ return RecordComponentInfo.of(desc.name, ClassDesc.ofDescriptor(desc.descriptor), attributes);
+ }).collect(Collectors.toList())));
}
if (header.isSealed) {
- int attributeString = addString(constantPool, Attribute.PermittedSubclasses);
- int[] subclasses = new int[header.permittedSubclasses.size()];
- int i = 0;
- for (String intf : header.permittedSubclasses) {
- subclasses[i++] = addClass(constantPool, intf);
- }
- attributes.put(Attribute.PermittedSubclasses,
- new PermittedSubclasses_attribute(attributeString, subclasses));
+ builder.with(PermittedSubclassesAttribute.ofSymbols(header.permittedSubclasses.stream().map(ClassDesc::ofInternalName).collect(Collectors.toList())));
}
- addInnerClassesAttribute(header, constantPool, attributes);
+ addInnerClassesAttribute(header, builder);
}
- private void addInnerClassesAttribute(HeaderDescription header,
- List constantPool, Map attributes) {
+ private void addInnerClassesAttribute(HeaderDescription header, ClassBuilder builder) {
if (header.innerClasses != null && !header.innerClasses.isEmpty()) {
- Info[] innerClasses = new Info[header.innerClasses.size()];
- int i = 0;
- for (InnerClassInfo info : header.innerClasses) {
- innerClasses[i++] =
- new Info(info.innerClass == null ? 0 : addClass(constantPool, info.innerClass),
- info.outerClass == null ? 0 : addClass(constantPool, info.outerClass),
- info.innerClassName == null ? 0 : addString(constantPool, info.innerClassName),
- new AccessFlags(info.innerClassFlags));
- }
- int attributeString = addString(constantPool, Attribute.InnerClasses);
- attributes.put(Attribute.InnerClasses,
- new InnerClasses_attribute(attributeString, innerClasses));
+ builder.with(InnerClassesAttribute.of(header.innerClasses.stream()
+ .map(info -> java.lang.classfile.attribute.InnerClassInfo.of(
+ ClassDesc.ofInternalName(info.innerClass),
+ Optional.ofNullable(info.outerClass).map(ClassDesc::ofInternalName),
+ Optional.ofNullable(info.innerClassName),
+ info.innerClassFlags
+ )).collect(Collectors.toList())));
}
}
- private void addAttributes(MethodDescription desc, List constantPool, Map attributes) {
- addGenericAttributes(desc, constantPool, attributes);
+ private void addAttributes(MethodDescription desc, MethodBuilder builder) {
+ addGenericAttributes(desc, builder);
if (desc.thrownTypes != null) {
- int[] exceptions = new int[desc.thrownTypes.size()];
- int i = 0;
- for (String exc : desc.thrownTypes) {
- exceptions[i++] = addClass(constantPool, exc);
- }
- int attributeString = addString(constantPool, Attribute.Exceptions);
- attributes.put(Attribute.Exceptions,
- new Exceptions_attribute(attributeString, exceptions));
+ builder.with(ExceptionsAttribute.ofSymbols(desc.thrownTypes.stream()
+ .map(ClassDesc::ofInternalName).collect(Collectors.toList())));
}
if (desc.annotationDefaultValue != null) {
- int attributeString = addString(constantPool, Attribute.AnnotationDefault);
- element_value attributeValue = createAttributeValue(constantPool,
- desc.annotationDefaultValue);
- attributes.put(Attribute.AnnotationDefault,
- new AnnotationDefault_attribute(attributeString, attributeValue));
+ builder.with(AnnotationDefaultAttribute.of(createAttributeValue(desc.annotationDefaultValue)));
}
if (desc.classParameterAnnotations != null && !desc.classParameterAnnotations.isEmpty()) {
- int attributeString =
- addString(constantPool, Attribute.RuntimeInvisibleParameterAnnotations);
- Annotation[][] annotations =
- createParameterAnnotations(constantPool, desc.classParameterAnnotations);
- attributes.put(Attribute.RuntimeInvisibleParameterAnnotations,
- new RuntimeInvisibleParameterAnnotations_attribute(attributeString,
- annotations));
+ builder.with(RuntimeInvisibleParameterAnnotationsAttribute.of(createParameterAnnotations(desc.classParameterAnnotations)));
}
if (desc.runtimeParameterAnnotations != null && !desc.runtimeParameterAnnotations.isEmpty()) {
- int attributeString =
- addString(constantPool, Attribute.RuntimeVisibleParameterAnnotations);
- Annotation[][] annotations =
- createParameterAnnotations(constantPool, desc.runtimeParameterAnnotations);
- attributes.put(Attribute.RuntimeVisibleParameterAnnotations,
- new RuntimeVisibleParameterAnnotations_attribute(attributeString,
- annotations));
+ builder.with(RuntimeVisibleParameterAnnotationsAttribute.of(createParameterAnnotations(desc.runtimeParameterAnnotations)));
}
if (desc.methodParameters != null && !desc.methodParameters.isEmpty()) {
- int attributeString =
- addString(constantPool, Attribute.MethodParameters);
- MethodParameters_attribute.Entry[] entries =
- desc.methodParameters
- .stream()
- .map(p -> new MethodParameters_attribute.Entry(p.name == null || p.name.isEmpty() ? 0
- : addString(constantPool, p.name),
- p.flags))
- .toArray(s -> new MethodParameters_attribute.Entry[s]);
- attributes.put(Attribute.MethodParameters,
- new MethodParameters_attribute(attributeString, entries));
+ builder.with(MethodParametersAttribute.of(desc.methodParameters.stream()
+ .map(mp -> MethodParameterInfo.ofParameter(Optional.ofNullable(mp.name), mp.flags)).collect(Collectors.toList())));
}
}
- private void addAttributes(FieldDescription desc, List constantPool, Map attributes) {
- addGenericAttributes(desc, constantPool, attributes);
+ private void addAttributes(FieldDescription desc, FieldBuilder builder) {
+ addGenericAttributes(desc, builder);
if (desc.constantValue != null) {
- Pair constantPoolEntry =
- addConstant(constantPool, desc.constantValue, false);
- Assert.checkNonNull(constantPoolEntry);
- int constantValueString = addString(constantPool, Attribute.ConstantValue);
- attributes.put(Attribute.ConstantValue,
- new ConstantValue_attribute(constantValueString, constantPoolEntry.fst));
+ var cp = builder.constantPool();
+ ConstantValueEntry entry = switch (desc.constantValue) {
+ case Boolean v -> cp.intEntry(v ? 1 : 0);
+ case Character v -> cp.intEntry(v);
+ case Integer v -> cp.intEntry(v);
+ case Long v -> cp.longEntry(v);
+ case Float v -> cp.floatEntry(v);
+ case Double v -> cp.doubleEntry(v);
+ case String v -> cp.stringEntry(v);
+ default -> throw new IllegalArgumentException(desc.constantValue.getClass().toString());
+ };
+ builder.with(ConstantValueAttribute.of(entry));
}
}
- private void addGenericAttributes(FeatureDescription desc, List constantPool, Map attributes) {
+ @SuppressWarnings("unchecked")
+ private void addGenericAttributes(FeatureDescription desc, ClassFileBuilder, ?> builder) {
+ addGenericAttributes(desc, (Consumer super Attribute>>) builder, builder.constantPool());
+ }
+
+ private void addGenericAttributes(FeatureDescription desc, Consumer super Attribute>> sink, ConstantPoolBuilder cpb) {
+ @SuppressWarnings("unchecked")
+ var builder = (Consumer>) sink;
if (desc.deprecated) {
- int attributeString = addString(constantPool, Attribute.Deprecated);
- attributes.put(Attribute.Deprecated,
- new Deprecated_attribute(attributeString));
+ builder.accept(DeprecatedAttribute.of());
}
if (desc.signature != null) {
- int attributeString = addString(constantPool, Attribute.Signature);
- int signatureString = addString(constantPool, desc.signature);
- attributes.put(Attribute.Signature,
- new Signature_attribute(attributeString, signatureString));
+ builder.accept(SignatureAttribute.of(cpb.utf8Entry(desc.signature)));
}
if (desc.classAnnotations != null && !desc.classAnnotations.isEmpty()) {
- int attributeString = addString(constantPool, Attribute.RuntimeInvisibleAnnotations);
- Annotation[] annotations = createAnnotations(constantPool, desc.classAnnotations);
- attributes.put(Attribute.RuntimeInvisibleAnnotations,
- new RuntimeInvisibleAnnotations_attribute(attributeString, annotations));
+ builder.accept(RuntimeInvisibleAnnotationsAttribute.of(createAnnotations(desc.classAnnotations)));
}
if (desc.runtimeAnnotations != null && !desc.runtimeAnnotations.isEmpty()) {
- int attributeString = addString(constantPool, Attribute.RuntimeVisibleAnnotations);
- Annotation[] annotations = createAnnotations(constantPool, desc.runtimeAnnotations);
- attributes.put(Attribute.RuntimeVisibleAnnotations,
- new RuntimeVisibleAnnotations_attribute(attributeString, annotations));
+ builder.accept(RuntimeVisibleAnnotationsAttribute.of(createAnnotations(desc.runtimeAnnotations)));
}
}
- private Annotation[] createAnnotations(List constantPool, List desc) {
- Annotation[] result = new Annotation[desc.size()];
- int i = 0;
-
- for (AnnotationDescription ad : desc) {
- result[i++] = createAnnotation(constantPool, ad);
- }
-
- return result;
+ private List createAnnotations(List desc) {
+ return desc.stream().map(this::createAnnotation).collect(Collectors.toList());
}
- private Annotation[][] createParameterAnnotations(List constantPool, List> desc) {
- Annotation[][] result = new Annotation[desc.size()][];
- int i = 0;
-
- for (List paramAnnos : desc) {
- result[i++] = createAnnotations(constantPool, paramAnnos);
- }
-
- return result;
+ private List> createParameterAnnotations(List> desc) {
+ return desc.stream().map(this::createAnnotations).collect(Collectors.toList());
}
- private Annotation createAnnotation(List constantPool, AnnotationDescription desc) {
+ private Annotation createAnnotation(AnnotationDescription desc) {
String annotationType = desc.annotationType;
Map values = desc.values;
@@ -1257,184 +1027,33 @@ private Annotation createAnnotation(List constantPool, AnnotationDescrip
annotationType = RESTRICTED_ANNOTATION_INTERNAL;
}
- return new Annotation(null,
- addString(constantPool, annotationType),
- createElementPairs(constantPool, values));
- }
-
- private element_value_pair[] createElementPairs(List constantPool, Map annotationAttributes) {
- element_value_pair[] pairs = new element_value_pair[annotationAttributes.size()];
- int i = 0;
-
- for (Entry e : annotationAttributes.entrySet()) {
- int elementNameString = addString(constantPool, e.getKey());
- element_value value = createAttributeValue(constantPool, e.getValue());
- pairs[i++] = new element_value_pair(elementNameString, value);
- }
-
- return pairs;
+ return Annotation.of(ClassDesc.ofDescriptor(annotationType),
+ createElementPairs(values));
}
- private element_value createAttributeValue(List constantPool, Object value) {
- Pair constantPoolEntry = addConstant(constantPool, value, true);
- if (constantPoolEntry != null) {
- return new Primitive_element_value(constantPoolEntry.fst, constantPoolEntry.snd);
- } else if (value instanceof EnumConstant) {
- EnumConstant ec = (EnumConstant) value;
- return new Enum_element_value(addString(constantPool, ec.type),
- addString(constantPool, ec.constant),
- 'e');
- } else if (value instanceof ClassConstant) {
- ClassConstant cc = (ClassConstant) value;
- return new Class_element_value(addString(constantPool, cc.type), 'c');
- } else if (value instanceof AnnotationDescription) {
- Annotation annotation = createAnnotation(constantPool, ((AnnotationDescription) value));
- return new Annotation_element_value(annotation, '@');
- } else if (value instanceof Collection) {
- @SuppressWarnings("unchecked")
- Collection array = (Collection) value;
- element_value[] values = new element_value[array.size()];
- int i = 0;
-
- for (Object elem : array) {
- values[i++] = createAttributeValue(constantPool, elem);
- }
-
- return new Array_element_value(values, '[');
- }
- throw new IllegalStateException(value.getClass().getName());
+ private List createElementPairs(Map annotationAttributes) {
+ return annotationAttributes.entrySet().stream()
+ .map(e -> AnnotationElement.of(e.getKey(), createAttributeValue(e.getValue())))
+ .collect(Collectors.toList());
}
- private static Pair addConstant(List constantPool, Object value, boolean annotation) {
- if (value instanceof Boolean) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Integer_info(((Boolean) value) ? 1 : 0)), 'Z');
- } else if (value instanceof Byte) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Integer_info((byte) value)), 'B');
- } else if (value instanceof Character) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Integer_info((char) value)), 'C');
- } else if (value instanceof Short) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Integer_info((short) value)), 'S');
- } else if (value instanceof Integer) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Integer_info((int) value)), 'I');
- } else if (value instanceof Long) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Long_info((long) value)), 'J');
- } else if (value instanceof Float) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Float_info((float) value)), 'F');
- } else if (value instanceof Double) {
- return Pair.of(addToCP(constantPool, new CONSTANT_Double_info((double) value)), 'D');
- } else if (value instanceof String) {
- int stringIndex = addString(constantPool, (String) value);
- if (annotation) {
- return Pair.of(stringIndex, 's');
- } else {
- return Pair.of(addToCP(constantPool, new CONSTANT_String_info(null, stringIndex)), 's');
- }
- }
-
- return null;
- }
-
- private static int addString(List constantPool, String string) {
- Assert.checkNonNull(string);
-
- int i = 0;
- for (CPInfo info : constantPool) {
- if (info instanceof CONSTANT_Utf8_info) {
- if (((CONSTANT_Utf8_info) info).value.equals(string)) {
- return i;
- }
- }
- i++;
- }
-
- return addToCP(constantPool, new CONSTANT_Utf8_info(string));
- }
-
- private static int addInt(List constantPool, int value) {
- int i = 0;
- for (CPInfo info : constantPool) {
- if (info instanceof CONSTANT_Integer_info) {
- if (((CONSTANT_Integer_info) info).value == value) {
- return i;
- }
- }
- i++;
- }
-
- return addToCP(constantPool, new CONSTANT_Integer_info(value));
- }
-
- private static int addModuleName(List constantPool, String moduleName) {
- int nameIdx = addString(constantPool, moduleName);
- int i = 0;
- for (CPInfo info : constantPool) {
- if (info instanceof CONSTANT_Module_info) {
- if (((CONSTANT_Module_info) info).name_index == nameIdx) {
- return i;
- }
- }
- i++;
- }
-
- return addToCP(constantPool, new CONSTANT_Module_info(null, nameIdx));
- }
-
- private static int addPackageName(List constantPool, String packageName) {
- int nameIdx = addString(constantPool, packageName);
- int i = 0;
- for (CPInfo info : constantPool) {
- if (info instanceof CONSTANT_Package_info) {
- if (((CONSTANT_Package_info) info).name_index == nameIdx) {
- return i;
- }
- }
- i++;
- }
-
- return addToCP(constantPool, new CONSTANT_Package_info(null, nameIdx));
- }
-
- private static int addClassName(List constantPool, String className) {
- int nameIdx = addString(constantPool, className);
- int i = 0;
- for (CPInfo info : constantPool) {
- if (info instanceof CONSTANT_Class_info) {
- if (((CONSTANT_Class_info) info).name_index == nameIdx) {
- return i;
- }
- }
- i++;
- }
-
- return addToCP(constantPool, new CONSTANT_Class_info(null, nameIdx));
- }
-
- private static int addToCP(List constantPool, CPInfo entry) {
- int result = constantPool.size();
-
- constantPool.add(entry);
-
- if (entry.size() > 1) {
- constantPool.add(null);
- }
-
- return result;
- }
-
- private static int addClass(List constantPool, String className) {
- int classNameIndex = addString(constantPool, className);
-
- int i = 0;
- for (CPInfo info : constantPool) {
- if (info instanceof CONSTANT_Class_info) {
- if (((CONSTANT_Class_info) info).name_index == classNameIndex) {
- return i;
- }
- }
- i++;
- }
-
- return addToCP(constantPool, new CONSTANT_Class_info(null, classNameIndex));
+ private AnnotationValue createAttributeValue(Object value) {
+ return switch (value) {
+ case Boolean v -> AnnotationValue.ofBoolean(v);
+ case Byte v -> AnnotationValue.ofByte(v);
+ case Character v -> AnnotationValue.ofChar(v);
+ case Short v -> AnnotationValue.ofShort(v);
+ case Integer v -> AnnotationValue.ofInt(v);
+ case Long v -> AnnotationValue.ofLong(v);
+ case Float v -> AnnotationValue.ofFloat(v);
+ case Double v -> AnnotationValue.ofDouble(v);
+ case String v -> AnnotationValue.ofString(v);
+ case EnumConstant v -> AnnotationValue.ofEnum(ClassDesc.ofDescriptor(v.type), v.constant);
+ case ClassConstant v -> AnnotationValue.ofClass(ClassDesc.ofDescriptor(v.type));
+ case AnnotationDescription v -> AnnotationValue.ofAnnotation(createAnnotation(v));
+ case Collection> v -> AnnotationValue.ofArray(v.stream().map(this::createAttributeValue).collect(Collectors.toList()));
+ default -> throw new IllegalArgumentException(value.getClass().getName());
+ };
}
//
//
@@ -1509,7 +1128,7 @@ private Iterable loadClassData(String path) {
classFileData.add(data.toByteArray());
}
} catch (IOException ex) {
- throw new IllegalStateException(ex);
+ throw new IllegalArgumentException(ex);
}
return classFileData;
@@ -1525,12 +1144,8 @@ private void loadVersionClasses(ClassList classes,
new HashMap<>();
for (byte[] classFileData : classData) {
- try (InputStream in = new ByteArrayInputStream(classFileData)) {
- inspectModuleInfoClassFile(in,
- currentVersionModules, version);
- } catch (IOException | ConstantPoolException ex) {
- throw new IllegalStateException(ex);
- }
+ inspectModuleInfoClassFile(classFileData,
+ currentVersionModules, version);
}
ExcludeIncludeList currentEIList;
@@ -1561,28 +1176,25 @@ private void loadVersionClasses(ClassList classes,
try (InputStream in = new ByteArrayInputStream(classFileData)) {
inspectClassFile(in, currentVersionClasses,
currentEIList, version,
- cf -> {
- PermittedSubclasses_attribute permitted = (PermittedSubclasses_attribute) cf.getAttribute(Attribute.PermittedSubclasses);
+ cm -> {
+ var permitted = cm.findAttribute(Attributes.permittedSubclasses()).orElse(null);
if (permitted != null) {
- try {
- String currentPack = cf.getName().substring(0, cf.getName().lastIndexOf('/'));
+ var name = cm.thisClass().asInternalName();
+ String currentPack = name.substring(0, name.lastIndexOf('/'));
- for (int i = 0; i < permitted.subtypes.length; i++) {
- String permittedClassName = cf.constant_pool.getClassInfo(permitted.subtypes[i]).getName();
- if (!currentEIList.accepts(permittedClassName, false)) {
- String permittedPack = permittedClassName.substring(0, permittedClassName.lastIndexOf('/'));
+ for (var sub : permitted.permittedSubclasses()) {
+ String permittedClassName = sub.asInternalName();
+ if (!currentEIList.accepts(permittedClassName, false)) {
+ String permittedPack = permittedClassName.substring(0, permittedClassName.lastIndexOf('/'));
- extraModulesPackagesToDerive.computeIfAbsent(permittedPack, x -> new HashSet<>())
- .add(currentPack);
- }
+ extraModulesPackagesToDerive.computeIfAbsent(permittedPack, x -> new HashSet<>())
+ .add(currentPack);
}
- } catch (ConstantPoolException ex) {
- throw new IllegalStateException(ex);
}
}
});
- } catch (IOException | ConstantPoolException ex) {
- throw new IllegalStateException(ex);
+ } catch (IOException ex) {
+ throw new IllegalArgumentException(ex);
}
}
@@ -1648,12 +1260,8 @@ private void loadVersionClassesFromDirectory(ClassList classes,
Path moduleInfo = p.resolve("module-info.class");
if (Files.isReadable(moduleInfo)) {
- ModuleDescription md;
-
- try (InputStream in = Files.newInputStream(moduleInfo)) {
- md = inspectModuleInfoClassFile(in,
+ ModuleDescription md = inspectModuleInfoClassFile(Files.readAllBytes(moduleInfo),
currentVersionModules, version);
- }
if (md == null) {
continue;
}
@@ -1715,8 +1323,8 @@ private void loadVersionClassesFromDirectory(ClassList classes,
}
}
}
- } catch (IOException | ConstantPoolException ex) {
- throw new IllegalStateException(ex);
+ } catch (IOException ex) {
+ throw new IllegalArgumentException(ex);
}
finishClassLoading(classes, modules, currentVersionModules, currentVersionClasses, currentEIList, version, baseline);
@@ -1724,7 +1332,7 @@ private void loadVersionClassesFromDirectory(ClassList classes,
private void loadFromDirectoryHandleClassFile(Path path, ClassList currentVersionClasses,
ExcludeIncludeList currentEIList, String version,
- List todo) throws IOException, ConstantPoolException {
+ List todo) throws IOException {
try (InputStream in = Files.newInputStream(path)) {
inspectClassFile(in, currentVersionClasses,
currentEIList, version,
@@ -2244,45 +1852,41 @@ private JavaFileManager setupJavac(String... options) {
public static String PROFILE_ANNOTATION = "Ljdk/Profile+Annotation;";
public static boolean ALLOW_NON_EXISTING_CLASSES = false;
- private void inspectClassFile(InputStream in, ClassList classes, ExcludeIncludeList excludesIncludes, String version) throws IOException, ConstantPoolException {
+ private void inspectClassFile(InputStream in, ClassList classes, ExcludeIncludeList excludesIncludes, String version) throws IOException {
inspectClassFile(in, classes, excludesIncludes, version, cf -> {});
}
private void inspectClassFile(InputStream in, ClassList classes, ExcludeIncludeList excludesIncludes, String version,
- Consumer extraTask) throws IOException, ConstantPoolException {
- ClassFile cf = ClassFile.read(in);
+ Consumer extraTask) throws IOException {
+ ClassModel cm = ClassFile.of().parse(in.readAllBytes());
- if (cf.access_flags.is(AccessFlags.ACC_MODULE)) {
+ if (cm.isModuleInfo()) {
return ;
}
- if (!excludesIncludes.accepts(cf.getName(), true)) {
+ if (!excludesIncludes.accepts(cm.thisClass().asInternalName(), true)) {
return ;
}
- extraTask.accept(cf);
+ extraTask.accept(cm);
ClassHeaderDescription headerDesc = new ClassHeaderDescription();
- headerDesc.flags = cf.access_flags.flags;
+ headerDesc.flags = cm.flags().flagsMask();
- if (cf.super_class != 0) {
- headerDesc.extendsAttr = cf.getSuperclassName();
- }
- List interfaces = new ArrayList<>();
- for (int i = 0; i < cf.interfaces.length; i++) {
- interfaces.add(cf.getInterfaceName(i));
+ if (cm.superclass().isPresent()) {
+ headerDesc.extendsAttr = cm.superclass().get().asInternalName();
}
- headerDesc.implementsAttr = interfaces;
- for (Attribute attr : cf.attributes) {
- if (!readAttribute(cf, headerDesc, attr))
+ headerDesc.implementsAttr = cm.interfaces().stream().map(ClassEntry::asInternalName).collect(Collectors.toList());
+ for (var attr : cm.attributes()) {
+ if (!readAttribute(headerDesc, attr))
return ;
}
ClassDescription clazzDesc = null;
for (ClassDescription cd : classes) {
- if (cd.name.equals(cf.getName())) {
+ if (cd.name.equals(cm.thisClass().asInternalName())) {
clazzDesc = cd;
break;
}
@@ -2290,54 +1894,54 @@ private void inspectClassFile(InputStream in, ClassList classes, ExcludeIncludeL
if (clazzDesc == null) {
clazzDesc = new ClassDescription();
- clazzDesc.name = cf.getName();
+ clazzDesc.name = cm.thisClass().asInternalName();
classes.add(clazzDesc);
}
addClassHeader(clazzDesc, headerDesc, version, null);
- for (Method m : cf.methods) {
- if (!include(m.access_flags.flags))
+ for (var m : cm.methods()) {
+ if (!include(m.flags().flagsMask()))
continue;
MethodDescription methDesc = new MethodDescription();
- methDesc.flags = m.access_flags.flags;
- methDesc.name = m.getName(cf.constant_pool);
- methDesc.descriptor = m.descriptor.getValue(cf.constant_pool);
- for (Attribute attr : m.attributes) {
- readAttribute(cf, methDesc, attr);
+ methDesc.flags = m.flags().flagsMask();
+ methDesc.name = m.methodName().stringValue();
+ methDesc.descriptor = m.methodType().stringValue();
+ for (var attr : m.attributes()) {
+ readAttribute(methDesc, attr);
}
addMethod(clazzDesc, methDesc, version, null);
}
- for (Field f : cf.fields) {
- if (!include(f.access_flags.flags))
+ for (var f : cm.fields()) {
+ if (!include(f.flags().flagsMask()))
continue;
FieldDescription fieldDesc = new FieldDescription();
- fieldDesc.flags = f.access_flags.flags;
- fieldDesc.name = f.getName(cf.constant_pool);
- fieldDesc.descriptor = f.descriptor.getValue(cf.constant_pool);
- for (Attribute attr : f.attributes) {
- readAttribute(cf, fieldDesc, attr);
+ fieldDesc.flags = f.flags().flagsMask();
+ fieldDesc.name = f.fieldName().stringValue();
+ fieldDesc.descriptor = f.fieldType().stringValue();
+ for (var attr : f.attributes()) {
+ readAttribute(fieldDesc, attr);
}
addField(clazzDesc, fieldDesc, version, null);
}
}
- private ModuleDescription inspectModuleInfoClassFile(InputStream in,
+ private ModuleDescription inspectModuleInfoClassFile(byte[] data,
Map modules,
- String version) throws IOException, ConstantPoolException {
- ClassFile cf = ClassFile.read(in);
+ String version) {
+ ClassModel cm = ClassFile.of().parse(data);
- if (!cf.access_flags.is(AccessFlags.ACC_MODULE)) {
+ if (!cm.flags().has(AccessFlag.MODULE)) {
return null;
}
ModuleHeaderDescription headerDesc = new ModuleHeaderDescription();
headerDesc.versions = version;
- headerDesc.flags = cf.access_flags.flags;
+ headerDesc.flags = cm.flags().flagsMask();
- for (Attribute attr : cf.attributes) {
- if (!readAttribute(cf, headerDesc, attr))
+ for (var attr : cm.attributes()) {
+ if (!readAttribute(headerDesc, attr))
return null;
}
@@ -2361,56 +1965,46 @@ private Set enhancedIncludesListBasedOnClassHeaders(ClassList classes,
Set additionalIncludes = new HashSet<>();
for (byte[] classFileData : classData) {
- try (InputStream in = new ByteArrayInputStream(classFileData)) {
- ClassFile cf = ClassFile.read(in);
-
- additionalIncludes.addAll(otherRelevantTypesWithOwners(cf));
- } catch (IOException | ConstantPoolException ex) {
- throw new IllegalStateException(ex);
- }
+ additionalIncludes.addAll(otherRelevantTypesWithOwners(ClassFile.of().parse(classFileData)));
}
return additionalIncludes;
}
- private Set otherRelevantTypesWithOwners(ClassFile cf) {
+ private Set otherRelevantTypesWithOwners(ClassModel cm) {
Set supertypes = new HashSet<>();
- try {
- if (cf.access_flags.is(AccessFlags.ACC_MODULE)) {
- return supertypes;
- }
+ if (cm.flags().has(AccessFlag.MODULE)) {
+ return supertypes;
+ }
- Set additionalClasses = new HashSet<>();
+ Set additionalClasses = new HashSet<>();
- if (cf.super_class != 0) {
- additionalClasses.add(cf.getSuperclassName());
- }
- for (int i = 0; i < cf.interfaces.length; i++) {
- additionalClasses.add(cf.getInterfaceName(i));
- }
- PermittedSubclasses_attribute permitted = (PermittedSubclasses_attribute) cf.getAttribute(Attribute.PermittedSubclasses);
- if (permitted != null) {
- for (int i = 0; i < permitted.subtypes.length; i++) {
- additionalClasses.add(cf.constant_pool.getClassInfo(permitted.subtypes[i]).getName());
- }
+ if (cm.superclass().isPresent()) {
+ additionalClasses.add(cm.superclass().get().asInternalName());
+ }
+ for (var iface : cm.interfaces()) {
+ additionalClasses.add(iface.asInternalName());
+ }
+ var permitted = cm.findAttribute(Attributes.permittedSubclasses()).orElse(null);
+ if (permitted != null) {
+ for (var sub : permitted.permittedSubclasses()) {
+ additionalClasses.add(sub.asInternalName());
}
+ }
- for (String additional : additionalClasses) {
- int dollar;
+ for (String additional : additionalClasses) {
+ int dollar;
- supertypes.add(additional);
+ supertypes.add(additional);
- while ((dollar = additional.lastIndexOf('$')) != (-1)) {
- additional = additional.substring(0, dollar);
- supertypes.add(additional);
- }
+ while ((dollar = additional.lastIndexOf('$')) != (-1)) {
+ additional = additional.substring(0, dollar);
+ supertypes.add(additional);
}
-
- return supertypes;
- } catch (ConstantPoolException ex) {
- throw new IllegalStateException(ex);
}
+
+ return supertypes;
}
private void addModuleHeader(ModuleDescription moduleDesc,
@@ -2435,7 +2029,7 @@ private void addModuleHeader(ModuleDescription moduleDesc,
}
private boolean include(int accessFlags) {
- return (accessFlags & (AccessFlags.ACC_PUBLIC | AccessFlags.ACC_PROTECTED)) != 0;
+ return (accessFlags & (ACC_PUBLIC | ACC_PROTECTED)) != 0;
}
private void addClassHeader(ClassDescription clazzDesc, ClassHeaderDescription headerDesc, String version, String baseline) {
@@ -2531,367 +2125,135 @@ private void addField(ClassDescription clazzDesc, FieldDescription fieldDesc, St
}
}
- private boolean readAttribute(ClassFile cf, FeatureDescription feature, Attribute attr) throws ConstantPoolException {
- String attrName = attr.getName(cf.constant_pool);
- switch (attrName) {
- case Attribute.AnnotationDefault:
- assert feature instanceof MethodDescription;
- element_value defaultValue = ((AnnotationDefault_attribute) attr).default_value;
- ((MethodDescription) feature).annotationDefaultValue =
- convertElementValue(cf.constant_pool, defaultValue);
- break;
- case "Deprecated":
- feature.deprecated = true;
- break;
- case "Exceptions":
- assert feature instanceof MethodDescription;
- List thrownTypes = new ArrayList<>();
- Exceptions_attribute exceptionAttr = (Exceptions_attribute) attr;
- for (int i = 0; i < exceptionAttr.exception_index_table.length; i++) {
- thrownTypes.add(exceptionAttr.getException(i, cf.constant_pool));
- }
- ((MethodDescription) feature).thrownTypes = thrownTypes;
- break;
- case Attribute.InnerClasses:
+ private boolean readAttribute(FeatureDescription feature, Attribute> attr) {
+ switch (attr) {
+ case AnnotationDefaultAttribute a ->
+ ((MethodDescription) feature).annotationDefaultValue = convertElementValue(a.defaultValue());
+ case DeprecatedAttribute _ -> feature.deprecated = true;
+ case ExceptionsAttribute a -> ((MethodDescription) feature).thrownTypes = a.exceptions().stream().map(ClassEntry::asInternalName).collect(Collectors.toList());
+ case InnerClassesAttribute a -> {
if (feature instanceof ModuleHeaderDescription)
break; //XXX
- assert feature instanceof ClassHeaderDescription;
- List innerClasses = new ArrayList<>();
- InnerClasses_attribute innerClassesAttr = (InnerClasses_attribute) attr;
- for (int i = 0; i < innerClassesAttr.number_of_classes; i++) {
- CONSTANT_Class_info outerClassInfo =
- innerClassesAttr.classes[i].getOuterClassInfo(cf.constant_pool);
- InnerClassInfo info = new InnerClassInfo();
- CONSTANT_Class_info innerClassInfo =
- innerClassesAttr.classes[i].getInnerClassInfo(cf.constant_pool);
- info.innerClass = innerClassInfo != null ? innerClassInfo.getName() : null;
- info.outerClass = outerClassInfo != null ? outerClassInfo.getName() : null;
- info.innerClassName = innerClassesAttr.classes[i].getInnerName(cf.constant_pool);
- info.innerClassFlags = innerClassesAttr.classes[i].inner_class_access_flags.flags;
- innerClasses.add(info);
- }
- ((ClassHeaderDescription) feature).innerClasses = innerClasses;
- break;
- case "RuntimeInvisibleAnnotations":
- feature.classAnnotations = annotations2Description(cf.constant_pool, attr);
- break;
- case "RuntimeVisibleAnnotations":
- feature.runtimeAnnotations = annotations2Description(cf.constant_pool, attr);
- break;
- case "Signature":
- feature.signature = ((Signature_attribute) attr).getSignature(cf.constant_pool);
- break;
- case "ConstantValue":
- assert feature instanceof FieldDescription;
- Object value = convertConstantValue(cf.constant_pool.get(((ConstantValue_attribute) attr).constantvalue_index), ((FieldDescription) feature).descriptor);
- if (((FieldDescription) feature).descriptor.equals("C")) {
- value = (char) (int) value;
- }
- ((FieldDescription) feature).constantValue = value;
- break;
- case "SourceFile":
- //ignore, not needed
- break;
- case "BootstrapMethods":
- //ignore, not needed
- break;
- case "Code":
- //ignore, not needed
- break;
- case "EnclosingMethod":
+ ((ClassHeaderDescription) feature).innerClasses = a.classes().stream().map(cfi -> {
+ var info = new InnerClassInfo();
+ info.innerClass = cfi.innerClass().asInternalName();
+ info.outerClass = cfi.outerClass().map(ClassEntry::asInternalName).orElse(null);
+ info.innerClassName = cfi.innerName().map(Utf8Entry::stringValue).orElse(null);
+ info.innerClassFlags = cfi.flagsMask();
+ return info;
+ }).collect(Collectors.toList());
+ }
+ case RuntimeInvisibleAnnotationsAttribute a -> feature.classAnnotations = annotations2Description(a.annotations());
+ case RuntimeVisibleAnnotationsAttribute a -> feature.runtimeAnnotations = annotations2Description(a.annotations());
+ case SignatureAttribute a -> feature.signature = a.signature().stringValue();
+ case ConstantValueAttribute a -> {
+ var f = (FieldDescription) feature;
+ f.constantValue = convertConstantValue(a.constant(), f.descriptor);
+ }
+ case SourceFileAttribute _, BootstrapMethodsAttribute _, CodeAttribute _, SyntheticAttribute _ -> {}
+ case EnclosingMethodAttribute _ -> {
return false;
- case "Synthetic":
- break;
- case "RuntimeVisibleParameterAnnotations":
- assert feature instanceof MethodDescription;
- ((MethodDescription) feature).runtimeParameterAnnotations =
- parameterAnnotations2Description(cf.constant_pool, attr);
- break;
- case "RuntimeInvisibleParameterAnnotations":
- assert feature instanceof MethodDescription;
- ((MethodDescription) feature).classParameterAnnotations =
- parameterAnnotations2Description(cf.constant_pool, attr);
- break;
- case Attribute.Module: {
- assert feature instanceof ModuleHeaderDescription;
- ModuleHeaderDescription header =
- (ModuleHeaderDescription) feature;
- Module_attribute mod = (Module_attribute) attr;
-
- header.name = cf.constant_pool
- .getModuleInfo(mod.module_name)
- .getName();
-
- header.exports =
- Arrays.stream(mod.exports)
- .map(ee -> ExportsDescription.create(cf, ee))
- .collect(Collectors.toList());
+ }
+ case RuntimeVisibleParameterAnnotationsAttribute a -> ((MethodDescription) feature).runtimeParameterAnnotations = parameterAnnotations2Description(a.parameterAnnotations());
+ case RuntimeInvisibleParameterAnnotationsAttribute a -> ((MethodDescription) feature).classParameterAnnotations = parameterAnnotations2Description(a.parameterAnnotations());
+ case ModuleAttribute a -> {
+ ModuleHeaderDescription header = (ModuleHeaderDescription) feature;
+ header.name = a.moduleName().name().stringValue();
+ header.exports = a.exports().stream().map(ExportsDescription::create).collect(Collectors.toList());
if (header.extraModulePackages != null) {
header.exports.forEach(ed -> header.extraModulePackages.remove(ed.packageName()));
}
- header.requires =
- Arrays.stream(mod.requires)
- .map(r -> RequiresDescription.create(cf, r))
- .collect(Collectors.toList());
- header.uses = Arrays.stream(mod.uses_index)
- .mapToObj(use -> getClassName(cf, use))
- .collect(Collectors.toList());
- header.provides =
- Arrays.stream(mod.provides)
- .map(p -> ProvidesDescription.create(cf, p))
- .collect(Collectors.toList());
- break;
- }
- case Attribute.ModuleTarget: {
- assert feature instanceof ModuleHeaderDescription;
- ModuleHeaderDescription header =
- (ModuleHeaderDescription) feature;
- ModuleTarget_attribute mod = (ModuleTarget_attribute) attr;
- if (mod.target_platform_index != 0) {
- header.moduleTarget =
- cf.constant_pool
- .getUTF8Value(mod.target_platform_index);
- }
- break;
- }
- case Attribute.ModuleResolution: {
- assert feature instanceof ModuleHeaderDescription;
- ModuleHeaderDescription header =
- (ModuleHeaderDescription) feature;
- ModuleResolution_attribute mod =
- (ModuleResolution_attribute) attr;
- header.moduleResolution = mod.resolution_flags;
- break;
- }
- case Attribute.ModulePackages:
- assert feature instanceof ModuleHeaderDescription;
- ModuleHeaderDescription header =
- (ModuleHeaderDescription) feature;
- ModulePackages_attribute mod =
- (ModulePackages_attribute) attr;
- header.extraModulePackages = new ArrayList<>();
- for (int i = 0; i < mod.packages_count; i++) {
- String packageName = getPackageName(cf, mod.packages_index[i]);
+ header.requires = a.requires().stream().map(RequiresDescription::create).collect(Collectors.toList());
+ header.uses = a.uses().stream().map(ClassEntry::asInternalName).collect(Collectors.toList());
+ header.provides = a.provides().stream().map(ProvidesDescription::create).collect(Collectors.toList());
+ }
+ case ModuleTargetAttribute a -> ((ModuleHeaderDescription) feature).moduleTarget = a.targetPlatform().stringValue();
+ case ModuleResolutionAttribute a -> ((ModuleHeaderDescription) feature).moduleResolution = a.resolutionFlags();
+ case ModulePackagesAttribute a -> {
+ var header = (ModuleHeaderDescription) feature;
+ header.extraModulePackages = a.packages().stream().mapMulti((packageItem, sink) -> {
+ var packageName = packageItem.name().stringValue();
if (header.exports == null ||
- header.exports.stream().noneMatch(ed -> ed.packageName().equals(packageName))) {
- header.extraModulePackages.add(packageName);
+ header.exports.stream().noneMatch(ed -> ed.packageName().equals(packageName))) {
+ sink.accept(packageName);
}
- }
- break;
- case Attribute.ModuleHashes:
- break;
- case Attribute.NestHost: {
- assert feature instanceof ClassHeaderDescription;
- NestHost_attribute nestHost = (NestHost_attribute) attr;
- ClassHeaderDescription chd = (ClassHeaderDescription) feature;
- chd.nestHost = nestHost.getNestTop(cf.constant_pool).getName();
- break;
- }
- case Attribute.NestMembers: {
- assert feature instanceof ClassHeaderDescription;
- NestMembers_attribute nestMembers = (NestMembers_attribute) attr;
- ClassHeaderDescription chd = (ClassHeaderDescription) feature;
- chd.nestMembers = Arrays.stream(nestMembers.members_indexes)
- .mapToObj(i -> getClassName(cf, i))
- .collect(Collectors.toList());
- break;
+ }).collect(Collectors.toList());
}
- case Attribute.Record: {
- assert feature instanceof ClassHeaderDescription;
- Record_attribute record = (Record_attribute) attr;
- List components = new ArrayList<>();
- for (ComponentInfo info : record.component_info_arr) {
- RecordComponentDescription rcd = new RecordComponentDescription();
- rcd.name = info.getName(cf.constant_pool);
- rcd.descriptor = info.descriptor.getValue(cf.constant_pool);
- for (Attribute nestedAttr : info.attributes) {
- readAttribute(cf, rcd, nestedAttr);
- }
- components.add(rcd);
- }
- ClassHeaderDescription chd = (ClassHeaderDescription) feature;
+ case ModuleHashesAttribute _ -> {}
+ case NestHostAttribute a -> ((ClassHeaderDescription) feature).nestHost = a.nestHost().asInternalName();
+ case NestMembersAttribute a -> ((ClassHeaderDescription) feature).nestMembers = a.nestMembers().stream().map(ClassEntry::asInternalName).collect(Collectors.toList());
+ case RecordAttribute a -> {
+ var chd = (ClassHeaderDescription) feature;
chd.isRecord = true;
- chd.recordComponents = components;
- break;
- }
- case Attribute.MethodParameters: {
- assert feature instanceof MethodDescription;
- MethodParameters_attribute params = (MethodParameters_attribute) attr;
- MethodDescription method = (MethodDescription) feature;
- method.methodParameters = new ArrayList<>();
- for (MethodParameters_attribute.Entry e : params.method_parameter_table) {
- String name = e.name_index == 0 ? null
- : cf.constant_pool.getUTF8Value(e.name_index);
- MethodDescription.MethodParam param =
- new MethodDescription.MethodParam(e.flags, name);
- method.methodParameters.add(param);
- }
- break;
- }
- case Attribute.PermittedSubclasses: {
- assert feature instanceof ClassHeaderDescription;
- PermittedSubclasses_attribute permittedSubclasses = (PermittedSubclasses_attribute) attr;
- ClassHeaderDescription chd = (ClassHeaderDescription) feature;
- chd.permittedSubclasses = Arrays.stream(permittedSubclasses.subtypes)
- .mapToObj(i -> getClassName(cf, i))
- .collect(Collectors.toList());
+ chd.recordComponents = a.components().stream().map(rci -> {
+ var rcd = new RecordComponentDescription();
+ rcd.name = rci.name().stringValue();
+ rcd.descriptor = rci.descriptor().stringValue();
+ rci.attributes().forEach(child -> readAttribute(rcd, child));
+ return rcd;
+ }).collect(Collectors.toList());
+ }
+ case MethodParametersAttribute a -> ((MethodDescription) feature).methodParameters = a.parameters().stream()
+ .map(mpi -> new MethodDescription.MethodParam(mpi.flagsMask(), mpi.name().map(Utf8Entry::stringValue).orElse(null)))
+ .collect(Collectors.toList());
+ case PermittedSubclassesAttribute a -> {
+ var chd = (ClassHeaderDescription) feature;
chd.isSealed = true;
- break;
+ chd.permittedSubclasses = a.permittedSubclasses().stream().map(ClassEntry::asInternalName).collect(Collectors.toList());
}
- case Attribute.ModuleMainClass: {
- ModuleMainClass_attribute moduleMainClass = (ModuleMainClass_attribute) attr;
- assert feature instanceof ModuleHeaderDescription;
- ModuleHeaderDescription mhd = (ModuleHeaderDescription) feature;
- mhd.moduleMainClass = moduleMainClass.getMainClassName(cf.constant_pool);
- break;
- }
- default:
- throw new IllegalStateException("Unhandled attribute: " +
- attrName);
+ case ModuleMainClassAttribute a -> ((ModuleHeaderDescription) feature).moduleMainClass = a.mainClass().asInternalName();
+ default -> throw new IllegalArgumentException("Unhandled attribute: " + attr.attributeName()); // Do nothing
}
return true;
}
- private static String getClassName(ClassFile cf, int idx) {
- try {
- return cf.constant_pool.getClassInfo(idx).getName();
- } catch (InvalidIndex ex) {
- throw new IllegalStateException(ex);
- } catch (ConstantPool.UnexpectedEntry ex) {
- throw new IllegalStateException(ex);
- } catch (ConstantPoolException ex) {
- throw new IllegalStateException(ex);
- }
- }
-
- private static String getPackageName(ClassFile cf, int idx) {
- try {
- return cf.constant_pool.getPackageInfo(idx).getName();
- } catch (InvalidIndex ex) {
- throw new IllegalStateException(ex);
- } catch (ConstantPool.UnexpectedEntry ex) {
- throw new IllegalStateException(ex);
- } catch (ConstantPoolException ex) {
- throw new IllegalStateException(ex);
- }
- }
-
- private static String getModuleName(ClassFile cf, int idx) {
- try {
- return cf.constant_pool.getModuleInfo(idx).getName();
- } catch (InvalidIndex ex) {
- throw new IllegalStateException(ex);
- } catch (ConstantPool.UnexpectedEntry ex) {
- throw new IllegalStateException(ex);
- } catch (ConstantPoolException ex) {
- throw new IllegalStateException(ex);
- }
- }
-
public static String INJECTED_VERSION = null;
- private static String getVersion(ClassFile cf, int idx) {
+ private static String getVersion(Optional version) {
if (INJECTED_VERSION != null) {
return INJECTED_VERSION;
}
- if (idx == 0)
- return null;
- try {
- return ((CONSTANT_Utf8_info) cf.constant_pool.get(idx)).value;
- } catch (InvalidIndex ex) {
- throw new IllegalStateException(ex);
- }
+ return version.map(Utf8Entry::stringValue).orElse(null);
}
- Object convertConstantValue(CPInfo info, String descriptor) throws ConstantPoolException {
- if (info instanceof CONSTANT_Integer_info) {
- if ("Z".equals(descriptor))
- return ((CONSTANT_Integer_info) info).value == 1;
- else
- return ((CONSTANT_Integer_info) info).value;
- } else if (info instanceof CONSTANT_Long_info) {
- return ((CONSTANT_Long_info) info).value;
- } else if (info instanceof CONSTANT_Float_info) {
- return ((CONSTANT_Float_info) info).value;
- } else if (info instanceof CONSTANT_Double_info) {
- return ((CONSTANT_Double_info) info).value;
- } else if (info instanceof CONSTANT_String_info) {
- return ((CONSTANT_String_info) info).getString();
- }
- throw new IllegalStateException(info.getClass().getName());
+ Object convertConstantValue(ConstantValueEntry info, String descriptor) {
+ if (descriptor.length() == 1 && info instanceof IntegerEntry ie) {
+ var i = ie.intValue();
+ return switch (descriptor.charAt(0)) {
+ case 'I', 'B', 'S' -> i;
+ case 'C' -> (char) i;
+ case 'Z' -> i == 1;
+ default -> throw new IllegalArgumentException(descriptor);
+ };
+ }
+ return info.constantValue();
}
- Object convertElementValue(ConstantPool cp, element_value val) throws InvalidIndex, ConstantPoolException {
- switch (val.tag) {
- case 'Z':
- return ((CONSTANT_Integer_info) cp.get(((Primitive_element_value) val).const_value_index)).value != 0;
- case 'B':
- return (byte) ((CONSTANT_Integer_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
- case 'C':
- return (char) ((CONSTANT_Integer_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
- case 'S':
- return (short) ((CONSTANT_Integer_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
- case 'I':
- return ((CONSTANT_Integer_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
- case 'J':
- return ((CONSTANT_Long_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
- case 'F':
- return ((CONSTANT_Float_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
- case 'D':
- return ((CONSTANT_Double_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
- case 's':
- return ((CONSTANT_Utf8_info) cp.get(((Primitive_element_value) val).const_value_index)).value;
-
- case 'e':
- return new EnumConstant(cp.getUTF8Value(((Enum_element_value) val).type_name_index),
- cp.getUTF8Value(((Enum_element_value) val).const_name_index));
- case 'c':
- return new ClassConstant(cp.getUTF8Value(((Class_element_value) val).class_info_index));
-
- case '@':
- return annotation2Description(cp, ((Annotation_element_value) val).annotation_value);
-
- case '[':
- List values = new ArrayList<>();
- for (element_value elem : ((Array_element_value) val).values) {
- values.add(convertElementValue(cp, elem));
- }
- return values;
- default:
- throw new IllegalStateException("Currently unhandled tag: " + val.tag);
- }
+ Object convertElementValue(AnnotationValue val) {
+ return switch (val) {
+ case AnnotationValue.OfConstant oc -> oc.resolvedValue();
+ case AnnotationValue.OfEnum oe -> new EnumConstant(oe.className().stringValue(), oe.constantName().stringValue());
+ case AnnotationValue.OfClass oc -> new ClassConstant(oc.className().stringValue());
+ case AnnotationValue.OfArray oa -> oa.values().stream().map(this::convertElementValue).collect(Collectors.toList());
+ case AnnotationValue.OfAnnotation oa -> annotation2Description(oa.annotation());
+ };
}
- private List annotations2Description(ConstantPool cp, Attribute attr) throws ConstantPoolException {
- RuntimeAnnotations_attribute annotationsAttr = (RuntimeAnnotations_attribute) attr;
- List descs = new ArrayList<>();
- for (Annotation a : annotationsAttr.annotations) {
- descs.add(annotation2Description(cp, a));
- }
- return descs;
+ private List annotations2Description(List annos) {
+ return annos.stream().map(this::annotation2Description).collect(Collectors.toList());
}
- private List> parameterAnnotations2Description(ConstantPool cp, Attribute attr) throws ConstantPoolException {
- RuntimeParameterAnnotations_attribute annotationsAttr =
- (RuntimeParameterAnnotations_attribute) attr;
- List> descs = new ArrayList<>();
- for (Annotation[] attrAnnos : annotationsAttr.parameter_annotations) {
- List paramDescs = new ArrayList<>();
- for (Annotation ann : attrAnnos) {
- paramDescs.add(annotation2Description(cp, ann));
- }
- descs.add(paramDescs);
- }
- return descs;
+ private List> parameterAnnotations2Description(List> annos) {
+ return annos.stream().map(this::annotations2Description).collect(Collectors.toList());
}
- private AnnotationDescription annotation2Description(ConstantPool cp, Annotation a) throws ConstantPoolException {
- String annotationType = cp.getUTF8Value(a.type_index);
+ private AnnotationDescription annotation2Description(java.lang.classfile.Annotation a) {
+ String annotationType = a.className().stringValue();
Map values = new HashMap<>();
- for (element_value_pair e : a.element_value_pairs) {
- values.put(cp.getUTF8Value(e.element_name_index), convertElementValue(cp, e.value));
+ for (var e : a.elements()) {
+ values.put(e.name().stringValue(), convertElementValue(e.value()));
}
return new AnnotationDescription(annotationType, values);
@@ -3181,7 +2543,7 @@ public void read(LineBasedReader reader, String baselineVersion,
case "-module":
break OUTER;
default:
- throw new IllegalStateException(reader.lineKey);
+ throw new IllegalArgumentException(reader.lineKey);
}
}
}
@@ -3396,15 +2758,11 @@ public static ExportsDescription deserialize(String data) {
return new ExportsDescription(packageName, to);
}
- public static ExportsDescription create(ClassFile cf,
- ExportsEntry ee) {
- String packageName = getPackageName(cf, ee.exports_index);
+ public static ExportsDescription create(ModuleExportInfo ee) {
+ String packageName = ee.exportedPackage().name().stringValue();
List to = null;
- if (ee.exports_to_count > 0) {
- to = new ArrayList<>();
- for (int moduleIndex : ee.exports_to_index) {
- to.add(getModuleName(cf, moduleIndex));
- }
+ if (!ee.exportsTo().isEmpty()) {
+ to = ee.exportsTo().stream().map(m -> m.name().stringValue()).collect(Collectors.toList());
}
return new ExportsDescription(packageName, to);
}
@@ -3447,12 +2805,11 @@ public static RequiresDescription deserialize(String data) {
ver);
}
- public static RequiresDescription create(ClassFile cf,
- RequiresEntry req) {
- String mod = getModuleName(cf, req.requires_index);
- String ver = getVersion(cf, req.requires_version_index);
+ public static RequiresDescription create(ModuleRequireInfo req) {
+ String mod = req.requires().name().stringValue();
+ String ver = getVersion(req.requiresVersion());
return new RequiresDescription(mod,
- req.requires_flags,
+ req.requiresFlagsMask(),
ver);
}
@@ -3515,13 +2872,9 @@ public static ProvidesDescription deserialize(String data) {
implsList);
}
- public static ProvidesDescription create(ClassFile cf,
- ProvidesEntry prov) {
- String api = getClassName(cf, prov.provides_index);
- List impls =
- Arrays.stream(prov.with_index)
- .mapToObj(wi -> getClassName(cf, wi))
- .collect(Collectors.toList());
+ public static ProvidesDescription create(ModuleProvideInfo prov) {
+ String api = prov.provides().asInternalName();
+ List impls = prov.providesWith().stream().map(ClassEntry::asInternalName).collect(Collectors.toList());
return new ProvidesDescription(api, impls);
}
@@ -3676,7 +3029,7 @@ public void read(LineBasedReader reader, String baselineVersion,
case "-module":
break OUTER;
default:
- throw new IllegalStateException(reader.lineKey);
+ throw new IllegalArgumentException(reader.lineKey);
}
}
}
@@ -4073,7 +3426,7 @@ public MethodParam(int flags, String name) {
static class FieldDescription extends FeatureDescription {
String name;
String descriptor;
- Object constantValue;
+ Object constantValue; // Uses (unsigned) Integer for byte/short
String keyName = "field";
@Override
@@ -4149,7 +3502,7 @@ public boolean read(LineBasedReader reader) throws IOException {
case "D": constantValue = Double.parseDouble(inConstantValue); break;
case "Ljava/lang/String;": constantValue = inConstantValue; break;
default:
- throw new IllegalStateException("Unrecognized field type: " + descriptor);
+ throw new IllegalArgumentException("Unrecognized field type: " + descriptor);
}
}
@@ -4416,7 +3769,7 @@ public ClassDescription find(String name, boolean allowNull) {
if (desc != null || allowNull)
return desc;
- throw new IllegalStateException("Cannot find: " + name);
+ throw new IllegalArgumentException("Cannot find: " + name);
}
private static final ClassDescription NONE = new ClassDescription();
@@ -4565,7 +3918,7 @@ private static Object parseAnnotationValue(String value, int[] valuePointer) {
valuePointer[0] += 5;
return false;
} else {
- throw new IllegalStateException("Unrecognized boolean structure: " + value);
+ throw new IllegalArgumentException("Unrecognized boolean structure: " + value);
}
case 'B': return Byte.parseByte(readDigits(value, valuePointer));
case 'C': return value.charAt(valuePointer[0]++);
@@ -4593,7 +3946,7 @@ private static Object parseAnnotationValue(String value, int[] valuePointer) {
case '@':
return parseAnnotation(value, valuePointer);
default:
- throw new IllegalStateException("Unrecognized signature type: " + value.charAt(valuePointer[0] - 1) + "; value=" + value);
+ throw new IllegalArgumentException("Unrecognized signature type: " + value.charAt(valuePointer[0] - 1) + "; value=" + value);
}
}
diff --git a/make/modules/java.base/Copy.gmk b/make/modules/java.base/Copy.gmk
index e33676529cdf3..4625c1f7dbca1 100644
--- a/make/modules/java.base/Copy.gmk
+++ b/make/modules/java.base/Copy.gmk
@@ -99,7 +99,7 @@ JVMCFG := $(LIB_DST_DIR)/jvm.cfg
define print-cfg-line
$(call LogInfo, Adding -$1 $2 to jvm.cfg)
- $(PRINTF) -- "-$1 $2\n" >> $@ $(NEWLINE)
+ $(ECHO) "-$1 $2" >> $@ $(NEWLINE)
endef
$(JVMCFG): $(call DependOnVariable, ORDERED_CFG_VARIANTS)
diff --git a/make/modules/java.base/Gensrc.gmk b/make/modules/java.base/Gensrc.gmk
index c974db7b6c682..3a482388bec14 100644
--- a/make/modules/java.base/Gensrc.gmk
+++ b/make/modules/java.base/Gensrc.gmk
@@ -80,16 +80,17 @@ $(eval $(call SetupCompileProperties, SUN_UTIL, \
CLASS := sun.util.resources.LocaleNamesBundle, \
))
-TARGETS += $(LIST_RESOURCE_BUNDLE) $(SUN_UTIL)
+$(eval $(call SetupCompileProperties, SECURITY_RESOURCES, \
+ SRC_DIRS := $(MODULE_SRC)/share/classes/sun/security/util/resources, \
+ CLASS := ListResourceBundle, \
+))
-# Some resources bundles are already present as java files but still need to be
-# copied to zh_HK locale.
-$(eval $(call SetupCopy-zh_HK,COPY_ZH_HK, \
- $(addprefix $(TOPDIR)/src/java.base/share/classes/, \
- sun/security/util/AuthResources_zh_TW.java \
- sun/security/util/Resources_zh_TW.java)))
+$(eval $(call SetupCompileProperties, KEYTOOL_RESOURCES, \
+ SRC_DIRS := $(MODULE_SRC)/share/classes/sun/security/tools/keytool/resources, \
+ CLASS := ListResourceBundle, \
+))
-TARGETS += $(COPY_ZH_HK)
+TARGETS += $(LIST_RESOURCE_BUNDLE) $(SUN_UTIL) $(SECURITY_RESOURCES) $(KEYTOOL_RESOURCES)
################################################################################
diff --git a/make/modules/java.base/Java.gmk b/make/modules/java.base/Java.gmk
index 84344f93409a8..fc09137745662 100644
--- a/make/modules/java.base/Java.gmk
+++ b/make/modules/java.base/Java.gmk
@@ -41,11 +41,6 @@ CLEAN += intrinsic.properties
EXCLUDE_FILES += \
$(TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java
-EXCLUDES += java/lang/doc-files \
- java/lang/classfile/snippet-files \
- java/lang/classfile/components/snippet-files \
- java/lang/foreign/snippet-files
-
# Exclude BreakIterator classes that are just used in compile process to generate
# data files and shouldn't go in the product
EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
diff --git a/make/modules/java.base/Lib.gmk b/make/modules/java.base/Lib.gmk
index 771b94525aaef..51d323a0344f2 100644
--- a/make/modules/java.base/Lib.gmk
+++ b/make/modules/java.base/Lib.gmk
@@ -81,7 +81,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
DISABLED_WARNINGS_clang_Net.c := unused-function unused-variable, \
DISABLED_WARNINGS_clang_UnixNativeDispatcher.c := unused-variable, \
JDK_LIBS := libjava libnet, \
- LIBS_linux := $(LIBDL) -lpthread, \
+ LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
LIBS_aix := $(LIBDL), \
LIBS_macosx := \
-framework CoreFoundation \
@@ -124,6 +124,7 @@ ifeq ($(call isTargetOsType, unix), true)
DISABLED_WARNINGS_clang_jsig.c := unused-but-set-variable, \
LIBS_linux := $(LIBDL), \
LIBS_aix := $(LIBDL), \
+ ONLY_EXPORTED := true, \
))
TARGETS += $(BUILD_LIBJSIG)
@@ -157,6 +158,7 @@ endif
$(eval $(call SetupJdkLibrary, BUILD_LIBSYSLOOKUP, \
NAME := syslookup, \
+ EXTRA_HEADER_DIRS := java.base:libjava, \
LD_SET_ORIGIN := false, \
LDFLAGS_linux := -Wl$(COMMA)--no-as-needed, \
LDFLAGS_aix := -brtl -bexpfull, \
diff --git a/make/modules/java.base/gensrc/GensrcBuffer.gmk b/make/modules/java.base/gensrc/GensrcBuffer.gmk
index f769a8e61e052..dd91c8c870a13 100644
--- a/make/modules/java.base/gensrc/GensrcBuffer.gmk
+++ b/make/modules/java.base/gensrc/GensrcBuffer.gmk
@@ -272,7 +272,7 @@ define SetupGenBuffer
$$($1_long_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_float_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_double_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
- $(PRINTF) "}\n" >> $$($1_DST).tmp
+ $(ECHO) "}" >> $$($1_DST).tmp
mv $$($1_DST).tmp $$($1_DST)
endif
diff --git a/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk b/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk
index 1ed3fb3db795f..ea51e4fd4ee12 100644
--- a/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk
+++ b/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk
@@ -42,6 +42,17 @@ define GenerateScopedOp
$1_Type := $2
+ ifeq ($$($1_Type), Boolean)
+ $1_type := boolean
+ $1_BoxType := $$($1_Type)
+
+ $1_rawType := $$($1_type)
+ $1_RawType := $$($1_Type)
+ $1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -KCAS
+ endif
+
ifeq ($$($1_Type), Byte)
$1_type := byte
$1_BoxType := $$($1_Type)
@@ -50,6 +61,7 @@ define GenerateScopedOp
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+ $1_ARGS += -KCAS
$1_ARGS += -Kbyte
endif
@@ -60,6 +72,8 @@ define GenerateScopedOp
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -KCAS
$1_ARGS += -KUnaligned
endif
@@ -70,6 +84,8 @@ define GenerateScopedOp
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -KCAS
$1_ARGS += -KUnaligned
endif
@@ -82,8 +98,6 @@ define GenerateScopedOp
$1_RawBoxType := $$($1_BoxType)
$1_ARGS += -KCAS
- $1_ARGS += -KAtomicAdd
- $1_ARGS += -KBitwise
$1_ARGS += -KUnaligned
endif
@@ -96,8 +110,6 @@ define GenerateScopedOp
$1_RawBoxType := $$($1_BoxType)
$1_ARGS += -KCAS
- $1_ARGS += -KAtomicAdd
- $1_ARGS += -KBitwise
$1_ARGS += -KUnaligned
endif
@@ -133,7 +145,7 @@ define GenerateScopedOp
$1_ARGS += -KBitwise
endif
- ifneq ($$(findstring $$($1_Type), Byte Short Char), )
+ ifneq ($$(findstring $$($1_Type), Boolean Byte Short Char), )
$1_ARGS += -KShorterThanInt
endif
endef
@@ -141,7 +153,7 @@ endef
################################################################################
# Setup a rule for generating the ScopedMemoryAccess java class
-SCOPE_MEMORY_ACCESS_TYPES := Byte Short Char Int Long Float Double
+SCOPE_MEMORY_ACCESS_TYPES := Boolean Byte Short Char Int Long Float Double
$(foreach t, $(SCOPE_MEMORY_ACCESS_TYPES), \
$(eval $(call GenerateScopedOp,BIN_$t,$t)))
@@ -151,7 +163,7 @@ $(SCOPED_MEMORY_ACCESS_DEST): $(BUILD_TOOLS_JDK) $(SCOPED_MEMORY_ACCESS_TEMPLATE
$(foreach t, $(SCOPE_MEMORY_ACCESS_TYPES), \
$(TOOL_SPP) -nel -K$(BIN_$t_type) -Dtype=$(BIN_$t_type) -DType=$(BIN_$t_Type) $(BIN_$t_ARGS) \
-i$(SCOPED_MEMORY_ACCESS_BIN_TEMPLATE) -o$(SCOPED_MEMORY_ACCESS_DEST) ;)
- $(PRINTF) "}\n" >> $(SCOPED_MEMORY_ACCESS_DEST)
+ $(ECHO) "}" >> $(SCOPED_MEMORY_ACCESS_DEST)
TARGETS += $(SCOPED_MEMORY_ACCESS_DEST)
diff --git a/make/modules/java.base/gensrc/GensrcVarHandles.gmk b/make/modules/java.base/gensrc/GensrcVarHandles.gmk
index e2f5664dec63f..899f827462c79 100644
--- a/make/modules/java.base/gensrc/GensrcVarHandles.gmk
+++ b/make/modules/java.base/gensrc/GensrcVarHandles.gmk
@@ -174,6 +174,18 @@ define GenerateVarHandleMemorySegment
$1_FILENAME := $(VARHANDLES_GENSRC_DIR)/VarHandleSegmentAs$$($1_Type)s.java
+ ifeq ($$($1_Type), Boolean)
+ $1_type := boolean
+ $1_BoxType := $$($1_Type)
+
+ $1_rawType := $$($1_type)
+ $1_RawType := $$($1_Type)
+ $1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -Kbyte
+ $1_ARGS += -KShorterThanInt
+ endif
+
ifeq ($$($1_Type), Byte)
$1_type := byte
$1_BoxType := $$($1_Type)
@@ -183,6 +195,7 @@ define GenerateVarHandleMemorySegment
$1_RawBoxType := $$($1_BoxType)
$1_ARGS += -Kbyte
+ $1_ARGS += -KShorterThanInt
endif
ifeq ($$($1_Type), Short)
@@ -192,6 +205,8 @@ define GenerateVarHandleMemorySegment
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -KShorterThanInt
endif
ifeq ($$($1_Type), Char)
@@ -201,6 +216,8 @@ define GenerateVarHandleMemorySegment
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -KShorterThanInt
endif
ifeq ($$($1_Type), Int)
@@ -277,7 +294,7 @@ $(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
$(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))
# List the types to generate source for, with capitalized first letter
-VARHANDLES_MEMORY_SEGMENT_TYPES := Byte Short Char Int Long Float Double
+VARHANDLES_MEMORY_SEGMENT_TYPES := Boolean Byte Short Char Int Long Float Double
$(foreach t, $(VARHANDLES_MEMORY_SEGMENT_TYPES), \
$(eval $(call GenerateVarHandleMemorySegment,VAR_HANDLE_MEMORY_SEGMENT_$t,$t)))
diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk
index b76394d081f25..316103be4cd95 100644
--- a/make/modules/java.base/lib/CoreLibraries.gmk
+++ b/make/modules/java.base/lib/CoreLibraries.gmk
@@ -32,14 +32,9 @@ ifeq ($(INCLUDE), true)
## Build libverify
################################################################################
-LIBVERIFY_OPTIMIZATION := HIGH
-ifeq ($(call isTargetOs, linux)+$(COMPILE_WITH_DEBUG_SYMBOLS), true+true)
- LIBVERIFY_OPTIMIZATION := LOW
-endif
-
$(eval $(call SetupJdkLibrary, BUILD_LIBVERIFY, \
NAME := verify, \
- OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
+ OPTIMIZATION := HIGH, \
DISABLED_WARNINGS_gcc_check_code.c := unused-variable, \
DISABLED_WARNINGS_clang_check_code.c := unused-variable, \
EXTRA_HEADER_DIRS := libjava, \
@@ -172,6 +167,14 @@ endif
ifeq ($(call isTargetOs, aix), true)
# AIX requires a static libjli because the compiler doesn't support '-rpath'
BUILD_LIBJLI_TYPE := STATIC_LIBRARY
+
+ # This is the object file to provide the dladdr API, which is not
+ # part of AIX. It occurs several times in the jdk code base.
+ # Do not include it. When statically linking the java
+ # launcher with all JDK and VM static libraries, we use the
+ # --whole-archive linker option. The duplicate objects in different
+ # static libraries cause linking errors due to duplicate symbols.
+ LIBJLI_STATIC_EXCLUDE_OBJS += java_md_aix.o
endif
$(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
@@ -187,7 +190,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
unused-function, \
DISABLED_WARNINGS_clang_java_md_macosx.m := unused-variable, \
LIBS_unix := $(LIBZ_LIBS), \
- LIBS_linux := $(LIBDL) -lpthread, \
+ LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
LIBS_macosx := \
-framework ApplicationServices \
-framework Cocoa \
diff --git a/make/modules/java.compiler/Java.gmk b/make/modules/java.compiler/Java.gmk
index cb720672639f5..d0a1fbf4cd510 100644
--- a/make/modules/java.compiler/Java.gmk
+++ b/make/modules/java.compiler/Java.gmk
@@ -32,6 +32,4 @@
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
-EXCLUDES += javax/tools/snippet-files
-
################################################################################
diff --git a/make/modules/java.desktop/Java.gmk b/make/modules/java.desktop/Java.gmk
index 61c7fa44e0e83..bab6186fb0d0b 100644
--- a/make/modules/java.desktop/Java.gmk
+++ b/make/modules/java.desktop/Java.gmk
@@ -31,15 +31,6 @@ DOCLINT += -Xdoclint:all/protected \
COPY += .gif .png .wav .txt .xml .css .pf
CLEAN += iio-plugin.properties cursors.properties
-EXCLUDES += \
- java/awt/doc-files \
- javax/swing/doc-files \
- javax/swing/text/doc-files \
- javax/swing/plaf/synth/doc-files \
- javax/swing/undo/doc-files \
- sun/awt/X11/doc-files \
- #
-
EXCLUDE_FILES += \
javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
diff --git a/make/modules/java.desktop/lib/AwtLibraries.gmk b/make/modules/java.desktop/lib/AwtLibraries.gmk
index 4d18038f2aac3..5414c93c90893 100644
--- a/make/modules/java.desktop/lib/AwtLibraries.gmk
+++ b/make/modules/java.desktop/lib/AwtLibraries.gmk
@@ -95,6 +95,16 @@ ifeq ($(call isTargetOs, windows), true)
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
endif
+# This is the object file to provide the dladdr API, which is not
+# part of AIX. It occurs several times in the jdk code base.
+# Do not include it. When statically linking the java
+# launcher with all JDK and VM static libraries, we use the
+# --whole-archive linker option. The duplicate objects in different
+# static libraries cause linking errors due to duplicate symbols.
+ifeq ($(call isTargetOs, aix), true)
+ LIBAWT_STATIC_EXCLUDE_OBJS := porting_aix.o
+endif
+
# -fgcse-after-reload improves performance of MaskFill in Java2D by 20% for
# some gcc
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
@@ -140,6 +150,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
user32.lib uuid.lib winmm.lib winspool.lib, \
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
EXTRA_RCFLAGS := $(LIBAWT_RCFLAGS), \
+ STATIC_LIB_EXCLUDE_OBJS := $(LIBAWT_STATIC_EXCLUDE_OBJS), \
))
TARGETS += $(BUILD_LIBAWT)
@@ -220,10 +231,14 @@ ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false)
common/font \
common/java2d/opengl \
common/java2d/x11 \
- libpipewire/include \
java.base:libjvm \
#
+ # exclude pipewire from the AIX build, no Wayland support
+ ifeq ($(call isTargetOs, aix), false)
+ LIBAWT_XAWT_EXTRA_HEADER_DIRS += libpipewire/include
+ endif
+
ifeq ($(call isTargetOs, linux), true)
ifeq ($(DISABLE_XRENDER), true)
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
@@ -285,7 +300,7 @@ ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false)
JDK_LIBS := libawt java.base:libjava, \
LIBS_unix := $(LIBDL) $(LIBM) $(X_LIBS) -lX11 -lXext -lXi -lXrender \
-lXtst, \
- LIBS_linux := -lpthread, \
+ LIBS_linux := $(LIBPTHREAD), \
STATIC_LIB_EXCLUDE_OBJS := $(LIBAWT_XAWT_STATIC_EXCLUDE_OBJS), \
))
diff --git a/make/modules/java.desktop/lib/ClientLibraries.gmk b/make/modules/java.desktop/lib/ClientLibraries.gmk
index 8733a8617c940..dcb41defba354 100644
--- a/make/modules/java.desktop/lib/ClientLibraries.gmk
+++ b/make/modules/java.desktop/lib/ClientLibraries.gmk
@@ -67,8 +67,6 @@ ifeq ($(USE_EXTERNAL_LCMS), true)
# If we're using an external library, we can't include our own SRC path
# as includes, instead the system headers should be used.
LIBLCMS_HEADERS_FROM_SRC := false
- # FIXME: Keep old behavior and reset LCMS_CFLAGS. This is likely a bug.
- LCMS_CFLAGS :=
endif
ifeq ($(TOOLCHAIN_TYPE)+$(TOOLCHAIN_VERSION), clang+10.1)
@@ -89,7 +87,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
libawt/java2d \
java.base:libjvm, \
HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \
- DISABLED_WARNINGS_gcc := format-nonliteral stringop-truncation type-limits \
+ DISABLED_WARNINGS_gcc := format-nonliteral stringop-truncation \
unused-variable, \
DISABLED_WARNINGS_clang := format-nonliteral, \
JDK_LIBS := libawt java.base:libjava, \
@@ -226,16 +224,18 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
- OPTIMIZATION := LOW, \
+ OPTIMIZATION := SIZE, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) \
- $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
+ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS) \
+ $(ICONV_CFLAGS), \
CXXFLAGS := $(LIBSPLASHSCREEN_CFLAGS) \
- $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
+ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS) \
+ $(ICONV_CFLAGS), \
EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS), \
DISABLED_WARNINGS_gcc_dgif_lib.c := sign-compare, \
DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \
DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \
- DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized, \
+ DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized unused-function, \
DISABLED_WARNINGS_gcc_pngerror.c := maybe-uninitialized, \
DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough \
maybe-uninitialized, \
@@ -246,6 +246,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
+ DISABLED_WARNINGS_clang_png.c := unused-function, \
DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare \
unused-but-set-variable unused-function, \
DISABLED_WARNINGS_clang_splashscreen_png.c := \
@@ -256,19 +257,20 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_microsoft_splashscreen_impl.c := 4018 4267 4244, \
DISABLED_WARNINGS_microsoft_splashscreen_png.c := 4267, \
DISABLED_WARNINGS_microsoft_splashscreen_sys.c := 4267 4244, \
+ LDFLAGS := $(ICONV_LDFLAGS), \
LDFLAGS_windows := -delayload:user32.dll, \
JDK_LIBS_windows := java.base:libjava, \
JDK_LIBS_macosx := libosxapp, \
- LIBS := $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(LIBZ_LIBS) $(PNG_LIBS), \
- LIBS_unix := $(LIBM) -lpthread, \
+ LIBS := $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(LIBZ_LIBS) $(PNG_LIBS) $(ICONV_LIBS), \
+ LIBS_unix := $(LIBM) $(LIBPTHREAD), \
LIBS_linux := $(LIBDL) $(X_LIBS) -lX11 -lXext, \
- LIBS_macosx := -liconv \
+ LIBS_macosx := \
-framework ApplicationServices \
-framework Cocoa \
-framework Foundation \
-framework Metal \
-framework Security, \
- LIBS_aix := $(LIBDL) -liconv $(X_LIBS) -lX11 -lXext, \
+ LIBS_aix := $(LIBDL) $(X_LIBS) -lX11 -lXext, \
LIBS_windows := delayimp.lib gdi32.lib kernel32.lib user32.lib, \
STATIC_LIB_EXCLUDE_OBJS := $(LIBSPLASHSCREEN_STATIC_LIB_EXCLUDE_OBJS), \
))
@@ -331,7 +333,7 @@ else
HARFBUZZ_DISABLED_WARNINGS_gcc := missing-field-initializers \
strict-aliasing unused-result array-bounds parentheses \
- unused-variable
+ unused-variable dangling-pointer
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
@@ -407,6 +409,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
LDFLAGS_aix := -Wl$(COMMA)-berok, \
JDK_LIBS := libawt java.base:libjava $(LIBFONTMANAGER_JDK_LIBS), \
JDK_LIBS_macosx := libawt_lwawt, \
+ JDK_LIBS_unix := java.base:libjvm, \
LIBS := $(LIBFONTMANAGER_LIBS), \
LIBS_unix := $(LIBM), \
LIBS_macosx := \
diff --git a/make/modules/java.instrument/Lib.gmk b/make/modules/java.instrument/Lib.gmk
index 0d1a3d81b50dd..609814c86edbe 100644
--- a/make/modules/java.instrument/Lib.gmk
+++ b/make/modules/java.instrument/Lib.gmk
@@ -35,14 +35,17 @@ include LibCommon.gmk
$(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \
NAME := instrument, \
OPTIMIZATION := LOW, \
+ CFLAGS := $(ICONV_CFLAGS), \
CFLAGS_windows := -Dstrcasecmp=stricmp, \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
+ LDFLAGS := $(ICONV_LDFLAGS), \
JDK_LIBS := java.base:libjava java.base:libjli java.base:libjvm, \
+ LIBS := $(ICONV_LIBS), \
LIBS_unix := $(LIBZ_LIBS), \
LIBS_linux := $(LIBDL), \
- LIBS_aix := $(LIBDL) -liconv, \
- LIBS_macosx := -liconv \
+ LIBS_aix := $(LIBDL), \
+ LIBS_macosx := \
-framework ApplicationServices \
-framework Cocoa \
-framework Security, \
diff --git a/make/modules/java.management/Lib.gmk b/make/modules/java.management/Lib.gmk
index cfa96b012c95b..89c99266fcca9 100644
--- a/make/modules/java.management/Lib.gmk
+++ b/make/modules/java.management/Lib.gmk
@@ -31,16 +31,9 @@ include LibCommon.gmk
## Build libmanagement
################################################################################
-LIBMANAGEMENT_OPTIMIZATION := HIGH
-ifeq ($(call isTargetOs, linux)+$(COMPILE_WITH_DEBUG_SYMBOLS), true+true)
- LIBMANAGEMENT_OPTIMIZATION := LOW
-endif
-
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \
NAME := management, \
- OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
- DISABLED_WARNINGS_gcc_VMManagementImpl.c := unused-variable, \
- DISABLED_WARNINGS_clang_VMManagementImpl.c := unused-variable, \
+ OPTIMIZATION := HIGH, \
JDK_LIBS := java.base:libjava java.base:libjvm, \
LIBS_aix := -lperfstat, \
LIBS_windows := advapi32.lib psapi.lib, \
diff --git a/make/modules/jdk.compiler/Gendata.gmk b/make/modules/jdk.compiler/Gendata.gmk
index 739625a5732a1..2afc6e98e3791 100644
--- a/make/modules/jdk.compiler/Gendata.gmk
+++ b/make/modules/jdk.compiler/Gendata.gmk
@@ -53,7 +53,6 @@ COMPILECREATESYMBOLS_ADD_EXPORTS := \
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
- --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
#
# TODO: Unify with jdk.javadoc-gendata. Should only compile this once and share.
@@ -61,7 +60,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK), \
COMPILER := buildjdk, \
SRC := $(TOPDIR)/make/langtools/src/classes, \
- INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
+ INCLUDES := build/tools/symbolgenerator, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javac, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
diff --git a/make/modules/jdk.incubator.vector/Lib.gmk b/make/modules/jdk.incubator.vector/Lib.gmk
index 6d1259cfe6097..e6a05019f5fb1 100644
--- a/make/modules/jdk.incubator.vector/Lib.gmk
+++ b/make/modules/jdk.incubator.vector/Lib.gmk
@@ -27,49 +27,46 @@
include LibCommon.gmk
-################################################################################
-## Build libjsvml
-################################################################################
+ifeq ($(INCLUDE_COMPILER2), true)
-ifeq ($(call isTargetOs, linux windows)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2), true+true+true)
- $(eval $(call SetupJdkLibrary, BUILD_LIBJSVML, \
- NAME := jsvml, \
- LDFLAGS_windows := -defaultlib:msvcrt, \
- ))
+ ##############################################################################
+ ## Build libjsvml
+ ##############################################################################
- TARGETS += $(BUILD_LIBJSVML)
-endif
+ ifeq ($(call isTargetOs, linux windows)+$(call isTargetCpu, x86_64), true+true)
+ $(eval $(call SetupJdkLibrary, BUILD_LIBJSVML, \
+ NAME := jsvml, \
+ LDFLAGS_windows := -defaultlib:msvcrt, \
+ ))
-################################################################################
-## Build libsleef
-################################################################################
+ TARGETS += $(BUILD_LIBJSVML)
+ endif
-ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, riscv64)+$(INCLUDE_COMPILER2), true+true+true)
- $(eval $(call SetupJdkLibrary, BUILD_LIBSLEEF, \
- NAME := sleef, \
- OPTIMIZATION := HIGH, \
- SRC := libsleef/lib, \
- EXTRA_SRC := libsleef/generated, \
- DISABLED_WARNINGS_gcc := unused-function sign-compare tautological-compare ignored-qualifiers, \
- DISABLED_WARNINGS_clang := unused-function sign-compare tautological-compare ignored-qualifiers, \
- CFLAGS := -march=rv64gcv, \
- ))
+ ##############################################################################
+ ## Build libsleef
+ ##############################################################################
- TARGETS += $(BUILD_LIBSLEEF)
-endif
+ ifeq ($(call isTargetOs, linux macosx)+$(call isTargetCpu, aarch64 riscv64), true+true)
+ ifeq ($(call isTargetCpu, riscv64), true)
+ LIBSLEEF_CFLAGS := -march=rv64gcv
+ endif
+
+ $(eval $(call SetupJdkLibrary, BUILD_LIBSLEEF, \
+ NAME := sleef, \
+ OPTIMIZATION := HIGH, \
+ SRC := libsleef/lib, \
+ EXTRA_SRC := libsleef/generated, \
+ DISABLED_WARNINGS_gcc := unused-function sign-compare \
+ tautological-compare ignored-qualifiers, \
+ DISABLED_WARNINGS_clang := unused-function sign-compare \
+ tautological-compare ignored-qualifiers, \
+ CFLAGS := $(LIBSLEEF_CFLAGS), \
+ vector_math_sve.c_CFLAGS := $(SVE_CFLAGS), \
+ ))
-ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, aarch64)+$(INCLUDE_COMPILER2), true+true+true)
- $(eval $(call SetupJdkLibrary, BUILD_LIBSLEEF, \
- NAME := sleef, \
- OPTIMIZATION := HIGH, \
- SRC := libsleef/lib, \
- EXTRA_SRC := libsleef/generated, \
- DISABLED_WARNINGS_gcc := unused-function sign-compare tautological-compare ignored-qualifiers, \
- DISABLED_WARNINGS_clang := unused-function sign-compare tautological-compare ignored-qualifiers, \
- vector_math_sve.c_CFLAGS := $(SVE_CFLAGS), \
- ))
+ TARGETS += $(BUILD_LIBSLEEF)
+ endif
- TARGETS += $(BUILD_LIBSLEEF)
endif
################################################################################
diff --git a/make/modules/jdk.jartool/Gensrc.gmk b/make/modules/jdk.jartool/Gensrc.gmk
index dc53aa0b6520e..7ae53d0b774a8 100644
--- a/make/modules/jdk.jartool/Gensrc.gmk
+++ b/make/modules/jdk.jartool/Gensrc.gmk
@@ -33,6 +33,11 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
CLASS := ListResourceBundle, \
))
-TARGETS += $(COMPILE_PROPERTIES)
+$(eval $(call SetupCompileProperties, JARSIGNER_RESOURCES, \
+ SRC_DIRS := $(TOPDIR)/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/resources, \
+ CLASS := ListResourceBundle, \
+))
+
+TARGETS += $(COMPILE_PROPERTIES) $(JARSIGNER_RESOURCES)
################################################################################
diff --git a/make/modules/jdk.javadoc/Gendata.gmk b/make/modules/jdk.javadoc/Gendata.gmk
index 2cd812de779ef..a97342ffd049e 100644
--- a/make/modules/jdk.javadoc/Gendata.gmk
+++ b/make/modules/jdk.javadoc/Gendata.gmk
@@ -51,7 +51,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
SRC := $(TOPDIR)/make/langtools/src/classes \
$(TOPDIR)/src/jdk.jdeps/share/classes, \
- INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
+ INCLUDES := build/tools/symbolgenerator, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
diff --git a/make/modules/jdk.jdi/Java.gmk b/make/modules/jdk.jdi/Java.gmk
index d31008c318fdc..c5e3e715c1a68 100644
--- a/make/modules/jdk.jdi/Java.gmk
+++ b/make/modules/jdk.jdi/Java.gmk
@@ -31,7 +31,6 @@ EXCLUDES += \
com/sun/tools/example/debug/bdi \
com/sun/tools/example/debug/event \
com/sun/tools/example/debug/gui \
- com/sun/jdi/doc-files \
#
EXCLUDE_FILES += jdi-overview.html
diff --git a/make/modules/jdk.jdwp.agent/Lib.gmk b/make/modules/jdk.jdwp.agent/Lib.gmk
index a1f9a0fca52fa..8fe7787d76e90 100644
--- a/make/modules/jdk.jdwp.agent/Lib.gmk
+++ b/make/modules/jdk.jdwp.agent/Lib.gmk
@@ -38,7 +38,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBDT_SOCKET, \
EXTRA_HEADER_DIRS := \
include \
libjdwp/export, \
- LIBS_linux := -lpthread, \
+ LIBS_linux := $(LIBPTHREAD), \
LIBS_windows := iphlpapi.lib ws2_32.lib, \
))
@@ -53,7 +53,7 @@ TARGETS += $(BUILD_LIBDT_SOCKET)
$(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
NAME := jdwp, \
OPTIMIZATION := LOW, \
- CFLAGS := -DJDWP_LOGGING, \
+ CFLAGS := -DJDWP_LOGGING $(ICONV_CFLAGS), \
DISABLED_WARNINGS_gcc_eventFilter.c := unused-variable, \
DISABLED_WARNINGS_gcc_SDE.c := unused-function, \
DISABLED_WARNINGS_gcc_threadControl.c := unused-but-set-variable \
@@ -68,14 +68,14 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
DISABLED_WARNINGS_clang_threadControl.c := unused-but-set-variable \
unused-variable, \
DISABLED_WARNINGS_clang_utf_util.c := unused-but-set-variable, \
+ LDFLAGS := $(ICONV_LDFLAGS), \
EXTRA_HEADER_DIRS := \
include \
libjdwp/export \
java.base:libjava, \
JDK_LIBS := java.base:libjvm, \
+ LIBS := $(ICONV_LIBS), \
LIBS_linux := $(LIBDL), \
- LIBS_macosx := -liconv, \
- LIBS_aix := -liconv, \
))
TARGETS += $(BUILD_LIBJDWP)
diff --git a/make/modules/jdk.jlink/Java.gmk b/make/modules/jdk.jlink/Java.gmk
new file mode 100644
index 0000000000000..4ddd1eab03d92
--- /dev/null
+++ b/make/modules/jdk.jlink/Java.gmk
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2025, 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.
+#
+
+################################################################################
+
+# Instruct SetupJavaCompilation for the jdk.jlink module to include
+# upgrade_files_.conf files
+COPY += .conf
+
+################################################################################
diff --git a/make/modules/jdk.jpackage/Lib.gmk b/make/modules/jdk.jpackage/Lib.gmk
index a301447d73eed..e9c55548b0df0 100644
--- a/make/modules/jdk.jpackage/Lib.gmk
+++ b/make/modules/jdk.jpackage/Lib.gmk
@@ -61,7 +61,6 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHER, \
DISABLED_WARNINGS_clang_Log.cpp := unused-const-variable, \
CFLAGS_FILTER_OUT := -MD, \
CXXFLAGS_FILTER_OUT := -MD, \
- CFLAGS_macosx := -Wno-format-nonliteral, \
CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
LD_SET_ORIGIN := false, \
diff --git a/make/modules/jdk.management/Lib.gmk b/make/modules/jdk.management/Lib.gmk
index fd9345e8b8a60..8991414b44e29 100644
--- a/make/modules/jdk.management/Lib.gmk
+++ b/make/modules/jdk.management/Lib.gmk
@@ -38,14 +38,9 @@ ifeq ($(call isTargetOs, windows), true)
LIBMANAGEMENT_EXT_CFLAGS := -DPSAPI_VERSION=1
endif
-LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
-ifeq ($(call isTargetOs, linux)+$(COMPILE_WITH_DEBUG_SYMBOLS), true+true)
- LIBMANAGEMENT_EXT_OPTIMIZATION := LOW
-endif
-
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \
NAME := management_ext, \
- OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
+ OPTIMIZATION := HIGH, \
DISABLED_WARNINGS_gcc_DiagnosticCommandImpl.c := unused-variable, \
DISABLED_WARNINGS_clang_DiagnosticCommandImpl.c := unused-variable, \
DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral, \
diff --git a/make/modules/jdk.sctp/Lib.gmk b/make/modules/jdk.sctp/Lib.gmk
index 2017805f52d53..327f4fa610464 100644
--- a/make/modules/jdk.sctp/Lib.gmk
+++ b/make/modules/jdk.sctp/Lib.gmk
@@ -41,7 +41,7 @@ ifeq ($(call isTargetOs, linux), true)
java.base:libnio \
java.base:libnio/ch, \
JDK_LIBS := java.base:libjava java.base:libnet, \
- LIBS_linux := $(LIBDL) -lpthread, \
+ LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
))
TARGETS += $(BUILD_LIBSCTP)
diff --git a/make/scripts/aix/ld.sh b/make/scripts/aix/ld.sh
deleted file mode 100644
index faa77ce4ba5a8..0000000000000
--- a/make/scripts/aix/ld.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2025 SAP SE. 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.
-#
-unset LIBPATH
-exec /usr/bin/ld "$@"
diff --git a/make/scripts/compare.sh b/make/scripts/compare.sh
index cc2f4adf2ed8b..250b5a37b9f5f 100644
--- a/make/scripts/compare.sh
+++ b/make/scripts/compare.sh
@@ -203,12 +203,12 @@ compare_permissions() {
do
if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
- OP=`ls -l ${OTHER_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
- TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
+ OP=`ls -l ${OTHER_DIR}/$f | $AWK '{printf("%.10s\n", $1);}'`
+ TP=`ls -l ${THIS_DIR}/$f | $AWK '{printf("%.10s\n", $1);}'`
if [ "$OP" != "$TP" ]
then
if [ -z "$found" ]; then echo ; found="yes"; fi
- $PRINTF "\tother: ${OP} this: ${TP}\t$f\n"
+ $PRINTF "\tother: %s this: %s\t%s\n" "${OP}" "${TP}" "$f"
fi
done
if [ -z "$found" ]; then
@@ -260,7 +260,7 @@ compare_file_types() {
continue
else
if [ -z "$found" ]; then echo ; found="yes"; fi
- $PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
+ $PRINTF "\tother: %s\n\tthis : %s\n" "${OF}" "${TF}"
fi
fi
done
diff --git a/make/scripts/fixpath.sh b/make/scripts/fixpath.sh
index 3a886fee07c47..8eaf57d18f380 100644
--- a/make/scripts/fixpath.sh
+++ b/make/scripts/fixpath.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2020, 2025, 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
@@ -157,11 +157,21 @@ function import_path() {
if [[ $? -eq 0 && -e "$unixpath" ]]; then
if [[ ! "$winpath" =~ ^"$ENVROOT"\\.*$ ]] ; then
# If it is not in envroot, it's a generic windows path
- if [[ ! $winpath =~ ^[-_.:\\a-zA-Z0-9]*$ ]] ; then
+ if [[ ! $winpath =~ ^[-_.:~\\a-zA-Z0-9]*$ ]] ; then
# Path has forbidden characters, rewrite as short name
# This monster of a command uses the %~s support from cmd.exe to
# reliably convert to short paths on all winenvs.
shortpath="$($CMD /q /c for %I in \( "$winpath" \) do echo %~sI 2>/dev/null | tr -d \\n\\r)"
+ if [[ ! $shortpath =~ ^[-_.:~\\a-zA-Z0-9]*$ ]] ; then
+ if [[ $QUIET != true ]]; then
+ echo fixpath: failure: Path "'"$path"'" could not be converted to short path >&2
+ fi
+ if [[ $IGNOREFAILURES != true ]]; then
+ exit 1
+ else
+ shortpath=""
+ fi
+ fi
unixpath="$($PATHTOOL -u "$shortpath")"
# unixpath is based on short name
fi
diff --git a/make/scripts/genExceptions.sh b/make/scripts/genExceptions.sh
index 4f6c0d9820b4e..7c191189827fc 100644
--- a/make/scripts/genExceptions.sh
+++ b/make/scripts/genExceptions.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2025, 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
@@ -70,6 +70,8 @@ __END__
/**
* The $ARG_PHRASE.
+ *
+ * @serial
*/
private $ARG_TYPE $ARG_ID;
diff --git a/make/scripts/generate-symbol-data.sh b/make/scripts/generate-symbol-data.sh
index 015beb582fdaf..6f38d8730093c 100644
--- a/make/scripts/generate-symbol-data.sh
+++ b/make/scripts/generate-symbol-data.sh
@@ -68,8 +68,7 @@ if [ "`git status --porcelain=v1 .`x" != "x" ] ; then
exit 1
fi;
-$1/bin/java --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
- --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
+$1/bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-modules jdk.jdeps \
diff --git a/make/scripts/update_copyright_year.sh b/make/scripts/update_copyright_year.sh
index bb61d48c91cc9..578ab4cbc9923 100644
--- a/make/scripts/update_copyright_year.sh
+++ b/make/scripts/update_copyright_year.sh
@@ -1,7 +1,7 @@
#!/bin/bash -f
#
-# Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2025, 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
@@ -41,10 +41,6 @@ set -e
# To allow total changes counting
shopt -s lastpipe
-# Get an absolute path to this script, since that determines the top-level directory.
-this_script_dir=`dirname $0`
-this_script_dir=`cd $this_script_dir > /dev/null && pwd`
-
# Temp area
tmp=/tmp/`basename $0`.${USER}.$$
rm -f -r ${tmp}
@@ -98,10 +94,16 @@ while getopts "c:fhy:" option; do
done
# VCS check
+git_installed=false
+which git > /dev/null && git_installed=true
+if [ "$git_installed" != "true" ]; then
+ echo "Error: This script requires git. Please install it."
+ exit 1
+fi
git_found=false
-[ -d "${this_script_dir}/../../.git" ] && git_found=true
+git status &> /dev/null && git_found=true
if [ "$git_found" != "true" ]; then
- echo "Error: Please execute script from within make/scripts."
+ echo "Error: Please execute script from within a JDK git repository."
exit 1
else
echo "Using Git version control system"
diff --git a/make/src/classes/build/tools/jfr/GenerateJfrFiles.java b/make/src/classes/build/tools/jfr/GenerateJfrFiles.java
index 7532a446aa162..09f3a9f5e3f1f 100644
--- a/make/src/classes/build/tools/jfr/GenerateJfrFiles.java
+++ b/make/src/classes/build/tools/jfr/GenerateJfrFiles.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2025, 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
@@ -768,9 +768,10 @@ private static void printJfrEventClassesHpp(Metadata metadata, File outputFile)
out.write("#ifndef JFRFILES_JFREVENTCLASSES_HPP");
out.write("#define JFRFILES_JFREVENTCLASSES_HPP");
out.write("");
- out.write("#include \"oops/klass.hpp\"");
out.write("#include \"jfrfiles/jfrTypes.hpp\"");
out.write("#include \"jfr/utilities/jfrTypes.hpp\"");
+ out.write("#include \"oops/klass.hpp\"");
+ out.write("#include \"runtime/thread.hpp\"");
out.write("#include \"utilities/macros.hpp\"");
out.write("#include \"utilities/ticks.hpp\"");
out.write("#if INCLUDE_JFR");
@@ -789,6 +790,7 @@ private static void printJfrEventClassesHpp(Metadata metadata, File outputFile)
out.write(" */");
out.write("");
printTypes(out, metadata, false);
+ printHelpers(out, false);
out.write("");
out.write("");
out.write("#else // !INCLUDE_JFR");
@@ -806,6 +808,7 @@ private static void printJfrEventClassesHpp(Metadata metadata, File outputFile)
out.write("};");
out.write("");
printTypes(out, metadata, true);
+ printHelpers(out, true);
out.write("");
out.write("");
out.write("#endif // INCLUDE_JFR");
@@ -813,6 +816,35 @@ private static void printJfrEventClassesHpp(Metadata metadata, File outputFile)
}
}
+ private static void printHelpers(Printer out, boolean empty) {
+ out.write("template ");
+ out.write("class JfrNonReentrant : public EventType {");
+ if (!empty) {
+ out.write(" private:");
+ out.write(" Thread* const _thread;");
+ out.write(" int32_t _previous_nesting;");
+ }
+ out.write(" public:");
+ out.write(" JfrNonReentrant(EventStartTime timing = TIMED)");
+ if (empty) {
+ out.write(" {}");
+ } else {
+ out.write(" : EventType(timing), _thread(Thread::current()), _previous_nesting(JfrThreadLocal::make_non_reentrant(_thread)) {}");
+ out.write("");
+ out.write(" JfrNonReentrant(Thread* thread, EventStartTime timing = TIMED)");
+ out.write(" : EventType(timing), _thread(thread), _previous_nesting(JfrThreadLocal::make_non_reentrant(_thread)) {}");
+ }
+ if (!empty) {
+ out.write("");
+ out.write(" ~JfrNonReentrant() {");
+ out.write(" if (_previous_nesting != -1) {");
+ out.write(" JfrThreadLocal::make_reentrant(_thread, _previous_nesting);");
+ out.write(" }");
+ out.write(" }");
+ }
+ out.write("}; ");
+ }
+
private static void printTypes(Printer out, Metadata metadata, boolean empty) {
for (TypeElement t : metadata.getStructs()) {
printType(out, t, empty);
diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk
index 53ee942d5d00f..347ca44d25f39 100644
--- a/make/test/BuildMicrobenchmark.gmk
+++ b/make/test/BuildMicrobenchmark.gmk
@@ -119,12 +119,22 @@ $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
$(foreach jar, $(JMH_RUNTIME_JARS), \
$$($(UNZIP) -oq $(jar) -d $(JMH_UNPACKED_DIR)))
$(RM) -r $(JMH_UNPACKED_DIR)/META-INF
- $(RM) $(JMH_UNPACKED_DIR)/*.xml
$(TOUCH) $@
+# Copy dependency files for inclusion in the benchmark JARs
+$(eval $(call SetupCopyFiles, COPY_JAXP_TEST_XML, \
+ SRC := $(TOPDIR)/test/jaxp/javax/xml/jaxp/unittest, \
+ DEST := $(MICROBENCHMARK_CLASSES)/org/openjdk/bench/javax/xml, \
+ FILES := \
+ stream/XMLStreamWriterTest/message_12.xml \
+ validation/tck/reZ003vExc23082309.xml \
+ transform/msgAttach.xml, \
+ FLATTEN := true, \
+))
+
# Create benchmarks JAR file with benchmarks for both the old and new JDK
$(eval $(call SetupJarArchive, BUILD_JDK_JAR, \
- DEPENDENCIES := $(BUILD_JDK_MICROBENCHMARK) $(JMH_UNPACKED_JARS_DONE), \
+ DEPENDENCIES := $(BUILD_JDK_MICROBENCHMARK) $(JMH_UNPACKED_JARS_DONE) $(COPY_JAXP_TEST_XML), \
SRCS := $(MICROBENCHMARK_CLASSES) $(JMH_UNPACKED_DIR), \
BIN := $(MICROBENCHMARK_JAR_BIN), \
SUFFIXES := .*, \
diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk
index 3dc00aeff8757..dc5e0a9bd64bc 100644
--- a/make/test/BuildTestLib.gmk
+++ b/make/test/BuildTestLib.gmk
@@ -52,10 +52,14 @@ $(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
TARGETS += $(BUILD_WB_JAR)
+ifeq ($(call isTargetOs, linux), false)
+ BUILD_TEST_LIB_JAR_EXCLUDES := jdk/test/lib/containers
+endif
+
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
SRC := $(TEST_LIB_SOURCE_DIR), \
- EXCLUDES := jdk/test/lib/containers jdk/test/lib/security, \
+ EXCLUDES := $(BUILD_TEST_LIB_JAR_EXCLUDES), \
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
@@ -64,6 +68,11 @@ $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
+ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED \
+ --add-exports java.base/sun.security.pkcs=ALL-UNNAMED \
+ --add-exports java.base/sun.security.provider.certpath=ALL-UNNAMED \
+ --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED \
+ --add-exports java.base/sun.security.x509=ALL-UNNAMED \
--enable-preview, \
))
diff --git a/make/test/BuildTestSetupAOT.gmk b/make/test/BuildTestSetupAOT.gmk
new file mode 100644
index 0000000000000..0b6376c0d898c
--- /dev/null
+++ b/make/test/BuildTestSetupAOT.gmk
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2025, 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.
+#
+
+include MakeFileStart.gmk
+
+################################################################################
+# This file builds the TestSetupAOT.class, which is used by SetupAOT
+# in ../RunTests.gmk
+################################################################################
+
+include CopyFiles.gmk
+include JavaCompilation.gmk
+
+################################################################################
+
+SETUP_AOT_BASEDIR := $(TOPDIR)/test/setup_aot
+SETUP_AOT_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/setup_aot
+SETUP_AOT_JAR := $(SETUP_AOT_SUPPORT)/TestSetupAOT.jar
+
+$(eval $(call SetupJavaCompilation, BUILD_SETUP_AOT, \
+ TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
+ SRC := $(SETUP_AOT_BASEDIR), \
+ BIN := $(SETUP_AOT_SUPPORT)/classes, \
+ JAR := $(SETUP_AOT_JAR), \
+))
+
+TARGETS += $(BUILD_SETUP_AOT)
+
+################################################################################
+# Targets for building test-image.
+################################################################################
+
+# Copy to hotspot jtreg test image
+$(eval $(call SetupCopyFiles, COPY_SETUP_AOT, \
+ DEST := $(TEST_IMAGE_DIR)/setup_aot, \
+ FILES := $(SETUP_AOT_JAR), \
+))
+
+IMAGES_TARGETS += $(COPY_SETUP_AOT)
+
+images: $(IMAGES_TARGETS)
+
+.PHONY: images
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/JtregNativeHotspot.gmk b/make/test/JtregNativeHotspot.gmk
index 2ee26b422e0c2..207f82241aa72 100644
--- a/make/test/JtregNativeHotspot.gmk
+++ b/make/test/JtregNativeHotspot.gmk
@@ -39,1532 +39,113 @@ include TestFilesCompilation.gmk
################################################################################
# This might have been added to by a custom extension.
-BUILD_HOTSPOT_JTREG_NATIVE_SRC += $(TOPDIR)/test/hotspot/jtreg
-
-BUILD_HOTSPOT_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/hotspot/jtreg/native
-
-BUILD_HOTSPOT_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/hotspot/jtreg
-
-################################################################################
-# Former VM TestBase tests.
-################################################################################
+HOTSPOT_JTREG_NATIVE_SRC += $(TOPDIR)/test/hotspot/jtreg
+HOTSPOT_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/hotspot/jtreg/native
VM_TESTBASE_DIR := $(TOPDIR)/test/hotspot/jtreg/vmTestbase
+NSK_SHARE_DIR := $(VM_TESTBASE_DIR)/nsk/share
-VM_SHARE_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/vm/share \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-NSK_MONITORING_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-NSK_JDI_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- #
-
-NSK_SHARE_JDI_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jdi \
- #
-
-NSK_SHARE_JNI_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-RUNTIME_DEFMETH_INCLUDES := \
- -I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/jni \
- -I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/native \
- -I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti \
- #
-
-NSK_SHARE_LOCKS_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/locks \
- #
-
-MLVM_JVMTI_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- -I$(VM_TESTBASE_DIR)/nsk/share/jvmti \
- -I$(VM_TESTBASE_DIR)/nsk/share/jvmti/agent_common \
- -I$(VM_TESTBASE_DIR)/vm/mlvm/share \
- #
-
-MLVM_STRESS_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-NSK_GC_LOCK_JNI_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jni \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-NSK_GC_LOCK_REF_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jniref \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-NSK_STRACE_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-NSK_STRESS_JNI_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/stress/jni \
- #
-
-NSK_JVMTI_AGENT_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jvmti \
- -I$(VM_TESTBASE_DIR)/nsk/share/jvmti/agent_common \
- #
-
-NSK_JVMTI_AOD_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/aod \
- -I$(VM_TESTBASE_DIR)/nsk/share/jvmti \
- -I$(VM_TESTBASE_DIR)/nsk/share/jvmti/aod \
- #
-
-NSK_AOD_INCLUDES := \
- -I$(VM_TESTBASE_DIR)/nsk/share/aod \
- -I$(VM_TESTBASE_DIR)/nsk/share/native \
- -I$(VM_TESTBASE_DIR)/nsk/share/jni \
- #
-
-NO_FRAMEPOINTER_CFLAGS :=
-ifeq ($(call isTargetOs, linux), true)
- NO_FRAMEPOINTER_CFLAGS := -fomit-frame-pointer
-endif
+################################################################################
+# Platform independent setup
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libNoFramePointer := $(NO_FRAMEPOINTER_CFLAGS)
# Optimization -O3 needed, HIGH == -O3
-BUILD_HOTSPOT_JTREG_LIBRARIES_OPTIMIZATION_libNoFramePointer := HIGH
-
-JVMTI_COMMON_INCLUDES = -I$(TOPDIR)/test/lib/jdk/test/lib/jvmti
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libProcessUtils := $(VM_SHARE_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libThreadController := $(NSK_MONITORING_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libDeadlock := $(NSK_MONITORING_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libRecursiveMonitoringThread := $(NSK_MONITORING_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libLockingThreads := $(NSK_MONITORING_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libStackTraceController := $(NSK_MONITORING_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefineClasses := $(RUNTIME_DEFMETH_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libforceEarlyReturn005a := $(NSK_JDI_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libMonitorEnterExecutor := $(NSK_SHARE_JDI_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIreferences := $(NSK_SHARE_JNI_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libLockingThread := $(NSK_SHARE_LOCKS_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIMonitorLocker := $(NSK_SHARE_LOCKS_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstepBreakPopReturn := $(MLVM_JVMTI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libIndyRedefineClass := $(MLVM_JVMTI_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativeAndMH := $(MLVM_STRESS_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libBooleanArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libByteArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libCharArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libDoubleArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libFloatArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libIntArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libLongArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libShortArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libStringCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+HOTSPOT_JTREG_LIBRARIES_OPTIMIZATION_libNoFramePointer := HIGH
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIGlobalRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNILocalRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIWeakGlobalRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
-
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace003 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace004 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace005 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace006 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace008 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace009 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace011 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace012 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace014 := $(NSK_STRACE_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstrace015 := $(NSK_STRACE_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgcl001 := $(NSK_STRESS_JNI_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbootclssearch_agent := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsystemclssearch_agent := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetsysprop001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetsysprop002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetlocal001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetlocal002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libGetEnv001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetvern001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldecl002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldecl004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldecl001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libloadedclss001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libloadedclss002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libextevents001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdatadumpreq001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtimerinfo001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrstat002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrstat005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrstat004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrstat003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrstat001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframecnt001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframecnt002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframecnt003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcontmon003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcontmon002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcontmon001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrtimerinfo001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetenvstor001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetenvstor002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetenvstor003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframeloc002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframeloc003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframeloc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass009 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass031 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass030 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass015 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass012 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass024 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass023 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass022 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass025 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass013 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass014 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstressRedefine := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass011 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass029 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass016 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass020 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass018 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass027 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass019 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass026 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass021 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass028 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass017 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefclass010 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetjlocfmt002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetjlocfmt001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetlocal003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetlocal004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetallstktr001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetcpool001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libextmech := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentthr := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libheapref := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librefignore := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libIsSyntheticIssynth001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblinetab004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgc := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonitor := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfollowref002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfollowref005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfollowref004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfollowref003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfollowref006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfollowref001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclsldrclss00x := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libearlyretvoid := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libearlyretlong := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libearlyretint := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libearlyretbase := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libearlyretstr := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libearlyretobj := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libearlyretfp := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetavailproc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclstat006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclstat007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclstat005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrinfo002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrinfo001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetthrdstor002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetthrdstor003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetthrdstor001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjsize001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libaddcaps001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libaddcaps002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libaddcaps003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmthd007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmthd006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmthd005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfieldacc003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfieldacc004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfieldacc002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfieldacc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetsrcfn006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetsrcfn005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetsrcfn004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetthrdstor001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libintrpthrd001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libintrpthrd002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libintrpthrd003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativemethbind002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativemethbind004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativemethbind003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativemethbind001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetenvstor001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetextevent001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetpotcaps001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterobjreachobj001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterobjreachobj002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterobjreachobj005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterobjreachobj004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterobjreachobj003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclrfldw002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclrfldw001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libvminit001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsuspendthrd001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsuspendthrd002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsuspendthrd003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsuspendvthr001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdeclcls002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdeclcls003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdeclcls001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetjniftab002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetjniftab001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgeterrname002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgeterrname001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsettag001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstopthrd007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libstopthrd006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgenevents001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldmdf004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldmdf003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libresumethrdlst001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libresumethrdlst002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetbrk008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetbrk007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetbrk005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetbrk002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetbrk003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsuspendthrdlst001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsuspendthrdlst002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libIsMethodSyntheticIssynth001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libissynth002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentonunload001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetsysprop002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetsysprop003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgettag001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnframepop001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnframepop003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnframepop002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libvmobjalloc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjwithtags001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfy004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfy003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfy002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfy001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmethmod001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmethmod002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmentry002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmentry001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterheap004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterheap003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterheap002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterheap005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterheap007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterheap006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterheap001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe010 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe011 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe009 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libpopframe007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcurthrtimerinfo001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnwait004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnwait003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnwait002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnwait005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnwait001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfldw001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfldw006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfldw003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfldw004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfldw005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfldw002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclrfmodw001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclrfmodw002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisnative002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisnative001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterreachobj002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterreachobj005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterreachobj004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterreachobj003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterreachobj001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liballthr001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liballthr002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjhashcode001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdyncodgen001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetnotif001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmexit001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmexit002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmethloc002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmethloc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbreakpoint001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetcaps001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetcaps002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclsldrclss001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclsldrclss002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblinetab001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblinetab003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblinetab002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmaxloc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmaxloc002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassfloadhk009 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetintrf006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetintrf007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetintrf005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libexcatch001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libresumethrd002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libresumethrd001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjfree001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjfree002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfieldmod002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libfieldmod001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libextfuncs001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libSetNativeMethodPrefix002Main := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libSetNativeMethodPrefix002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libSetNativeMethodPrefix001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassprep001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetvrbflag002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetvrbflag001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmcontentered001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetevntcallb001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetevntcallb002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetevntcallb003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfyall002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfyall004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfyall003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmnntfyall001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgcfinish001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libownmoninf002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libownmoninf003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libownmoninf001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldnm003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldnm004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetfldnm005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgf08t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgf08t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgf08t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgf01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgf06t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgf04t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbi02t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbi02t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbi03t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbi03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbi04t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbi01t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbi01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libex03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm02t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t013 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t014 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t015 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t012 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t009 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t019 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t021 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t017 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t010 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t011 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t016 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t020 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t018 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcm01t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp02t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp02t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp02t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp05t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp05t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp04t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp04t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp03t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp06t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp06t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp06t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp01t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp01t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp07t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsp07t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtc04t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtc03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtc03t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtc02t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtc05t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtc01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma08t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma08t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma01t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma06t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma06t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma07t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma07t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma05t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma05t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma02t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma02t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma03t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma04t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma04t003a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma04t002a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma04t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma04t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma04t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t003a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t004a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t005a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t002a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t007a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t008a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t001a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libma10t006a := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs103t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs104t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs104t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs301t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs301t005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs301t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs301t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs301t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs203t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs203t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs203t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs203t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs204t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs204t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs204t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs204t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs202t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs202t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t011 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t010 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t009 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs302t012 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs201t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs201t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libhs201t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem06t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem01t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem07t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem07t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t009 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t012 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t010 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem02t011 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem05t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem05t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libem04t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libji01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libji06t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libji03t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libji03t004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libji03t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libji03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libji05t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap10t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap11t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap02t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap05t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap05t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap04t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap04t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap04t003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap03t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap12t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap06t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap01t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap09t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap07t001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libap07t002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthreadstart001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthreadstart003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthreadstart002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonenter002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonenter003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonenter004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonenter001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdealloc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisfldsin003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisfldsin002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrgrpinfo001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrgrpinfo002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libAbort := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libCallbacks := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libNonConcreteKlassFilter := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libConcreteKlassFilter := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libHeapFilter := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmcontenter001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclrbrk001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclrbrk002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclrbrk005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtopthrgrp002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtopthrgrp001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisarray004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisarray005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbytecodes003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbytecodes002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libbytecodes001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthreadend001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthreadend002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetthrdgrpchld001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmonitorwait001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liballoc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsrcdebugex003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsrcdebugex002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsrcdebugex001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcrrawmon002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcrrawmon001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetjniftab001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetjniftab002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclsldr003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclsldr002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclsldr001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcurthrcputime001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonexit001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonexit002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonexit005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librawmonexit003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisobsolete001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libargsize001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libargsize002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclfld007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclfld006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclfld005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr008 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr009 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetstacktr003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblocaltab001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblocaltab004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblocaltab003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblocaltab002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_liblocaltab005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libclassload001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisintrf004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libisintrf005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframepop001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libframepop002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclsig005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclsig004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclsig006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdisposeenv002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdisposeenv001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libexception001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libexceptionjni001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libresexhausted := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgcstart001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgcstart002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterinstcls005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterinstcls002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterinstcls003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterinstcls004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterinstcls001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterinstcls006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libiterinstcls007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmethname002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmethname003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmethname001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libforcegc001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libforcegc002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgettime001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjmonusage004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjmonusage003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjmonusage002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjmonusage005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjmonusage006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libobjmonusage001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentonload001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentonload002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentonload003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrcputime002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libthrcputime001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libmonitorwaited001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libForceEarlyReturn001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentthr003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentthr002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libagentthr001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcompmethunload001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf007 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetlocal001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetlocal004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetlocal003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetlocal002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libcompmethload001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetsysprops001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetsysprops002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdrrawmon003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdrrawmon004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libdrrawmon001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsinglestep001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsinglestep003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsinglestep002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librelcaps001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_librelcaps002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfmodw004 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfmodw003 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfmodw002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfmodw005 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfmodw006 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetfmodw001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libvmdeath001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetphase001 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetphase002 := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libMethodBind := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libOnUnload := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libStackTrace := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libredefineCFLH := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libAddToBootstrapClassLoaderSearch := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libDispose := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libenvironment := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnosuspendMonitorInfo := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnosuspendStackTrace := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetNullVMInit := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtimers := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libHeap := $(NSK_JVMTI_AGENT_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libHotSwap := $(NSK_JVMTI_AGENT_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach046Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach041Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach015Agent01 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach015Target := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach015Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach012Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach040Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach014Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach022Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach038Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach009Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsimpleAgent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach037Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach008Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach039Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach020Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach042Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach045Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach045Agent03 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach045Agent02 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach045Agent01 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach002aAgent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach021Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach050Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libattach002Agent00 := $(NSK_JVMTI_AOD_INCLUDES)
-
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libVirtualMachine07agent00 := $(NSK_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libVirtualMachine07agent01 := $(NSK_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libVirtualMachine07agent02 := $(NSK_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libVirtualMachine07agent03 := $(NSK_AOD_INCLUDES)
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libVirtualMachine09agent00 := $(NSK_AOD_INCLUDES)
+HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exesigtest := java.base:libjvm
+HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exedaemonDestroy := java.base:libjvm
################################################################################
-
# Platform specific setup
+
ifeq ($(call isTargetOs, linux), true)
- BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
- BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libstepBreakPopReturn := -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIndyRedefineClass := -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefineClasses := -lpthread
- BUILD_HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exeinvoke := java.base:libjvm
- BUILD_HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exestack-gap := java.base:libjvm
- BUILD_HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exestack-tls := java.base:libjvm
- BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -lpthread
- BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exestack-gap := -lpthread
- BUILD_TEST_exeinvoke_exeinvoke.c_OPTIMIZATION := NONE
- BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeFPRegs := -ldl
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit += -ldl
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAsyncGetCallTraceTest := -ldl
- BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libfast-math := -ffast-math
+ HOTSPOT_JTREG_LIBRARIES_CFLAGS_libNoFramePointer := -fomit-frame-pointer
+ HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
+ HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
+ HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exeinvoke := java.base:libjvm
+ HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exestack-gap := java.base:libjvm
+ HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exestack-tls := java.base:libjvm
+ TEST_exeinvoke_exeinvoke.c_OPTIMIZATION := NONE
+ HOTSPOT_JTREG_EXECUTABLES_LIBS_exeFPRegs := -ldl
+ HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit += -ldl
+ HOTSPOT_JTREG_LIBRARIES_LIBS_libAsyncGetCallTraceTest := -ldl
+ HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libfast-math := -ffast-math
else
- BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c \
+ HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c \
exeinvoke.c exestack-gap.c exestack-tls.c libAsyncGetCallTraceTest.cpp
endif
-ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, aarch64)), false)
- BUILD_HOTSPOT_JTREG_EXCLUDE += libTestSVEWithJNI.c
+ifneq ($(call isTargetOs, linux)+$(call isTargetCpu, aarch64), true+true)
+ HOTSPOT_JTREG_EXCLUDE += libTestSVEWithJNI.c
endif
-
-BUILD_HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exesigtest := java.base:libjvm
-BUILD_HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exedaemonDestroy := java.base:libjvm
-
ifeq ($(call isTargetOs, windows), true)
- BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
- BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c exeGetCreatedJavaVMs.c libTestUnloadedClass.cpp
- BUILD_HOTSPOT_JTREG_LIBRARIES_JDK_LIBS_libnativeStack := java.base:libjvm
- BUILD_HOTSPOT_JTREG_LIBRARIES_JDK_LIBS_libVThreadEventTest := java.base:libjvm
+ HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
+ HOTSPOT_JTREG_LIBRARIES_JDK_LIBS_libnativeStack := java.base:libjvm
+
+ HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c \
+ libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c \
+ exeGetCreatedJavaVMs.c libTestUnloadedClass.cpp
else
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbootclssearch_agent += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsystemclssearch_agent += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsysprop001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsysprop002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetlocal001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetlocal002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetEnv001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetvern001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldecl002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldecl004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldecl001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libloadedclss001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libloadedclss002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libextevents001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdatadumpreq001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtimerinfo001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrstat002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrstat005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrstat004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrstat003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrstat001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframecnt001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframecnt002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframecnt003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcontmon003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcontmon002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcontmon001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrtimerinfo001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetenvstor001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetenvstor002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetenvstor003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframeloc002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframeloc003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframeloc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass009 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass031 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass030 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass015 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass012 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass024 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass023 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass022 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass025 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass013 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass014 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libstressRedefine += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass011 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass029 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass016 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass020 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass018 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass027 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass019 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass026 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass021 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass028 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass017 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefclass010 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetjlocfmt002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetjlocfmt001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetlocal003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetlocal004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetallstktr001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetcpool001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libextmech += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentthr += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libheapref += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librefignore += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsSyntheticIssynth001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblinetab004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgc += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonitor += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfollowref002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfollowref005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfollowref004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfollowref003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfollowref006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfollowref001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclsldrclss00x += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libearlyretvoid += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libearlyretlong += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libearlyretint += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libearlyretbase += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libearlyretstr += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libearlyretobj += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libearlyretfp += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetavailproc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclstat006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclstat007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclstat005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrinfo002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrinfo001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetthrdstor002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetthrdstor003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetthrdstor001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjsize001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libaddcaps001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libaddcaps002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libaddcaps003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclmthd007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclmthd006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclmthd005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfieldacc003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfieldacc004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfieldacc002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfieldacc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsrcfn006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsrcfn005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsrcfn004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetthrdstor001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libintrpthrd001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libintrpthrd002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libintrpthrd003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativemethbind002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativemethbind004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativemethbind003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativemethbind001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetenvstor001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetextevent001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetpotcaps001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterobjreachobj001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterobjreachobj002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterobjreachobj005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterobjreachobj004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterobjreachobj003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclrfldw002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclrfldw001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libvminit001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsuspendthrd001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsuspendthrd002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsuspendthrd003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsuspendvthr001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdeclcls002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdeclcls003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdeclcls001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetjniftab002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetjniftab001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgeterrname002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgeterrname001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsettag001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libstopthrd007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libstopthrd006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgenevents001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldmdf004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldmdf003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libresumethrdlst001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libresumethrdlst002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetbrk008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetbrk007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetbrk005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetbrk002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetbrk003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsuspendthrdlst001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsuspendthrdlst002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsMethodSyntheticIssynth001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libissynth002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentonunload001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetsysprop002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetsysprop003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMethodBind += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libOnUnload += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libStackTrace += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libredefineCFLH += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAddToBootstrapClassLoaderSearch += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libDispose += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libenvironment += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnosuspendMonitorInfo += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnosuspendStackTrace += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetNullVMInit += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtimers += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHeap += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHotSwap += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach046Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach041Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach015Agent01 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach015Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach015Target += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach012Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach040Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach014Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach022Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach038Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach009Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsimpleAgent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach037Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach008Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach039Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach020Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach042Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach045Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach045Agent03 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach045Agent02 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach045Agent01 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach002aAgent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach021Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach050Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libattach002Agent00 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgettag001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnframepop001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnframepop003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnframepop002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libvmobjalloc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjwithtags001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfy004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfy003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfy002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfy001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmethmod001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmethmod002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmentry002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmentry001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterheap004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterheap003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterheap002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterheap005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterheap007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterheap006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterheap001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe010 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe011 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe009 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libpopframe007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcurthrtimerinfo001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnwait004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnwait003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnwait002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnwait005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnwait001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfldw001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfldw006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfldw003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfldw004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfldw005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfldw002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclrfmodw001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclrfmodw002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisnative002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisnative001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterreachobj002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterreachobj005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterreachobj004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterreachobj003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterreachobj001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liballthr001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liballthr002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjhashcode001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdyncodgen001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetnotif001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmexit001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmexit002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmethloc002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmethloc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbreakpoint001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetcaps001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetcaps002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclsldrclss001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclsldrclss002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblinetab001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblinetab003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblinetab002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmaxloc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmaxloc002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassfloadhk009 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetintrf006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetintrf007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetintrf005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libexcatch001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libresumethrd002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libresumethrd001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjfree001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjfree002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfieldmod002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libfieldmod001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libextfuncs001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSetNativeMethodPrefix002Main += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSetNativeMethodPrefix002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSetNativeMethodPrefix001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassprep001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetvrbflag002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetvrbflag001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmcontentered001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetevntcallb001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetevntcallb002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetevntcallb003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfyall002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfyall004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfyall003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmnntfyall001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgcfinish001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libownmoninf002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libownmoninf003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libownmoninf001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldnm003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldnm004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetfldnm005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgf08t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgf08t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgf08t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgf01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgf06t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgf04t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbi02t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbi02t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbi03t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbi03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbi04t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbi01t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbi01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libex03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm02t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t013 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t014 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t015 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t012 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t009 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t019 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t021 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t017 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t010 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t011 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t016 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t020 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t018 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcm01t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp02t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp02t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp02t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp05t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp05t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp04t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp04t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp03t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp06t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp06t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp06t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp01t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp01t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp07t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsp07t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtc04t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtc03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtc03t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtc02t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtc05t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtc01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma08t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma08t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma01t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma06t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma06t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma07t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma07t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma05t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma05t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma02t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma02t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma03t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma04t003a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma04t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma04t002a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma04t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma04t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma04t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t003a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t004a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t005a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t002a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t007a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t008a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t001a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libma10t006a += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs103t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs104t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs104t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs301t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs301t005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs301t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs301t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs301t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs203t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs203t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs203t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs203t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs204t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs204t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs204t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs204t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs202t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs202t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_build += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t011 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t010 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t009 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs302t012 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs201t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs201t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libhs201t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem06t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem01t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem07t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem07t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t009 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t012 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t010 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem02t011 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem05t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem05t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libem04t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libji01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libji06t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libji03t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libji03t004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libji03t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libji03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libji05t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap10t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap11t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap02t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap05t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap05t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap04t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap04t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap04t003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap03t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap12t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap06t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap01t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap09t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap07t001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libap07t002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthreadstart001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthreadstart003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthreadstart002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonenter002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonenter003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonenter004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonenter001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdealloc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libexceptionjni001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisfldsin003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisfldsin002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrgrpinfo001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrgrpinfo002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAbort += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCallbacks += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libNonConcreteKlassFilter += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libConcreteKlassFilter += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHeapFilter += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmcontenter001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclrbrk001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclrbrk002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclrbrk005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtopthrgrp002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtopthrgrp001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisarray004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisarray005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbytecodes003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbytecodes002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbytecodes001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthreadend001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthreadend002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetthrdgrpchld001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmonitorwait001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liballoc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsrcdebugex003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsrcdebugex002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsrcdebugex001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcrrawmon002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcrrawmon001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetjniftab001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetjniftab002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclsldr003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclsldr002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclsldr001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcurthrcputime001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonexit001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonexit002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonexit005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librawmonexit003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisobsolete001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libargsize001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libargsize002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclfld007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclfld006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclfld005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr008 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr009 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetstacktr003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblocaltab001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblocaltab004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblocaltab003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblocaltab002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liblocaltab005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libclassload001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisintrf004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libisintrf005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframepop001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libframepop002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclsig005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclsig004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclsig006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdisposeenv002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdisposeenv001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libexception001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libresexhausted += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgcstart001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgcstart002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterinstcls005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterinstcls002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterinstcls003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterinstcls004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterinstcls001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterinstcls006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libiterinstcls007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmethname002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmethname003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmethname001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libforcegc001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libforcegc002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgettime001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjmonusage004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjmonusage003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjmonusage002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjmonusage005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjmonusage006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libobjmonusage001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentonload001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentonload002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentonload003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrcputime002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libthrcputime001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libmonitorwaited001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libForceEarlyReturn001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentthr003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentthr002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libagentthr001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcompmethunload001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libretransform002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libretransform004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libretransform003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclmdf007 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclmdf006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclmdf004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetclmdf005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetlocal001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetlocal004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetlocal003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetlocal002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libcompmethload001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsysprops001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsysprops002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdrrawmon003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdrrawmon004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libdrrawmon001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsinglestep001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsinglestep003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsinglestep002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librelcaps001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_librelcaps002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfmodw004 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfmodw003 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfmodw002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfmodw005 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfmodw006 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsetfmodw001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libvmdeath001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetphase001 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetphase002 += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libterminatedThread += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCompleteExit += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMonitorWithDeadObjectTest += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libTestUnloadedClass += -lpthread
- BUILD_HOTSPOT_JTREG_LIBRARIES_JDK_LIBS_libVThreadEventTest := java.base:libjvm
- BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeGetCreatedJavaVMs := -lpthread
- BUILD_HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exeGetCreatedJavaVMs := java.base:libjvm
+ HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exeGetCreatedJavaVMs := java.base:libjvm
- BUILD_HOTSPOT_JTREG_EXCLUDE += libNativeException.c exeGetProcessorInfo.c
+ HOTSPOT_JTREG_EXCLUDE += libNativeException.c exeGetProcessorInfo.c
endif
+################################################################################
+# Global setup
+
+ # Any executable which launches the JVM and uses a custom launcher needs to
+ # explicitly link in the default ASan and LSan options.
ifeq ($(ASAN_ENABLED), true)
- # Any executable which launches the JVM and uses a custom launcher needs to explicitly link in the
- # default ASan options.
- BUILD_HOTSPOT_JTREG_EXTRA_FILES += $(TOPDIR)/make/data/asan/asan_default_options.c
+ HOTSPOT_JTREG_EXTRA_FILES += $(TOPDIR)/make/data/asan/asan_default_options.c
endif
-
ifeq ($(LSAN_ENABLED), true)
- # Any executable which launches the JVM and uses a custom launcher needs to explicitly link in the
- # default LSan options.
- BUILD_HOTSPOT_JTREG_EXTRA_FILES += $(TOPDIR)/make/data/lsan/lsan_default_options.c
+ HOTSPOT_JTREG_EXTRA_FILES += $(TOPDIR)/make/data/lsan/lsan_default_options.c
endif
-# These apply to all tests
-BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS := -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS $(JVMTI_COMMON_INCLUDES)
-BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS := -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS $(JVMTI_COMMON_INCLUDES)
+HOTSPOT_JTREG_CFLAGS := \
+ -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS \
+ -I$(NSK_SHARE_DIR)/aod \
+ -I$(NSK_SHARE_DIR)/gc/lock/jni \
+ -I$(NSK_SHARE_DIR)/gc/lock/jniref \
+ -I$(NSK_SHARE_DIR)/jdi \
+ -I$(NSK_SHARE_DIR)/jni \
+ -I$(NSK_SHARE_DIR)/jvmti \
+ -I$(NSK_SHARE_DIR)/jvmti/agent_common \
+ -I$(NSK_SHARE_DIR)/jvmti/aod \
+ -I$(NSK_SHARE_DIR)/locks \
+ -I$(NSK_SHARE_DIR)/native \
+ -I$(TOPDIR)/test/lib/jdk/test/lib/jvmti \
+ -I$(VM_TESTBASE_DIR)/nsk/stress/jni \
+ -I$(VM_TESTBASE_DIR)/vm/mlvm/share \
+ -I$(VM_TESTBASE_DIR)/vm/share \
+ #
# This evaluation is expensive and should only be done if this target was
# explicitly called.
ifneq ($(filter build-test-hotspot-jtreg-native, $(MAKECMDGOALS)), )
- $(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_LIBRARIES, \
+ $(eval $(call SetupTestFilesCompilation, HOTSPOT_JTREG_LIBRARIES, \
TYPE := LIBRARY, \
- SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
- OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
- EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
+ SOURCE_DIRS := $(HOTSPOT_JTREG_NATIVE_SRC), \
+ OUTPUT_DIR := $(HOTSPOT_JTREG_OUTPUT_DIR), \
+ EXCLUDE := $(HOTSPOT_JTREG_EXCLUDE), \
+ CFLAGS := $(HOTSPOT_JTREG_CFLAGS), \
+ LIBS := $(LIBPTHREAD), \
))
- $(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_EXECUTABLES, \
+ $(eval $(call SetupTestFilesCompilation, HOTSPOT_JTREG_EXECUTABLES, \
TYPE := PROGRAM, \
- SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
- OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
- EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
- EXTRA_FILES := $(BUILD_HOTSPOT_JTREG_EXTRA_FILES), \
+ SOURCE_DIRS := $(HOTSPOT_JTREG_NATIVE_SRC), \
+ OUTPUT_DIR := $(HOTSPOT_JTREG_OUTPUT_DIR), \
+ EXCLUDE := $(HOTSPOT_JTREG_EXCLUDE), \
+ EXTRA_FILES := $(HOTSPOT_JTREG_EXTRA_FILES), \
+ CFLAGS := $(HOTSPOT_JTREG_CFLAGS), \
+ LIBS := $(LIBPTHREAD), \
))
endif
-build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES)
+build-test-hotspot-jtreg-native: $(HOTSPOT_JTREG_LIBRARIES) \
+ $(HOTSPOT_JTREG_EXECUTABLES)
################################################################################
# Targets for building test-image.
@@ -1572,9 +153,10 @@ build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPO
# Copy to hotspot jtreg test image
$(eval $(call SetupCopyFiles, COPY_HOTSPOT_JTREG_NATIVE, \
- SRC := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
+ SRC := $(HOTSPOT_JTREG_OUTPUT_DIR), \
DEST := $(TEST_IMAGE_DIR)/hotspot/jtreg/native, \
- FILES := $(wildcard $(addprefix $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \
+ FILES := $(wildcard $(addprefix $(HOTSPOT_JTREG_OUTPUT_DIR), /bin/* \
+ /lib/*)), \
FLATTEN := true, \
))
@@ -1583,7 +165,8 @@ test-image-hotspot-jtreg-native: $(COPY_HOTSPOT_JTREG_NATIVE)
all: build-test-hotspot-jtreg-native
test-image: test-image-hotspot-jtreg-native
-.PHONY: build-test-hotspot-jtreg-native test-image-hotspot-jtreg-native test-image
+.PHONY: build-test-hotspot-jtreg-native test-image-hotspot-jtreg-native \
+ test-image
################################################################################
diff --git a/make/test/JtregNativeJdk.gmk b/make/test/JtregNativeJdk.gmk
index be40e24ba958b..60a88ca1c9a5c 100644
--- a/make/test/JtregNativeJdk.gmk
+++ b/make/test/JtregNativeJdk.gmk
@@ -56,7 +56,6 @@ BUILD_JDK_JTREG_EXECUTABLES_JDK_LIBS_exeCallerAccessTest := java.base:libjvm
BUILD_JDK_JTREG_EXECUTABLES_JDK_LIBS_exeNullCallerTest := java.base:libjvm
BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libstringPlatformChars := java.base:libjava
-BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libNewDirectByteBuffer := java.base:libjava
BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libGetXSpace := java.base:libjava
# Platform specific setup
@@ -69,7 +68,6 @@ ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib
BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeNullCallerTest := /EHsc
else
- BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libDirectIO := java.base:libjava
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libNativeThread := -pthread
# java.lang.foreign tests
@@ -83,7 +81,6 @@ else
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libImplicitAttach := -pthread
BUILD_JDK_JTREG_EXCLUDE += exerevokeall.c
ifeq ($(call isTargetOs, linux), true)
- BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libInheritedChannel := java.base:libjava
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exelauncher := -ldl
endif
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX)
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/arabic.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/arabic.ut8.txt
index 59447654660b7..ebb6c2eb3982a 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/arabic.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/arabic.ut8.txt
@@ -1,4 +1,4 @@
-ما هي الشفرة الموحدة "يونِكود" ؟
+ما هي الشفرة الموحدة "يونِكود" ؟
أساسًا، تتعامل الحواسيب فقط مع الأرقام، وتقوم بتخزين الأحرف والمحارف الأخرى بعد أن تُعطي رقما معينا لكل واحد منها. وقبل اختراع "يونِكود"، كان هناك مئات الأنظمة للتشفير وتخصيص هذه الأرقام للمحارف، ولم يوجد نظام تشفير واحد يحتوي على جميع المحارف الضرورية. وعلى سبيل المثال، فإن الاتحاد الأوروبي لوحده، احتوى العديد من الشفرات المختلفة ليغطي جميع اللغات المستخدمة في الاتحاد. وحتى لو اعتبرنا لغة واحدة، كاللغة الإنجليزية، فإن جدول شفرة واحد لم يكف لاستيعاب جميع الأحرف وعلامات الترقيم والرموز الفنية والعلمية الشائعة الاستعمال.
@@ -8,4 +8,4 @@
تخصص الشفرة الموحدة "يونِكود" رقما وحيدا لكل محرف في جميع اللغات العالمية، وذلك بغض النظر عن نوع الحاسوب أو البرامج المستخدمة. وقد تـم تبني مواصفة "يونِكود" مــن قبـل قادة الصانعين لأنظمة الحواسيب فـي العالم، مثل شركات آي.بي.إم. (IBM)، أبـل (APPLE)، هِيـْولِـت بـاكـرد (Hewlett-Packard) ، مايكروسوفت (Microsoft)، أوراكِـل (Oracle) ، صن (Sun) وغيرها. كما أن المواصفات والمقاييس الحديثة (مثل لغة البرمجة "جافا" "JAVA" ولغة "إكس إم إل" "XML" التي تستخدم لبرمجة الانترنيت) تتطلب استخدام "يونِكود". علاوة على ذلك ، فإن "يونِكود" هي الطـريـقـة الرسـمية لتطبيق المقيـاس الـعـالـمي إيزو ١٠٦٤٦ (ISO 10646) .
-إن بزوغ مواصفة "يونِكود" وتوفُّر الأنظمة التي تستخدمه وتدعمه، يعتبر من أهم الاختراعات الحديثة في عولمة البرمجيات لجميع اللغات في العالم. وإن استخدام "يونِكود" في عالم الانترنيت سيؤدي إلى توفير كبير مقارنة مع استخدام المجموعات التقليدية للمحارف المشفرة. كما أن استخدام "يونِكود" سيُمكِّن المبرمج من كتابة البرنامج مرة واحدة، واستخدامه على أي نوع من الأجهزة أو الأنظمة، ولأي لغة أو دولة في العالم أينما كانت، دون الحاجة لإعادة البرمجة أو إجراء أي تعديل. وأخيرا، فإن استخدام "يونِكود" سيمكن البيانات من الانتقال عبر الأنظمة والأجهزة المختلفة دون أي خطورة لتحريفها، مهما تعددت الشركات الصانعة للأنظمة واللغات، والدول التي تمر من خلالها هذه البيانات.
\ No newline at end of file
+إن بزوغ مواصفة "يونِكود" وتوفُّر الأنظمة التي تستخدمه وتدعمه، يعتبر من أهم الاختراعات الحديثة في عولمة البرمجيات لجميع اللغات في العالم. وإن استخدام "يونِكود" في عالم الانترنيت سيؤدي إلى توفير كبير مقارنة مع استخدام المجموعات التقليدية للمحارف المشفرة. كما أن استخدام "يونِكود" سيُمكِّن المبرمج من كتابة البرنامج مرة واحدة، واستخدامه على أي نوع من الأجهزة أو الأنظمة، ولأي لغة أو دولة في العالم أينما كانت، دون الحاجة لإعادة البرمجة أو إجراء أي تعديل. وأخيرا، فإن استخدام "يونِكود" سيمكن البيانات من الانتقال عبر الأنظمة والأجهزة المختلفة دون أي خطورة لتحريفها، مهما تعددت الشركات الصانعة للأنظمة واللغات، والدول التي تمر من خلالها هذه البيانات.
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/english.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/english.ut8.txt
index dff289d24171f..8689e9e2d9e53 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/english.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/english.ut8.txt
@@ -1,4 +1,4 @@
-What is Unicode?
+What is Unicode?
Unicode provides a unique number for every character,
no matter what the platform,
no matter what the program,
@@ -16,4 +16,4 @@ Incorporating Unicode into client-server or multi-tiered applications and websit
About the Unicode Consortium
The Unicode Consortium is a non-profit organization founded to develop, extend and promote use of the Unicode Standard, which specifies the representation of text in modern software products and standards. The membership of the consortium represents a broad spectrum of corporations and organizations in the computer and information processing industry. The consortium is supported financially solely through membership dues. Membership in the Unicode Consortium is open to organizations and individuals anywhere in the world who support the Unicode Standard and wish to assist in its extension and implementation.
-For more information, see the Glossary, Unicode Enabled Products, Technical Introduction and Useful Resources.
\ No newline at end of file
+For more information, see the Glossary, Unicode Enabled Products, Technical Introduction and Useful Resources.
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/greek.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/greek.ut8.txt
index 360301c165c03..ce7b75c404817 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/greek.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/greek.ut8.txt
@@ -1,4 +1,4 @@
-Τι είναι το Unicode?
+Τι είναι το Unicode?
Η κωδικοσελίδα Unicode προτείνει έναν και μοναδικό αριθμό για κάθε χαρακτήρα,
ανεξάρτητα από το λειτουργικό σύστημα,
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/hebrew.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/hebrew.ut8.txt
index 274c77e7b355a..06a91c9784663 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/hebrew.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/hebrew.ut8.txt
@@ -1,10 +1,10 @@
-
-יוניקוד מקצה מספר ייחודי לכל תו,
-לא משנה על איזו פלטפורמה,
-לא משנה באיזו תוכנית,
+
+יוניקוד מקצה מספר ייחודי לכל תו,
+לא משנה על איזו פלטפורמה,
+לא משנה באיזו תוכנית,
ולא משנה באיזו שפה.
-באופן בסיסי, מחשבים עוסקים רק במספרים. הם מאחסנים אותיות ותווים אחרים על-ידי הקצאת מספר לכל אחד מהם. בטרם הומצא היוניקוד, היו מאות מערכות קידוד שונות להקצאת המספרים הללו. אף לא אחת מהן יכלה להכיל כמות תווים מספקת. לדוגמא: רק לאיחוד האירופאי נדרשים כמה סוגי קידודים שונים על מנת לכסות את כל השפות המדוברות בו. יתירה מזאת אף לשפה בודדת, כמו אנגלית למשל, לא היה די במערכת קידוד אחת בעבור כל האותיות, סימני הפיסוק והסמלים הטכניים שבשימוש שוטף.
+באופן בסיסי, מחשבים עוסקים רק במספרים. הם מאחסנים אותיות ותווים אחרים על-ידי הקצאת מספר לכל אחד מהם. בטרם הומצא היוניקוד, היו מאות מערכות קידוד שונות להקצאת המספרים הללו. אף לא אחת מהן יכלה להכיל כמות תווים מספקת. לדוגמא: רק לאיחוד האירופאי נדרשים כמה סוגי קידודים שונים על מנת לכסות את כל השפות המדוברות בו. יתירה מזאת אף לשפה בודדת, כמו אנגלית למשל, לא היה די במערכת קידוד אחת בעבור כל האותיות, סימני הפיסוק והסמלים הטכניים שבשימוש שוטף.
מערכות קידוד אלו אף סותרות זו את זו. כלומר, שני קידודים יכולים להשתמש באותו מספר לשני תוים נבדלים, או להשתמש במספרים שונים לאותו תו. על כל מחשב (ובמיוחד שרתים) לתמוך במספר רב של מערכות קידוד שונות; אולם כל אימת שנתונים עוברים בין מערכות קידוד או פלטפורמות שונות קיים הסיכון שייפגמו.
@@ -13,7 +13,7 @@
שילוב יוניקוד ביישומי שרת-לקוח או ביישומים רבי-שכבות ובאתרי אינטרנט מאפשר חיסכון ניכר בעלויות לעומת השימוש בסדרות התווים המסורתיות. הודות ליוניקוד, מוצר תוכנה אחד או אתר יחיד ברשת יכול להרחיב את יעדיו למגוון פלטפורמות, ארצות ושפות ללא צורך בשינויים מרחיקים. יוניקוד מאפשר מעבר נתונים דרך מערכות רבות ושונות מבלי שייפגמו.
-פרטים אודות הקונסורציום של יוניקוד (Unicode Consortium)
+פרטים אודות הקונסורציום של יוניקוד (Unicode Consortium)
הקונסורציום של יוניקוד הוא ארגון ללא מטרת רווח שנוסד כדי לפתח, להרחיב ולקדם את השימוש בתקן יוניקוד, אשר מגדיר את ייצוג הטקסט במוצרי תוכנה ותקנים מודרניים. חברים בקונסורציום מגוון רחב של תאגידים וארגונים בתעשיית המחשבים ועיבוד המידע. הקונסורציום ממומן על-ידי דמי-חבר בלבד. החברות בקונסורציום יוניקוד פתוחה לארגונים ולאנשים פרטיים, בכל רחבי העולם, אשר תומכים בתקן יוניקוד ומעוניינים לסייע בהתפתחותו והטמעתו.
-למידע נוסף, ראה מילון מונחים, רשימה חלקית של מוצרים מותאמים ליוניקוד, מבוא טכני ו- חומרי עזר [קישורים באנגלית].
\ No newline at end of file
+למידע נוסף, ראה מילון מונחים, רשימה חלקית של מוצרים מותאמים ליוניקוד, מבוא טכני ו- חומרי עזר [קישורים באנגלית].
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/hindi.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/hindi.ut8.txt
index d5714d31adc27..3fe9ae797e92c 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/hindi.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/hindi.ut8.txt
@@ -1,4 +1,4 @@
-यूनिकोड क्या है?
+यूनिकोड क्या है?
यूनिकोड प्रत्येक अक्षर के लिए एक विशेष नम्बर प्रदान करता है,
चाहे कोई भी प्लैटफॉर्म हो,
चाहे कोई भी प्रोग्राम हो,
@@ -16,4 +16,4 @@
यूनिकोड कन्सॉर्शियम के बारे में
यूनिकोड कन्सॉर्शियम, लाभ न कमाने वाला एक संगठन है जिसकी स्थापना यूनिकोड स्टैंडर्ड, जो आधुनिक सॉफ्टवेयर उत्पादों और मानकों में पाठ की प्रस्तुति को निर्दिष्ट करता है, के विकास, विस्तार और इसके प्रयोग को बढ़ावा देने के लिए की गई थी। इस कन्सॉर्शियम के सदस्यों में, कम्प्यूटर और सूचना उद्योग में विभिन्न निगम और संगठन शामिल हैं। इस कन्सॉर्शियम का वित्तपोषण पूर्णतः सदस्यों के शुल्क से किया जाता है। यूनिकोड कन्सॉर्शियम में सदस्यता, विश्व में कहीं भी स्थित उन संगठनों और व्यक्तियों के लिए खुली है जो यूनिकोड का समर्थन करते हैं और जो इसके विस्तार और कार्यान्वयन में सहायता करना चाहते हैं।
-अधिक जानकारी के लिए, शब्दावली, सैम्पल यूनिकोड-सक्षम उत्पाद, तकनीकी परिचय और उपयोगी स्रोत देखिए।
\ No newline at end of file
+अधिक जानकारी के लिए, शब्दावली, सैम्पल यूनिकोड-सक्षम उत्पाद, तकनीकी परिचय और उपयोगी स्रोत देखिए।
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/japanese.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/japanese.ut8.txt
index 6d92e72ec4ca8..a4da2ce52f300 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/japanese.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/japanese.ut8.txt
@@ -1,4 +1,4 @@
-ユニコードとは何か?
+ユニコードとは何か?
ユニコードは、すべての文字に固有の番号を付与します
プラットフォームには依存しません
プログラムにも依存しません
@@ -16,4 +16,4 @@
ユニコードコンソーシアムについて
ユニコードコンソーシアムは、最新のソフトウエア製品と標準においてテキストを表現することを意味する“ユニコード標準”の構築、発展、普及、利用促進を目的として設立された非営利組織です。同コンソーシアムの会員は、コンピューターと情報処理に係わる広汎な企業や組織から構成されています。同コンソーシアムは、財政的には、純粋に会費のみによって運営されています。ユニコード標準を支持し、その拡張と実装を支援する世界中の組織や個人は、だれもがユニコードコンソーシアムの会員なることができます。
-より詳しいことをお知りになりたい方は、Glossary, Unicode-Enabled Products, Technical Introduction および Useful Resourcesをご参照ください。
\ No newline at end of file
+より詳しいことをお知りになりたい方は、Glossary, Unicode-Enabled Products, Technical Introduction および Useful Resourcesをご参照ください。
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/korean.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/korean.ut8.txt
index cfbf3e0722fcc..4e7bce8a38c47 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/korean.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/korean.ut8.txt
@@ -1,4 +1,4 @@
-유니코드에 대해 ?
+유니코드에 대해 ?
어떤 플랫폼,
어떤 프로그램,
어떤 언어에도 상관없이
@@ -16,4 +16,4 @@
유니코드 콘소시엄에 대해
유니코드 콘소시엄은 비영리 조직으로서 현대 소프트웨어 제품과 표준에서 텍스트의 표현을 지정하는 유니코드 표준의 사용을 개발하고 확장하며 장려하기 위해 세워졌습니다. 콘소시엄 멤버쉽은 컴퓨터와 정보 처리 산업에 종사하고 있는 광범위한 회사 및 조직의 범위를 나타냅니다. 콘소시엄의 재정은 전적으로 회비에 의해 충당됩니다. 유니코드 컨소시엄에서의 멤버쉽은 전 세계 어느 곳에서나 유니코드 표준을 지원하고 그 확장과 구현을 지원하고자하는 조직과 개인에게 개방되어 있습니다.
-더 자세한 내용은 용어집, 예제 유니코드 사용 가능 제품, 기술 정보 및 기타 유용한 정보를 참조하십시오.
\ No newline at end of file
+더 자세한 내용은 용어집, 예제 유니코드 사용 가능 제품, 기술 정보 및 기타 유용한 정보를 참조하십시오.
diff --git a/src/demo/share/java2d/J2DBench/resources/textdata/thai.ut8.txt b/src/demo/share/java2d/J2DBench/resources/textdata/thai.ut8.txt
index ff961a7ce0f27..7645e67aa441e 100644
--- a/src/demo/share/java2d/J2DBench/resources/textdata/thai.ut8.txt
+++ b/src/demo/share/java2d/J2DBench/resources/textdata/thai.ut8.txt
@@ -1,10 +1,10 @@
-Unicode คืออะไร?
+Unicode คืออะไร?
Unicode กำหนดหมายเลขเฉพาะสำหรับทุกอักขระ
โดยไม่สนใจว่าเป็นแพล็ตฟอร์มใด
ไม่ขึ้นกับว่าจะเป็นโปรแกรมใด
และไม่ว่าจะเป็นภาษาใด
-โดยพื้นฐานแล้ว, คอมพิวเตอร์จะเกี่ยวข้องกับเรื่องของตัวเลข. คอมพิวเตอร์จัดเก็บตัวอักษรและอักขระอื่นๆ โดยการกำหนดหมายเลขให้สำหรับแต่ละตัว. ก่อนหน้าที่๊ Unicode จะถูกสร้างขึ้น, ได้มีระบบ encoding อยู่หลายร้อยระบบสำหรับการกำหนดหมายเลขเหล่านี้. ไม่มี encoding ใดที่มีจำนวนตัวอักขระมากเพียงพอ: ยกตัวอย่างเช่น, เฉพาะในกลุ่มสหภาพยุโรปเพียงแห่งเดียว ก็ต้องการหลาย encoding ในการครอบคลุมทุกภาษาในกลุ่ม. หรือแม้แต่ในภาษาเดี่ยว เช่น ภาษาอังกฤษ ก็ไม่มี encoding ใดที่เพียงพอสำหรับทุกตัวอักษร, เครื่องหมายวรรคตอน และสัญลักษณ์ทางเทคนิคที่ใช้กันอยู่ทั่วไป.
+โดยพื้นฐานแล้ว, คอมพิวเตอร์จะเกี่ยวข้องกับเรื่องของตัวเลข. คอมพิวเตอร์จัดเก็บตัวอักษรและอักขระอื่นๆ โดยการกำหนดหมายเลขให้สำหรับแต่ละตัว. ก่อนหน้าที่๊ Unicode จะถูกสร้างขึ้น, ได้มีระบบ encoding อยู่หลายร้อยระบบสำหรับการกำหนดหมายเลขเหล่านี้. ไม่มี encoding ใดที่มีจำนวนตัวอักขระมากเพียงพอ: ยกตัวอย่างเช่น, เฉพาะในกลุ่มสหภาพยุโรปเพียงแห่งเดียว ก็ต้องการหลาย encoding ในการครอบคลุมทุกภาษาในกลุ่ม. หรือแม้แต่ในภาษาเดี่ยว เช่น ภาษาอังกฤษ ก็ไม่มี encoding ใดที่เพียงพอสำหรับทุกตัวอักษร, เครื่องหมายวรรคตอน และสัญลักษณ์ทางเทคนิคที่ใช้กันอยู่ทั่วไป.
ระบบ encoding เหล่านี้ยังขัดแย้งซึ่งกันและกัน. นั่นก็คือ, ในสอง encoding สามารถใช้หมายเลขเดียวกันสำหรับตัวอักขระสองตัวที่แตกต่างกัน,หรือใช้หมายเลขต่างกันสำหรับอักขระตัวเดียวกัน. ในระบบคอมพิวเตอร์ (โดยเฉพาะเซิร์ฟเวอร์) ต้องมีการสนับสนุนหลาย encoding; และเมื่อข้อมูลที่ผ่านไปมาระหว่างการเข้ารหัสหรือแพล็ตฟอร์มที่ต่างกัน, ข้อมูลนั้นจะเสี่ยงต่อการผิดพลาดเสียหาย.
@@ -14,6 +14,6 @@ Unicode กำหนดหมายเลขเฉพาะสำหรับแ
การรวม Unicode เข้าไปในระบบไคลเอ็นต์-เซิร์ฟเวอร์ หรือแอ็พพลิเคชันแบบ multi-tiered และเว็บไซต์ จะทำให้เกิดการประหยัดค่าใช้จ่ายมากกว่าการใช้ชุดอักขระแบบเดิม. Unicode ทำให้ผลิตภัณฑ์ซอฟต์แวร์หนึ่งเดียว หรือเว็บไซต์แห่งเดียว รองรับได้หลายแพล็ตฟอร์ม, หลายภาษาและหลายประเทศโดยไม่ต้องทำการรื้อปรับระบบ. Unicode ยังทำให้ข้อมูลสามารถเคลื่อนย้ายไปมาในหลายๆ ระบบโดยไม่เกิดความผิดพลาดเสียหาย.
เกี่ยวกับ Unicode Consortium
-Unicode Consortium เป็นองค์กรไม่แสวงหากำไรที่ก่อตั้งขึ้นเพื่อพัฒนา, ขยายและส่งเสริมการใช้ Unicode Standard, ซึ่งกำหนดรูปแบบการแทนค่าของข้อความในผลิตภัณฑ์ซอฟต์แวร์และมาตรฐานใหม่ๆ. สมาชิกของสมาคมเป็นตัวแทนจากบริษัทและองค์กรในอุตสาหกรรมคอมพิวเตอร์และการประมวลผลสารสนเทศ. สมาคมได้รับการสนับสนุนทางการเงินผ่านทางค่าธรรมเนียมของการเป็นสมาชิกเท่านั้น. สมาชิกภาพของ Unicode Consortium เปิดกว้างสำหรับองค์กรหรือบุคคลใดๆ ในโลกที่ต้องการสนับสนุน Unicode Standard และช่วยเหลือการขยายตัวและการนำ Unicode ไปใช้งาน.
+Unicode Consortium เป็นองค์กรไม่แสวงหากำไรที่ก่อตั้งขึ้นเพื่อพัฒนา, ขยายและส่งเสริมการใช้ Unicode Standard, ซึ่งกำหนดรูปแบบการแทนค่าของข้อความในผลิตภัณฑ์ซอฟต์แวร์และมาตรฐานใหม่ๆ. สมาชิกของสมาคมเป็นตัวแทนจากบริษัทและองค์กรในอุตสาหกรรมคอมพิวเตอร์และการประมวลผลสารสนเทศ. สมาคมได้รับการสนับสนุนทางการเงินผ่านทางค่าธรรมเนียมของการเป็นสมาชิกเท่านั้น. สมาชิกภาพของ Unicode Consortium เปิดกว้างสำหรับองค์กรหรือบุคคลใดๆ ในโลกที่ต้องการสนับสนุน Unicode Standard และช่วยเหลือการขยายตัวและการนำ Unicode ไปใช้งาน.
-สำหรับข้อมูลเพิ่มเติม, ให้ดูที่ Glossary, Sample Unicode-Enabled Products, Technical Introduction และ Useful Resources.
\ No newline at end of file
+สำหรับข้อมูลเพิ่มเติม, ให้ดูที่ Glossary, Sample Unicode-Enabled Products, Technical Introduction และ Useful Resources.
diff --git a/src/demo/share/jfc/CodePointIM/README_zh_CN.html b/src/demo/share/jfc/CodePointIM/README_zh_CN.html
index 782d4288f7e60..118e5a2109231 100644
--- a/src/demo/share/jfc/CodePointIM/README_zh_CN.html
+++ b/src/demo/share/jfc/CodePointIM/README_zh_CN.html
@@ -1,4 +1,4 @@
-
+
自述文件——代码点输入法
diff --git a/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java b/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java
index 320a1ce7e669a..b608c92494236 100644
--- a/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java
+++ b/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java
@@ -63,7 +63,7 @@ public CodePointInputMethodDescriptor() {
* Creates a new instance of the Code Point input method.
*
* @return a new instance of the Code Point input method
- * @exception Exception any exception that may occur while creating the
+ * @throws Exception any exception that may occur while creating the
* input method instance
*/
public InputMethod createInputMethod() throws Exception {
diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad
index 017dc0ed85fb1..1b128f2a0cec9 100644
--- a/src/hotspot/cpu/aarch64/aarch64.ad
+++ b/src/hotspot/cpu/aarch64/aarch64.ad
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2014, 2024, Red Hat, Inc. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
@@ -1742,7 +1742,7 @@ void MachPrologNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
st->print("mov rscratch1, #%d\n\t", framesize - 2 * wordSize);
st->print("sub sp, sp, rscratch1");
}
- if (C->stub_function() == nullptr && BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
+ if (C->stub_function() == nullptr) {
st->print("\n\t");
st->print("ldr rscratch1, [guard]\n\t");
st->print("dmb ishld\n\t");
@@ -1792,25 +1792,23 @@ void MachPrologNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
if (C->stub_function() == nullptr) {
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
- if (BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
- // Dummy labels for just measuring the code size
- Label dummy_slow_path;
- Label dummy_continuation;
- Label dummy_guard;
- Label* slow_path = &dummy_slow_path;
- Label* continuation = &dummy_continuation;
- Label* guard = &dummy_guard;
- if (!Compile::current()->output()->in_scratch_emit_size()) {
- // Use real labels from actual stub when not emitting code for the purpose of measuring its size
- C2EntryBarrierStub* stub = new (Compile::current()->comp_arena()) C2EntryBarrierStub();
- Compile::current()->output()->add_stub(stub);
- slow_path = &stub->entry();
- continuation = &stub->continuation();
- guard = &stub->guard();
- }
- // In the C2 code, we move the non-hot part of nmethod entry barriers out-of-line to a stub.
- bs->nmethod_entry_barrier(masm, slow_path, continuation, guard);
+ // Dummy labels for just measuring the code size
+ Label dummy_slow_path;
+ Label dummy_continuation;
+ Label dummy_guard;
+ Label* slow_path = &dummy_slow_path;
+ Label* continuation = &dummy_continuation;
+ Label* guard = &dummy_guard;
+ if (!Compile::current()->output()->in_scratch_emit_size()) {
+ // Use real labels from actual stub when not emitting code for the purpose of measuring its size
+ C2EntryBarrierStub* stub = new (Compile::current()->comp_arena()) C2EntryBarrierStub();
+ Compile::current()->output()->add_stub(stub);
+ slow_path = &stub->entry();
+ continuation = &stub->continuation();
+ guard = &stub->guard();
}
+ // In the C2 code, we move the non-hot part of nmethod entry barriers out-of-line to a stub.
+ bs->nmethod_entry_barrier(masm, slow_path, continuation, guard);
}
if (VerifyStackAtCalls) {
@@ -2298,6 +2296,26 @@ bool Matcher::match_rule_supported(int opcode) {
return false;
}
break;
+ case Op_FmaHF:
+ // UseFMA flag also needs to be checked along with FEAT_FP16
+ if (!UseFMA || !is_feat_fp16_supported()) {
+ return false;
+ }
+ break;
+ case Op_AddHF:
+ case Op_SubHF:
+ case Op_MulHF:
+ case Op_DivHF:
+ case Op_MinHF:
+ case Op_MaxHF:
+ case Op_SqrtHF:
+ // Half-precision floating point scalar operations require FEAT_FP16
+ // to be available. FEAT_FP16 is enabled if both "fphp" and "asimdhp"
+ // features are supported.
+ if (!is_feat_fp16_supported()) {
+ return false;
+ }
+ break;
}
return true; // Per default match rules are supported.
@@ -2308,11 +2326,11 @@ const RegMask* Matcher::predicate_reg_mask(void) {
}
bool Matcher::supports_vector_calling_convention(void) {
- return EnableVectorSupport && UseVectorStubs;
+ return EnableVectorSupport;
}
OptoRegPair Matcher::vector_return_value(uint ideal_reg) {
- assert(EnableVectorSupport && UseVectorStubs, "sanity");
+ assert(EnableVectorSupport, "sanity");
int lo = V0_num;
int hi = V0_H_num;
if (ideal_reg == Op_VecX || ideal_reg == Op_VecA) {
@@ -4541,6 +4559,7 @@ operand immByteMapBase()
%{
// Get base of card map
predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) &&
+ SHENANDOAHGC_ONLY(!BarrierSet::barrier_set()->is_a(BarrierSet::ShenandoahBarrierSet) &&)
(CardTable::CardValue*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
match(ConP);
@@ -4600,6 +4619,15 @@ operand immF0()
interface(CONST_INTER);
%}
+// Half Float (FP16) Immediate
+operand immH()
+%{
+ match(ConH);
+ op_cost(0);
+ format %{ %}
+ interface(CONST_INTER);
+%}
+
//
operand immFPacked()
%{
@@ -6943,6 +6971,21 @@ instruct loadConD(vRegD dst, immD con) %{
ins_pipe(fp_load_constant_d);
%}
+// Load Half Float Constant
+// The "ldr" instruction loads a 32-bit word from the constant pool into a
+// 32-bit register but only the bottom half will be populated and the top
+// 16 bits are zero.
+instruct loadConH(vRegF dst, immH con) %{
+ match(Set dst con);
+ format %{
+ "ldrs $dst, [$constantaddress]\t# load from constant table: half float=$con\n\t"
+ %}
+ ins_encode %{
+ __ ldrs(as_FloatRegister($dst$$reg), $constantaddress($con));
+ %}
+ ins_pipe(fp_load_constant_s);
+%}
+
// Store Instructions
// Store Byte
@@ -8145,6 +8188,7 @@ instruct castPP(iRegPNoSp dst)
instruct castII(iRegI dst)
%{
+ predicate(VerifyConstraintCasts == 0);
match(Set dst (CastII dst));
size(0);
@@ -8154,8 +8198,22 @@ instruct castII(iRegI dst)
ins_pipe(pipe_class_empty);
%}
+instruct castII_checked(iRegI dst, rFlagsReg cr)
+%{
+ predicate(VerifyConstraintCasts > 0);
+ match(Set dst (CastII dst));
+ effect(KILL cr);
+
+ format %{ "# castII_checked of $dst" %}
+ ins_encode %{
+ __ verify_int_in_range(_idx, bottom_type()->is_int(), $dst$$Register, rscratch1);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
instruct castLL(iRegL dst)
%{
+ predicate(VerifyConstraintCasts == 0);
match(Set dst (CastLL dst));
size(0);
@@ -8165,6 +8223,19 @@ instruct castLL(iRegL dst)
ins_pipe(pipe_class_empty);
%}
+instruct castLL_checked(iRegL dst, rFlagsReg cr)
+%{
+ predicate(VerifyConstraintCasts > 0);
+ match(Set dst (CastLL dst));
+ effect(KILL cr);
+
+ format %{ "# castLL_checked of $dst" %}
+ ins_encode %{
+ __ verify_long_in_range(_idx, bottom_type()->is_long(), $dst$$Register, rscratch1);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
instruct castFF(vRegF dst)
%{
match(Set dst (CastFF dst));
@@ -13607,6 +13678,17 @@ instruct bits_reverse_L(iRegLNoSp dst, iRegL src)
// ============================================================================
// Floating Point Arithmetic Instructions
+instruct addHF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
+ match(Set dst (AddHF src1 src2));
+ format %{ "faddh $dst, $src1, $src2" %}
+ ins_encode %{
+ __ faddh($dst$$FloatRegister,
+ $src1$$FloatRegister,
+ $src2$$FloatRegister);
+ %}
+ ins_pipe(fp_dop_reg_reg_s);
+%}
+
instruct addF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
match(Set dst (AddF src1 src2));
@@ -13637,6 +13719,17 @@ instruct addD_reg_reg(vRegD dst, vRegD src1, vRegD src2) %{
ins_pipe(fp_dop_reg_reg_d);
%}
+instruct subHF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
+ match(Set dst (SubHF src1 src2));
+ format %{ "fsubh $dst, $src1, $src2" %}
+ ins_encode %{
+ __ fsubh($dst$$FloatRegister,
+ $src1$$FloatRegister,
+ $src2$$FloatRegister);
+ %}
+ ins_pipe(fp_dop_reg_reg_s);
+%}
+
instruct subF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
match(Set dst (SubF src1 src2));
@@ -13667,6 +13760,17 @@ instruct subD_reg_reg(vRegD dst, vRegD src1, vRegD src2) %{
ins_pipe(fp_dop_reg_reg_d);
%}
+instruct mulHF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
+ match(Set dst (MulHF src1 src2));
+ format %{ "fmulh $dst, $src1, $src2" %}
+ ins_encode %{
+ __ fmulh($dst$$FloatRegister,
+ $src1$$FloatRegister,
+ $src2$$FloatRegister);
+ %}
+ ins_pipe(fp_dop_reg_reg_s);
+%}
+
instruct mulF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
match(Set dst (MulF src1 src2));
@@ -13697,6 +13801,20 @@ instruct mulD_reg_reg(vRegD dst, vRegD src1, vRegD src2) %{
ins_pipe(fp_dop_reg_reg_d);
%}
+// src1 * src2 + src3 (half-precision float)
+instruct maddHF_reg_reg(vRegF dst, vRegF src1, vRegF src2, vRegF src3) %{
+ match(Set dst (FmaHF src3 (Binary src1 src2)));
+ format %{ "fmaddh $dst, $src1, $src2, $src3" %}
+ ins_encode %{
+ assert(UseFMA, "Needs FMA instructions support.");
+ __ fmaddh($dst$$FloatRegister,
+ $src1$$FloatRegister,
+ $src2$$FloatRegister,
+ $src3$$FloatRegister);
+ %}
+ ins_pipe(pipe_class_default);
+%}
+
// src1 * src2 + src3
instruct maddF_reg_reg(vRegF dst, vRegF src1, vRegF src2, vRegF src3) %{
match(Set dst (FmaF src3 (Binary src1 src2)));
@@ -13838,6 +13956,29 @@ instruct mnsubD_reg_reg(vRegD dst, vRegD src1, vRegD src2, vRegD src3, immD0 zer
ins_pipe(pipe_class_default);
%}
+// Math.max(HH)H (half-precision float)
+instruct maxHF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
+ match(Set dst (MaxHF src1 src2));
+ format %{ "fmaxh $dst, $src1, $src2" %}
+ ins_encode %{
+ __ fmaxh($dst$$FloatRegister,
+ $src1$$FloatRegister,
+ $src2$$FloatRegister);
+ %}
+ ins_pipe(fp_dop_reg_reg_s);
+%}
+
+// Math.min(HH)H (half-precision float)
+instruct minHF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
+ match(Set dst (MinHF src1 src2));
+ format %{ "fminh $dst, $src1, $src2" %}
+ ins_encode %{
+ __ fminh($dst$$FloatRegister,
+ $src1$$FloatRegister,
+ $src2$$FloatRegister);
+ %}
+ ins_pipe(fp_dop_reg_reg_s);
+%}
// Math.max(FF)F
instruct maxF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
@@ -13895,6 +14036,16 @@ instruct minD_reg_reg(vRegD dst, vRegD src1, vRegD src2) %{
ins_pipe(fp_dop_reg_reg_d);
%}
+instruct divHF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
+ match(Set dst (DivHF src1 src2));
+ format %{ "fdivh $dst, $src1, $src2" %}
+ ins_encode %{
+ __ fdivh($dst$$FloatRegister,
+ $src1$$FloatRegister,
+ $src2$$FloatRegister);
+ %}
+ ins_pipe(fp_div_s);
+%}
instruct divF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
match(Set dst (DivF src1 src2));
@@ -14068,6 +14219,16 @@ instruct sqrtF_reg(vRegF dst, vRegF src) %{
ins_pipe(fp_div_d);
%}
+instruct sqrtHF_reg(vRegF dst, vRegF src) %{
+ match(Set dst (SqrtHF src));
+ format %{ "fsqrth $dst, $src" %}
+ ins_encode %{
+ __ fsqrth($dst$$FloatRegister,
+ $src$$FloatRegister);
+ %}
+ ins_pipe(fp_div_s);
+%}
+
// Math.rint, floor, ceil
instruct roundD_reg(vRegD dst, vRegD src, immI rmode) %{
match(Set dst (RoundDoubleMode src rmode));
@@ -16298,7 +16459,8 @@ instruct ShouldNotReachHere() %{
ins_encode %{
if (is_reachable()) {
- __ stop(_halt_reason);
+ const char* str = __ code_string(_halt_reason);
+ __ stop(str);
}
%}
@@ -17116,6 +17278,64 @@ instruct expandBitsL_memcon(iRegINoSp dst, memory8 mem, immL mask,
ins_pipe(pipe_slow);
%}
+//----------------------------- Reinterpret ----------------------------------
+// Reinterpret a half-precision float value in a floating point register to a general purpose register
+instruct reinterpretHF2S(iRegINoSp dst, vRegF src) %{
+ match(Set dst (ReinterpretHF2S src));
+ format %{ "reinterpretHF2S $dst, $src" %}
+ ins_encode %{
+ __ smov($dst$$Register, $src$$FloatRegister, __ H, 0);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// Reinterpret a half-precision float value in a general purpose register to a floating point register
+instruct reinterpretS2HF(vRegF dst, iRegINoSp src) %{
+ match(Set dst (ReinterpretS2HF src));
+ format %{ "reinterpretS2HF $dst, $src" %}
+ ins_encode %{
+ __ mov($dst$$FloatRegister, __ H, 0, $src$$Register);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// Without this optimization, ReinterpretS2HF (ConvF2HF src) would result in the following
+// instructions (the first two are for ConvF2HF and the last instruction is for ReinterpretS2HF) -
+// fcvt $tmp1_fpr, $src_fpr // Convert float to half-precision float
+// mov $tmp2_gpr, $tmp1_fpr // Move half-precision float in FPR to a GPR
+// mov $dst_fpr, $tmp2_gpr // Move the result from a GPR to an FPR
+// The move from FPR to GPR in ConvF2HF and the move from GPR to FPR in ReinterpretS2HF
+// can be omitted in this pattern, resulting in -
+// fcvt $dst, $src // Convert float to half-precision float
+instruct convF2HFAndS2HF(vRegF dst, vRegF src)
+%{
+ match(Set dst (ReinterpretS2HF (ConvF2HF src)));
+ format %{ "convF2HFAndS2HF $dst, $src" %}
+ ins_encode %{
+ __ fcvtsh($dst$$FloatRegister, $src$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// Without this optimization, ConvHF2F (ReinterpretHF2S src) would result in the following
+// instructions (the first one is for ReinterpretHF2S and the last two are for ConvHF2F) -
+// mov $tmp1_gpr, $src_fpr // Move the half-precision float from an FPR to a GPR
+// mov $tmp2_fpr, $tmp1_gpr // Move the same value from GPR to an FPR
+// fcvt $dst_fpr, $tmp2_fpr // Convert the half-precision float to 32-bit float
+// The move from FPR to GPR in ReinterpretHF2S and the move from GPR to FPR in ConvHF2F
+// can be omitted as the input (src) is already in an FPR required for the fcvths instruction
+// resulting in -
+// fcvt $dst, $src // Convert half-precision float to a 32-bit float
+instruct convHF2SAndHF2F(vRegF dst, vRegF src)
+%{
+ match(Set dst (ConvHF2F (ReinterpretHF2S src)));
+ format %{ "convHF2SAndHF2F $dst, $src" %}
+ ins_encode %{
+ __ fcvths($dst$$FloatRegister, $src$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
// ============================================================================
// This name is KNOWN by the ADLC and cannot be changed.
// The ADLC forces a 'TypeRawPtr::BOTTOM' output type
diff --git a/src/hotspot/cpu/aarch64/aarch64_vector.ad b/src/hotspot/cpu/aarch64/aarch64_vector.ad
index d217fb7e94987..c7a0fc5724b2c 100644
--- a/src/hotspot/cpu/aarch64/aarch64_vector.ad
+++ b/src/hotspot/cpu/aarch64/aarch64_vector.ad
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2020, 2024, Arm Limited. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
@@ -204,12 +204,6 @@ source %{
return false;
}
break;
- case Op_VectorLoadShuffle:
- case Op_VectorRearrange:
- if (vlen < 4) {
- return false;
- }
- break;
case Op_ExpandV:
if (UseSVE < 2 || is_subword_type(bt)) {
return false;
@@ -254,6 +248,13 @@ source %{
case Op_CompressBitsV:
case Op_ExpandBitsV:
return false;
+ case Op_SaturatingAddV:
+ case Op_SaturatingSubV:
+ // Only SVE2 supports the predicated saturating instructions.
+ if (UseSVE < 2) {
+ return false;
+ }
+ break;
// We use Op_LoadVectorMasked to implement the predicated Op_LoadVector.
// Hence we turn to check whether Op_LoadVectorMasked is supported. The
// same as vector store/gather/scatter.
@@ -1539,6 +1540,142 @@ instruct vand_notL_masked(vReg dst_src1, vReg src2, immL_M1 m1, pRegGov pg) %{
ins_pipe(pipe_slow);
%}
+// ------------------------- Vector saturating add -----------------------------
+
+// Signed saturating add
+
+instruct vsqadd(vReg dst, vReg src1, vReg src2) %{
+ predicate(!n->as_SaturatingVector()->is_unsigned());
+ match(Set dst (SaturatingAddV src1 src2));
+ format %{ "vsqadd $dst, $src1, $src2" %}
+ ins_encode %{
+ uint length_in_bytes = Matcher::vector_length_in_bytes(this);
+ if (VM_Version::use_neon_for_vector(length_in_bytes)) {
+ __ sqaddv($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ } else {
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_sqadd($dst$$FloatRegister, __ elemType_to_regVariant(bt),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ }
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vsqadd_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE == 2 && !n->as_SaturatingVector()->is_unsigned());
+ match(Set dst_src1 (SaturatingAddV (Binary dst_src1 src2) pg));
+ format %{ "vsqadd_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_sqadd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// Unsigned saturating add
+
+instruct vuqadd(vReg dst, vReg src1, vReg src2) %{
+ predicate(n->as_SaturatingVector()->is_unsigned());
+ match(Set dst (SaturatingAddV src1 src2));
+ format %{ "vuqadd $dst, $src1, $src2" %}
+ ins_encode %{
+ uint length_in_bytes = Matcher::vector_length_in_bytes(this);
+ if (VM_Version::use_neon_for_vector(length_in_bytes)) {
+ __ uqaddv($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ } else {
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_uqadd($dst$$FloatRegister, __ elemType_to_regVariant(bt),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ }
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vuqadd_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE == 2 && n->as_SaturatingVector()->is_unsigned());
+ match(Set dst_src1 (SaturatingAddV (Binary dst_src1 src2) pg));
+ format %{ "vuqadd_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_uqadd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// ------------------------- Vector saturating sub -----------------------------
+
+// Signed saturating sub
+
+instruct vsqsub(vReg dst, vReg src1, vReg src2) %{
+ predicate(!n->as_SaturatingVector()->is_unsigned());
+ match(Set dst (SaturatingSubV src1 src2));
+ format %{ "vsqsub $dst, $src1, $src2" %}
+ ins_encode %{
+ uint length_in_bytes = Matcher::vector_length_in_bytes(this);
+ if (VM_Version::use_neon_for_vector(length_in_bytes)) {
+ __ sqsubv($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ } else {
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_sqsub($dst$$FloatRegister, __ elemType_to_regVariant(bt),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ }
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vsqsub_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE == 2 && !n->as_SaturatingVector()->is_unsigned());
+ match(Set dst_src1 (SaturatingSubV (Binary dst_src1 src2) pg));
+ format %{ "vsqsub_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_sqsub($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// Unsigned saturating sub
+
+instruct vuqsub(vReg dst, vReg src1, vReg src2) %{
+ predicate(n->as_SaturatingVector()->is_unsigned());
+ match(Set dst (SaturatingSubV src1 src2));
+ format %{ "vuqsub $dst, $src1, $src2" %}
+ ins_encode %{
+ uint length_in_bytes = Matcher::vector_length_in_bytes(this);
+ if (VM_Version::use_neon_for_vector(length_in_bytes)) {
+ __ uqsubv($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ } else {
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_uqsub($dst$$FloatRegister, __ elemType_to_regVariant(bt),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ }
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vuqsub_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE == 2 && n->as_SaturatingVector()->is_unsigned());
+ match(Set dst_src1 (SaturatingSubV (Binary dst_src1 src2) pg));
+ format %{ "vuqsub_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_uqsub($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
// ------------------------------ Vector abs -----------------------------------
// vector abs
@@ -1993,6 +2130,76 @@ instruct vmin_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
ins_pipe(pipe_slow);
%}
+// vector unsigned min - LONG
+
+instruct vuminL_neon(vReg dst, vReg src1, vReg src2) %{
+ predicate(UseSVE == 0 && Matcher::vector_element_basic_type(n) == T_LONG);
+ match(Set dst (UMinV src1 src2));
+ effect(TEMP_DEF dst);
+ format %{ "vuminL_neon $dst, $src1, $src2\t# 2L" %}
+ ins_encode %{
+ __ cm(Assembler::HI, $dst$$FloatRegister, __ T2D, $src1$$FloatRegister, $src2$$FloatRegister);
+ __ bsl($dst$$FloatRegister, __ T16B, $src2$$FloatRegister, $src1$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vuminL_sve(vReg dst_src1, vReg src2) %{
+ predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_LONG);
+ match(Set dst_src1 (UMinV dst_src1 src2));
+ format %{ "vuminL_sve $dst_src1, $dst_src1, $src2" %}
+ ins_encode %{
+ __ sve_umin($dst_src1$$FloatRegister, __ D, ptrue, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// vector unsigned min - B/S/I
+
+instruct vumin_neon(vReg dst, vReg src1, vReg src2) %{
+ predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
+ VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
+ match(Set dst (UMinV src1 src2));
+ format %{ "vumin_neon $dst, $src1, $src2\t# B/S/I" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt) && bt != T_LONG, "unsupported type");
+ __ uminv($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vumin_sve(vReg dst_src1, vReg src2) %{
+ predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
+ !VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
+ match(Set dst_src1 (UMinV dst_src1 src2));
+ format %{ "vumin_sve $dst_src1, $dst_src1, $src2\t# B/S/I" %}
+ ins_encode %{
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt) && bt != T_LONG, "unsupported type");
+ __ sve_umin($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ ptrue, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// vector unsigned min - predicated
+
+instruct vumin_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE > 0);
+ match(Set dst_src1 (UMinV (Binary dst_src1 src2) pg));
+ format %{ "vumin_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt), "unsupported type");
+ __ sve_umin($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
// ------------------------------ Vector max -----------------------------------
// vector max - LONG
@@ -2080,6 +2287,76 @@ instruct vmax_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
ins_pipe(pipe_slow);
%}
+// vector unsigned max - LONG
+
+instruct vumaxL_neon(vReg dst, vReg src1, vReg src2) %{
+ predicate(UseSVE == 0 && Matcher::vector_element_basic_type(n) == T_LONG);
+ match(Set dst (UMaxV src1 src2));
+ effect(TEMP_DEF dst);
+ format %{ "vumaxL_neon $dst, $src1, $src2\t# 2L" %}
+ ins_encode %{
+ __ cm(Assembler::HI, $dst$$FloatRegister, __ T2D, $src1$$FloatRegister, $src2$$FloatRegister);
+ __ bsl($dst$$FloatRegister, __ T16B, $src1$$FloatRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vumaxL_sve(vReg dst_src1, vReg src2) %{
+ predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_LONG);
+ match(Set dst_src1 (UMaxV dst_src1 src2));
+ format %{ "vumaxL_sve $dst_src1, $dst_src1, $src2" %}
+ ins_encode %{
+ __ sve_umax($dst_src1$$FloatRegister, __ D, ptrue, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// vector unsigned max - B/S/I
+
+instruct vumax_neon(vReg dst, vReg src1, vReg src2) %{
+ predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
+ VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
+ match(Set dst (UMaxV src1 src2));
+ format %{ "vumax_neon $dst, $src1, $src2\t# B/S/I" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt) && bt != T_LONG, "unsupported type");
+ __ umaxv($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct vumax_sve(vReg dst_src1, vReg src2) %{
+ predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
+ !VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
+ match(Set dst_src1 (UMaxV dst_src1 src2));
+ format %{ "vumax_sve $dst_src1, $dst_src1, $src2\t# B/S/I" %}
+ ins_encode %{
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt) && bt != T_LONG, "unsupported type");
+ __ sve_umax($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ ptrue, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+// vector unsigned max - predicated
+
+instruct vumax_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE > 0);
+ match(Set dst_src1 (UMaxV (Binary dst_src1 src2) pg));
+ format %{ "vumax_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt), "unsupported type");
+ __ sve_umax($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
// ------------------------------ MLA RELATED ----------------------------------
// vector mla
@@ -6156,61 +6433,24 @@ instruct vtest_alltrue_sve(rFlagsReg cr, pReg src1, pReg src2, pReg ptmp) %{
// ------------------------------ Vector rearrange -----------------------------
-// Here is an example that rearranges a NEON vector with 4 ints:
-// Rearrange V1 int[a0, a1, a2, a3] to V2 int[a2, a3, a0, a1]
-// 1. Get the indices of V1 and store them as Vi byte[0, 1, 2, 3].
-// 2. Convert Vi byte[0, 1, 2, 3] to the indices of V2 and also store them as Vi byte[2, 3, 0, 1].
-// 3. Unsigned extend Long Vi from byte[2, 3, 0, 1] to int[2, 3, 0, 1].
-// 4. Multiply Vi int[2, 3, 0, 1] with constant int[0x04040404, 0x04040404, 0x04040404, 0x04040404]
-// and get tbl base Vm int[0x08080808, 0x0c0c0c0c, 0x00000000, 0x04040404].
-// 5. Add Vm with constant int[0x03020100, 0x03020100, 0x03020100, 0x03020100]
-// and get tbl index Vm int[0x0b0a0908, 0x0f0e0d0c, 0x03020100, 0x07060504]
-// 6. Use Vm as index register, and use V1 as table register.
-// Then get V2 as the result by tbl NEON instructions.
-// Notes:
-// Step 1 matches VectorLoadConst.
-// Step 3 matches VectorLoadShuffle.
-// Step 4, 5, 6 match VectorRearrange.
-// For VectorRearrange short/int, the reason why such complex calculation is
-// required is because NEON tbl supports bytes table only, so for short/int, we
-// need to lookup 2/4 bytes as a group. For VectorRearrange long, we use bsl
-// to implement rearrange.
-
-// Maybe move the shuffle preparation to VectorLoadShuffle
-instruct rearrange_HS_neon(vReg dst, vReg src, vReg shuffle, vReg tmp1, vReg tmp2) %{
- predicate(UseSVE == 0 &&
- (Matcher::vector_element_basic_type(n) == T_SHORT ||
- (type2aelembytes(Matcher::vector_element_basic_type(n)) == 4 &&
- Matcher::vector_length_in_bytes(n) == 16)));
+instruct rearrange_HSD_neon(vReg dst, vReg src, vReg shuffle, vReg tmp) %{
+ predicate(UseSVE == 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
match(Set dst (VectorRearrange src shuffle));
- effect(TEMP_DEF dst, TEMP tmp1, TEMP tmp2);
- format %{ "rearrange_HS_neon $dst, $src, $shuffle\t# vector (4S/8S/4I/4F). KILL $tmp1, $tmp2" %}
+ effect(TEMP_DEF dst, TEMP tmp);
+ format %{ "rearrange_HSD_neon $dst, $src, $shuffle\t# vector (4H/8H/2S/4S/2D). KILL $tmp" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
- if (bt == T_SHORT) {
- uint length_in_bytes = Matcher::vector_length_in_bytes(this);
- assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
- Assembler::SIMD_Arrangement size1 = length_in_bytes == 16 ? __ T16B : __ T8B;
- Assembler::SIMD_Arrangement size2 = length_in_bytes == 16 ? __ T8H : __ T4H;
- __ mov($tmp1$$FloatRegister, size1, 0x02);
- __ mov($tmp2$$FloatRegister, size2, 0x0100);
- __ mulv($dst$$FloatRegister, size2, $shuffle$$FloatRegister, $tmp1$$FloatRegister);
- __ addv($dst$$FloatRegister, size1, $dst$$FloatRegister, $tmp2$$FloatRegister);
- __ tbl($dst$$FloatRegister, size1, $src$$FloatRegister, 1, $dst$$FloatRegister);
- } else {
- assert(bt == T_INT || bt == T_FLOAT, "unsupported type");
- __ mov($tmp1$$FloatRegister, __ T16B, 0x04);
- __ mov($tmp2$$FloatRegister, __ T4S, 0x03020100);
- __ mulv($dst$$FloatRegister, __ T4S, $shuffle$$FloatRegister, $tmp1$$FloatRegister);
- __ addv($dst$$FloatRegister, __ T16B, $dst$$FloatRegister, $tmp2$$FloatRegister);
- __ tbl($dst$$FloatRegister, __ T16B, $src$$FloatRegister, 1, $dst$$FloatRegister);
- }
+ uint length_in_bytes = Matcher::vector_length_in_bytes(this);
+ assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
+ __ neon_rearrange_hsd($dst$$FloatRegister, $src$$FloatRegister,
+ $shuffle$$FloatRegister, $tmp$$FloatRegister,
+ bt, length_in_bytes == 16);
%}
ins_pipe(pipe_slow);
%}
instruct rearrange(vReg dst, vReg src, vReg shuffle) %{
- predicate(Matcher::vector_element_basic_type(n) == T_BYTE || UseSVE > 0);
+ predicate(UseSVE > 0 || Matcher::vector_element_basic_type(n) == T_BYTE);
match(Set dst (VectorRearrange src shuffle));
format %{ "rearrange $dst, $src, $shuffle" %}
ins_encode %{
diff --git a/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4 b/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4
index 422e98d9b681a..171bc39054549 100644
--- a/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4
+++ b/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2020, 2024, Arm Limited. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
@@ -194,12 +194,6 @@ source %{
return false;
}
break;
- case Op_VectorLoadShuffle:
- case Op_VectorRearrange:
- if (vlen < 4) {
- return false;
- }
- break;
case Op_ExpandV:
if (UseSVE < 2 || is_subword_type(bt)) {
return false;
@@ -244,6 +238,13 @@ source %{
case Op_CompressBitsV:
case Op_ExpandBitsV:
return false;
+ case Op_SaturatingAddV:
+ case Op_SaturatingSubV:
+ // Only SVE2 supports the predicated saturating instructions.
+ if (UseSVE < 2) {
+ return false;
+ }
+ break;
// We use Op_LoadVectorMasked to implement the predicated Op_LoadVector.
// Hence we turn to check whether Op_LoadVectorMasked is supported. The
// same as vector store/gather/scatter.
@@ -813,6 +814,65 @@ dnl
VECTOR_AND_NOT_PREDICATE(I)
VECTOR_AND_NOT_PREDICATE(L)
+dnl
+dnl VECTOR_SATURATING_OP($1, $2, $3 )
+dnl VECTOR_SATURATING_OP(prefix, op, op_name)
+define(`VECTOR_SATURATING_OP', `
+instruct v$1$2(vReg dst, vReg src1, vReg src2) %{
+ predicate(ifelse($1, sq, `!',`')n->as_SaturatingVector()->is_unsigned());
+ match(Set dst ($3 src1 src2));
+ format %{ "v$1$2 $dst, $src1, $src2" %}
+ ins_encode %{
+ uint length_in_bytes = Matcher::vector_length_in_bytes(this);
+ if (VM_Version::use_neon_for_vector(length_in_bytes)) {
+ __ $1$2v($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ } else {
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_$1$2($dst$$FloatRegister, __ elemType_to_regVariant(bt),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ }
+ %}
+ ins_pipe(pipe_slow);
+%}')dnl
+dnl
+dnl
+dnl VECTOR_SATURATING_PREDICATE($1, $2, $3 )
+dnl VECTOR_SATURATING_PREDICATE(prefix, op, op_name)
+define(`VECTOR_SATURATING_PREDICATE', `
+instruct v$1$2_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE == 2 && ifelse($1, sq, `!',`')n->as_SaturatingVector()->is_unsigned());
+ match(Set dst_src1 ($3 (Binary dst_src1 src2) pg));
+ format %{ "v$1$2_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ __ sve_$1$2($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}')dnl
+dnl
+// ------------------------- Vector saturating add -----------------------------
+
+// Signed saturating add
+VECTOR_SATURATING_OP(sq, add, SaturatingAddV)
+VECTOR_SATURATING_PREDICATE(sq, add, SaturatingAddV)
+
+// Unsigned saturating add
+VECTOR_SATURATING_OP(uq, add, SaturatingAddV)
+VECTOR_SATURATING_PREDICATE(uq, add, SaturatingAddV)
+
+// ------------------------- Vector saturating sub -----------------------------
+
+// Signed saturating sub
+VECTOR_SATURATING_OP(sq, sub, SaturatingSubV)
+VECTOR_SATURATING_PREDICATE(sq, sub, SaturatingSubV)
+
+// Unsigned saturating sub
+VECTOR_SATURATING_OP(uq, sub, SaturatingSubV)
+VECTOR_SATURATING_PREDICATE(uq, sub, SaturatingSubV)
+
dnl
dnl UNARY_OP($1, $2, $3, $4, $5 )
dnl UNARY_OP(rule_name, op_name, insn_neon, insn_sve, size)
@@ -964,17 +1024,17 @@ UNARY_OP_PREDICATE_WITH_SIZE(vsqrtF, SqrtVF, sve_fsqrt, S)
UNARY_OP_PREDICATE_WITH_SIZE(vsqrtD, SqrtVD, sve_fsqrt, D)
dnl
-dnl VMINMAX_L_NEON($1, $2 )
-dnl VMINMAX_L_NEON(type, op_name)
+dnl VMINMAX_L_NEON($1, $2 , $3 )
+dnl VMINMAX_L_NEON(type, op_name, sign)
define(`VMINMAX_L_NEON', `
-instruct v$1L_neon(vReg dst, vReg src1, vReg src2) %{
+instruct v$3$1L_neon(vReg dst, vReg src1, vReg src2) %{
predicate(UseSVE == 0 && Matcher::vector_element_basic_type(n) == T_LONG);
match(Set dst ($2 src1 src2));
effect(TEMP_DEF dst);
- format %{ "v$1L_neon $dst, $src1, $src2\t# 2L" %}
+ format %{ "v$3$1L_neon $dst, $src1, $src2\t# 2L" %}
ins_encode %{
- __ cm(Assembler::GT, $dst$$FloatRegister, __ T2D, $src1$$FloatRegister, $src2$$FloatRegister);
- __ bsl($dst$$FloatRegister, __ T16B, ifelse(min, $1, $src2, $src1)$$FloatRegister, ifelse(min, $1, $src1, $src2)$$FloatRegister);
+ __ cm(Assembler::ifelse($3, u, HI, GT), $dst$$FloatRegister, __ T2D, $src1$$FloatRegister, $src2$$FloatRegister);
+ __ bsl($dst$$FloatRegister, __ T16B, ifelse($1, min, $src2, $src1)$$FloatRegister, ifelse(min, $1, $src1, $src2)$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}')dnl
@@ -1058,6 +1118,57 @@ instruct v$1_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
ins_pipe(pipe_slow);
%}')dnl
dnl
+dnl VUMINMAX_NEON($1, $2, $3 )
+dnl VUMINMAX_NEON(type, op_name, insn)
+define(`VUMINMAX_NEON', `
+instruct v$1_neon(vReg dst, vReg src1, vReg src2) %{
+ predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
+ VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
+ match(Set dst ($2 src1 src2));
+ format %{ "v$1_neon $dst, $src1, $src2\t# B/S/I" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt) && bt != T_LONG, "unsupported type");
+ __ $3($dst$$FloatRegister, get_arrangement(this),
+ $src1$$FloatRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}')dnl
+dnl
+dnl VUMINMAX_SVE($1, $2, $3 )
+dnl VUMINMAX_SVE(type, op_name, insn)
+define(`VUMINMAX_SVE', `
+instruct v$1_sve(vReg dst_src1, vReg src2) %{
+ predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
+ !VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
+ match(Set dst_src1 ($2 dst_src1 src2));
+ format %{ "v$1_sve $dst_src1, $dst_src1, $src2\t# B/S/I" %}
+ ins_encode %{
+ assert(UseSVE > 0, "must be sve");
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt) && bt != T_LONG, "unsupported type");
+ __ $3($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ ptrue, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}')dnl
+dnl
+dnl VUMINMAX_PREDICATE($1, $2, $3 )
+dnl VUMINMAX_PREDICATE(type, op_name, insn)
+define(`VUMINMAX_PREDICATE', `
+instruct v$1_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
+ predicate(UseSVE > 0);
+ match(Set dst_src1 ($2 (Binary dst_src1 src2) pg));
+ format %{ "v$1_masked $dst_src1, $pg, $dst_src1, $src2" %}
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ assert(is_integral_type(bt), "unsupported type");
+ __ $3($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
+ $pg$$PRegister, $src2$$FloatRegister);
+ %}
+ ins_pipe(pipe_slow);
+%}')dnl
+dnl
// ------------------------------ Vector min -----------------------------------
// vector min - LONG
@@ -1071,6 +1182,17 @@ VMINMAX_SVE(min, MinV, sve_fmin, sve_smin)
// vector min - predicated
VMINMAX_PREDICATE(min, MinV, sve_fmin, sve_smin)
+// vector unsigned min - LONG
+VMINMAX_L_NEON(min, UMinV, u)
+VMINMAX_L_SVE(umin, UMinV, sve_umin)
+
+// vector unsigned min - B/S/I
+VUMINMAX_NEON(umin, UMinV, uminv)
+VUMINMAX_SVE(umin, UMinV, sve_umin)
+
+// vector unsigned min - predicated
+VUMINMAX_PREDICATE(umin, UMinV, sve_umin)
+
// ------------------------------ Vector max -----------------------------------
// vector max - LONG
@@ -1084,6 +1206,17 @@ VMINMAX_SVE(max, MaxV, sve_fmax, sve_smax)
// vector max - predicated
VMINMAX_PREDICATE(max, MaxV, sve_fmax, sve_smax)
+// vector unsigned max - LONG
+VMINMAX_L_NEON(max, UMaxV, u)
+VMINMAX_L_SVE(umax, UMaxV, sve_umax)
+
+// vector unsigned max - B/S/I
+VUMINMAX_NEON(umax, UMaxV, umaxv)
+VUMINMAX_SVE(umax, UMaxV, sve_umax)
+
+// vector unsigned max - predicated
+VUMINMAX_PREDICATE(umax, UMaxV, sve_umax)
+
// ------------------------------ MLA RELATED ----------------------------------
// vector mla
@@ -4403,61 +4536,24 @@ instruct vtest_alltrue_sve(rFlagsReg cr, pReg src1, pReg src2, pReg ptmp) %{
// ------------------------------ Vector rearrange -----------------------------
-// Here is an example that rearranges a NEON vector with 4 ints:
-// Rearrange V1 int[a0, a1, a2, a3] to V2 int[a2, a3, a0, a1]
-// 1. Get the indices of V1 and store them as Vi byte[0, 1, 2, 3].
-// 2. Convert Vi byte[0, 1, 2, 3] to the indices of V2 and also store them as Vi byte[2, 3, 0, 1].
-// 3. Unsigned extend Long Vi from byte[2, 3, 0, 1] to int[2, 3, 0, 1].
-// 4. Multiply Vi int[2, 3, 0, 1] with constant int[0x04040404, 0x04040404, 0x04040404, 0x04040404]
-// and get tbl base Vm int[0x08080808, 0x0c0c0c0c, 0x00000000, 0x04040404].
-// 5. Add Vm with constant int[0x03020100, 0x03020100, 0x03020100, 0x03020100]
-// and get tbl index Vm int[0x0b0a0908, 0x0f0e0d0c, 0x03020100, 0x07060504]
-// 6. Use Vm as index register, and use V1 as table register.
-// Then get V2 as the result by tbl NEON instructions.
-// Notes:
-// Step 1 matches VectorLoadConst.
-// Step 3 matches VectorLoadShuffle.
-// Step 4, 5, 6 match VectorRearrange.
-// For VectorRearrange short/int, the reason why such complex calculation is
-// required is because NEON tbl supports bytes table only, so for short/int, we
-// need to lookup 2/4 bytes as a group. For VectorRearrange long, we use bsl
-// to implement rearrange.
-
-// Maybe move the shuffle preparation to VectorLoadShuffle
-instruct rearrange_HS_neon(vReg dst, vReg src, vReg shuffle, vReg tmp1, vReg tmp2) %{
- predicate(UseSVE == 0 &&
- (Matcher::vector_element_basic_type(n) == T_SHORT ||
- (type2aelembytes(Matcher::vector_element_basic_type(n)) == 4 &&
- Matcher::vector_length_in_bytes(n) == 16)));
+instruct rearrange_HSD_neon(vReg dst, vReg src, vReg shuffle, vReg tmp) %{
+ predicate(UseSVE == 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
match(Set dst (VectorRearrange src shuffle));
- effect(TEMP_DEF dst, TEMP tmp1, TEMP tmp2);
- format %{ "rearrange_HS_neon $dst, $src, $shuffle\t# vector (4S/8S/4I/4F). KILL $tmp1, $tmp2" %}
+ effect(TEMP_DEF dst, TEMP tmp);
+ format %{ "rearrange_HSD_neon $dst, $src, $shuffle\t# vector (4H/8H/2S/4S/2D). KILL $tmp" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
- if (bt == T_SHORT) {
- uint length_in_bytes = Matcher::vector_length_in_bytes(this);
- assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
- Assembler::SIMD_Arrangement size1 = length_in_bytes == 16 ? __ T16B : __ T8B;
- Assembler::SIMD_Arrangement size2 = length_in_bytes == 16 ? __ T8H : __ T4H;
- __ mov($tmp1$$FloatRegister, size1, 0x02);
- __ mov($tmp2$$FloatRegister, size2, 0x0100);
- __ mulv($dst$$FloatRegister, size2, $shuffle$$FloatRegister, $tmp1$$FloatRegister);
- __ addv($dst$$FloatRegister, size1, $dst$$FloatRegister, $tmp2$$FloatRegister);
- __ tbl($dst$$FloatRegister, size1, $src$$FloatRegister, 1, $dst$$FloatRegister);
- } else {
- assert(bt == T_INT || bt == T_FLOAT, "unsupported type");
- __ mov($tmp1$$FloatRegister, __ T16B, 0x04);
- __ mov($tmp2$$FloatRegister, __ T4S, 0x03020100);
- __ mulv($dst$$FloatRegister, __ T4S, $shuffle$$FloatRegister, $tmp1$$FloatRegister);
- __ addv($dst$$FloatRegister, __ T16B, $dst$$FloatRegister, $tmp2$$FloatRegister);
- __ tbl($dst$$FloatRegister, __ T16B, $src$$FloatRegister, 1, $dst$$FloatRegister);
- }
+ uint length_in_bytes = Matcher::vector_length_in_bytes(this);
+ assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
+ __ neon_rearrange_hsd($dst$$FloatRegister, $src$$FloatRegister,
+ $shuffle$$FloatRegister, $tmp$$FloatRegister,
+ bt, length_in_bytes == 16);
%}
ins_pipe(pipe_slow);
%}
instruct rearrange(vReg dst, vReg src, vReg shuffle) %{
- predicate(Matcher::vector_element_basic_type(n) == T_BYTE || UseSVE > 0);
+ predicate(UseSVE > 0 || Matcher::vector_element_basic_type(n) == T_BYTE);
match(Set dst (VectorRearrange src shuffle));
format %{ "rearrange $dst, $src, $shuffle" %}
ins_encode %{
diff --git a/src/hotspot/cpu/aarch64/abstractInterpreter_aarch64.cpp b/src/hotspot/cpu/aarch64/abstractInterpreter_aarch64.cpp
index a3c729fdd56e7..b543c96f3b81b 100644
--- a/src/hotspot/cpu/aarch64/abstractInterpreter_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/abstractInterpreter_aarch64.cpp
@@ -149,7 +149,8 @@ void AbstractInterpreter::layout_activation(Method* method,
#ifdef ASSERT
if (caller->is_interpreted_frame()) {
- assert(locals < caller->fp() + frame::interpreter_frame_initial_sp_offset, "bad placement");
+ assert(locals <= caller->interpreter_frame_expression_stack(), "bad placement");
+ assert(locals >= interpreter_frame->sender_sp() + max_locals - 1, "bad placement");
}
#endif
diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
index a5e0e2665af92..5c02e30963eaa 100644
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2024, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -2032,6 +2032,8 @@ void mvnw(Register Rd, Register Rm,
INSN(fsqrtd, 0b01, 0b000011);
INSN(fcvtd, 0b01, 0b000100); // Double-precision to single-precision
+ INSN(fsqrth, 0b11, 0b000011); // Half-precision sqrt
+
private:
void _fcvt_narrow_extend(FloatRegister Vd, SIMD_Arrangement Ta,
FloatRegister Vn, SIMD_Arrangement Tb, bool do_extend) {
@@ -2059,37 +2061,68 @@ void mvnw(Register Rd, Register Rm,
#undef INSN
// Floating-point data-processing (2 source)
- void data_processing(unsigned op31, unsigned type, unsigned opcode,
+ void data_processing(unsigned op31, unsigned type, unsigned opcode, unsigned op21,
FloatRegister Vd, FloatRegister Vn, FloatRegister Vm) {
starti;
f(op31, 31, 29);
f(0b11110, 28, 24);
- f(type, 23, 22), f(1, 21), f(opcode, 15, 10);
+ f(type, 23, 22), f(op21, 21), f(opcode, 15, 10);
rf(Vm, 16), rf(Vn, 5), rf(Vd, 0);
}
-#define INSN(NAME, op31, type, opcode) \
+#define INSN(NAME, op31, type, opcode, op21) \
void NAME(FloatRegister Vd, FloatRegister Vn, FloatRegister Vm) { \
- data_processing(op31, type, opcode, Vd, Vn, Vm); \
- }
-
- INSN(fabds, 0b011, 0b10, 0b110101);
- INSN(fmuls, 0b000, 0b00, 0b000010);
- INSN(fdivs, 0b000, 0b00, 0b000110);
- INSN(fadds, 0b000, 0b00, 0b001010);
- INSN(fsubs, 0b000, 0b00, 0b001110);
- INSN(fmaxs, 0b000, 0b00, 0b010010);
- INSN(fmins, 0b000, 0b00, 0b010110);
- INSN(fnmuls, 0b000, 0b00, 0b100010);
-
- INSN(fabdd, 0b011, 0b11, 0b110101);
- INSN(fmuld, 0b000, 0b01, 0b000010);
- INSN(fdivd, 0b000, 0b01, 0b000110);
- INSN(faddd, 0b000, 0b01, 0b001010);
- INSN(fsubd, 0b000, 0b01, 0b001110);
- INSN(fmaxd, 0b000, 0b01, 0b010010);
- INSN(fmind, 0b000, 0b01, 0b010110);
- INSN(fnmuld, 0b000, 0b01, 0b100010);
+ data_processing(op31, type, opcode, op21, Vd, Vn, Vm); \
+ }
+
+ INSN(fmuls, 0b000, 0b00, 0b000010, 0b1);
+ INSN(fdivs, 0b000, 0b00, 0b000110, 0b1);
+ INSN(fadds, 0b000, 0b00, 0b001010, 0b1);
+ INSN(fsubs, 0b000, 0b00, 0b001110, 0b1);
+ INSN(fmaxs, 0b000, 0b00, 0b010010, 0b1);
+ INSN(fmins, 0b000, 0b00, 0b010110, 0b1);
+ INSN(fnmuls, 0b000, 0b00, 0b100010, 0b1);
+
+ INSN(fmuld, 0b000, 0b01, 0b000010, 0b1);
+ INSN(fdivd, 0b000, 0b01, 0b000110, 0b1);
+ INSN(faddd, 0b000, 0b01, 0b001010, 0b1);
+ INSN(fsubd, 0b000, 0b01, 0b001110, 0b1);
+ INSN(fmaxd, 0b000, 0b01, 0b010010, 0b1);
+ INSN(fmind, 0b000, 0b01, 0b010110, 0b1);
+ INSN(fnmuld, 0b000, 0b01, 0b100010, 0b1);
+
+ // Half-precision floating-point instructions
+ INSN(fmulh, 0b000, 0b11, 0b000010, 0b1);
+ INSN(fdivh, 0b000, 0b11, 0b000110, 0b1);
+ INSN(faddh, 0b000, 0b11, 0b001010, 0b1);
+ INSN(fsubh, 0b000, 0b11, 0b001110, 0b1);
+ INSN(fmaxh, 0b000, 0b11, 0b010010, 0b1);
+ INSN(fminh, 0b000, 0b11, 0b010110, 0b1);
+ INSN(fnmulh, 0b000, 0b11, 0b100010, 0b1);
+#undef INSN
+
+// Advanced SIMD scalar three same
+#define INSN(NAME, U, size, opcode) \
+ void NAME(FloatRegister Vd, FloatRegister Vn, FloatRegister Vm) { \
+ starti; \
+ f(0b01, 31, 30), f(U, 29), f(0b11110, 28, 24), f(size, 23, 22), f(1, 21); \
+ rf(Vm, 16), f(opcode, 15, 11), f(1, 10), rf(Vn, 5), rf(Vd, 0); \
+ }
+
+ INSN(fabds, 0b1, 0b10, 0b11010); // Floating-point Absolute Difference (single-precision)
+ INSN(fabdd, 0b1, 0b11, 0b11010); // Floating-point Absolute Difference (double-precision)
+
+#undef INSN
+
+// Advanced SIMD scalar three same FP16
+#define INSN(NAME, U, a, opcode) \
+ void NAME(FloatRegister Vd, FloatRegister Vn, FloatRegister Vm) { \
+ starti; \
+ f(0b01, 31, 30), f(U, 29), f(0b11110, 28, 24), f(a, 23), f(0b10, 22, 21); \
+ rf(Vm, 16), f(0b00, 15, 14), f(opcode, 13, 11), f(1, 10), rf(Vn, 5), rf(Vd, 0); \
+ }
+
+ INSN(fabdh, 0b1, 0b1, 0b010); // Floating-point Absolute Difference (half-precision float)
#undef INSN
@@ -2120,6 +2153,7 @@ void mvnw(Register Rd, Register Rm,
INSN(fnmaddd, 0b000, 0b01, 1, 0);
INSN(fnmsub, 0b000, 0b01, 1, 1);
+ INSN(fmaddh, 0b000, 0b11, 0, 0); // half-precision fused multiply-add (scalar)
#undef INSN
// Floating-point conditional select
@@ -2552,6 +2586,11 @@ template
ldst_sstr(T, index, a, op1, op2, Vt, Vt2, Vt3, Vt4); \
}
+ INSN1(ld1, 0b001101010, 0b0000);
+ INSN2(ld2, 0b001101011, 0b0000);
+ INSN3(ld3, 0b001101010, 0b0010);
+ INSN4(ld4, 0b001101011, 0b0010);
+
INSN1(st1, 0b001101000, 0b0000);
INSN2(st2, 0b001101001, 0b0000);
INSN3(st3, 0b001101000, 0b0010);
@@ -2586,6 +2625,7 @@ template
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
guarantee(T != T1Q && T != T1D, "incorrect arrangement"); \
if (!acceptT2D) guarantee(T != T2D, "incorrect arrangement"); \
+ if (opc2 == 0b101101) guarantee(T != T8B && T != T16B, "incorrect arrangement"); \
starti; \
f(0, 31), f((int)T & 1, 30), f(opc, 29), f(0b01110, 28, 24); \
f((int)T >> 1, 23, 22), f(1, 21), rf(Vm, 16), f(opc2, 15, 10); \
@@ -2594,6 +2634,9 @@ template
INSN(addv, 0, 0b100001, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
INSN(subv, 1, 0b100001, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
+ INSN(sqaddv, 0, 0b000011, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
+ INSN(sqsubv, 0, 0b001011, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
+ INSN(uqaddv, 1, 0b000011, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
INSN(uqsubv, 1, 0b001011, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
INSN(mulv, 0, 0b100111, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
INSN(mlav, 0, 0b100101, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
@@ -2607,8 +2650,12 @@ template
INSN(umlalv, 1, 0b100000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
INSN(maxv, 0, 0b011001, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
INSN(minv, 0, 0b011011, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
+ INSN(umaxv, 1, 0b011001, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
+ INSN(uminv, 1, 0b011011, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
INSN(smaxp, 0, 0b101001, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
INSN(sminp, 0, 0b101011, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
+ INSN(sqdmulh,0, 0b101101, false); // accepted arrangements: T4H, T8H, T2S, T4S
+ INSN(shsubv, 0, 0b001001, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
#undef INSN
@@ -3315,8 +3362,12 @@ template
f(0b00000100, 31, 24), f(T, 23, 22), f(1, 21), \
rf(Zm, 16), f(0, 15, 13), f(opcode, 12, 10), rf(Zn, 5), rf(Zd, 0); \
}
- INSN(sve_add, 0b000);
- INSN(sve_sub, 0b001);
+ INSN(sve_add, 0b000);
+ INSN(sve_sub, 0b001);
+ INSN(sve_sqadd, 0b100);
+ INSN(sve_sqsub, 0b110);
+ INSN(sve_uqadd, 0b101);
+ INSN(sve_uqsub, 0b111);
#undef INSN
// SVE integer add/subtract immediate (unpredicated)
@@ -3427,6 +3478,8 @@ template
INSN(sve_sminv, 0b00000100, 0b001010001); // signed minimum reduction to scalar
INSN(sve_sub, 0b00000100, 0b000001000); // vector sub
INSN(sve_uaddv, 0b00000100, 0b000001001); // unsigned add reduction to scalar
+ INSN(sve_umax, 0b00000100, 0b001001000); // unsigned maximum vectors
+ INSN(sve_umin, 0b00000100, 0b001011000); // unsigned minimum vectors
#undef INSN
// SVE floating-point arithmetic - predicate
@@ -4218,6 +4271,20 @@ template
INSN(sve_eor3, 0b001); // Bitwise exclusive OR of three vectors
#undef INSN
+// SVE2 saturating operations - predicate
+#define INSN(NAME, op1, op2) \
+ void NAME(FloatRegister Zdn, SIMD_RegVariant T, PRegister Pg, FloatRegister Znm) { \
+ assert(T != Q, "invalid register variant"); \
+ sve_predicate_reg_insn(op1, op2, Zdn, T, Pg, Znm); \
+ }
+
+ INSN(sve_sqadd, 0b01000100, 0b011000100); // signed saturating add
+ INSN(sve_sqsub, 0b01000100, 0b011010100); // signed saturating sub
+ INSN(sve_uqadd, 0b01000100, 0b011001100); // unsigned saturating add
+ INSN(sve_uqsub, 0b01000100, 0b011011100); // unsigned saturating sub
+
+#undef INSN
+
Assembler(CodeBuffer* code) : AbstractAssembler(code) {
}
diff --git a/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
index 2334cbdff24e4..2e53ecb805829 100644
--- a/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
@@ -69,7 +69,7 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
__ far_call(RuntimeAddress(a));
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ should_not_reach_here());
+ DEBUG_ONLY(__ should_not_reach_here());
return;
}
@@ -90,7 +90,7 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
__ blr(lr);
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ should_not_reach_here());
+ DEBUG_ONLY(__ should_not_reach_here());
}
PredicateFailedStub::PredicateFailedStub(CodeEmitInfo* info) {
@@ -103,7 +103,7 @@ void PredicateFailedStub::emit_code(LIR_Assembler* ce) {
__ far_call(RuntimeAddress(a));
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ should_not_reach_here());
+ DEBUG_ONLY(__ should_not_reach_here());
}
void DivByZeroStub::emit_code(LIR_Assembler* ce) {
@@ -274,7 +274,7 @@ void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) {
__ far_call(RuntimeAddress(a));
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ should_not_reach_here());
+ DEBUG_ONLY(__ should_not_reach_here());
}
@@ -289,7 +289,7 @@ void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
}
__ far_call(RuntimeAddress(Runtime1::entry_for(_stub)), rscratch2);
ce->add_call_info_here(_info);
- debug_only(__ should_not_reach_here());
+ DEBUG_ONLY(__ should_not_reach_here());
}
diff --git a/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp
index 9470caae9fe5a..51887619ec159 100644
--- a/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -32,25 +32,21 @@ enum {
pd_hi_word_offset_in_bytes = BytesPerWord
};
-// explicit rounding operations are required to implement the strictFP mode
-enum {
- pd_strict_fp_requires_explicit_rounding = false
-};
-
// FIXME: There are no callee-saved
// registers
enum {
+ pd_nof_available_regs = 32,
pd_nof_cpu_regs_frame_map = Register::number_of_registers, // number of GP registers used during code emission
pd_nof_fpu_regs_frame_map = FloatRegister::number_of_registers, // number of FP registers used during code emission
- pd_nof_caller_save_cpu_regs_frame_map = 19 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1), // number of registers killed by calls
+ pd_nof_caller_save_cpu_regs_frame_map = pd_nof_available_regs, // number of registers killed by calls
pd_nof_caller_save_fpu_regs_frame_map = 32, // number of registers killed by calls
- pd_first_callee_saved_reg = 19 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1),
- pd_last_callee_saved_reg = 26 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1),
+ pd_first_callee_saved_reg = pd_nof_available_regs - 1,
+ pd_last_callee_saved_reg = pd_first_callee_saved_reg - 1, // in fact, no callee saved regs
- pd_last_allocatable_cpu_reg = 16 R18_RESERVED_ONLY(- 1),
+ pd_last_allocatable_cpu_reg = pd_nof_available_regs - 1,
pd_nof_cpu_regs_reg_alloc
= pd_last_allocatable_cpu_reg + 1, // number of registers that are visible to register allocator
@@ -60,9 +56,9 @@ enum {
pd_nof_fpu_regs_linearscan = pd_nof_fpu_regs_frame_map, // number of registers visible to linear scan
pd_nof_xmm_regs_linearscan = 0, // don't have vector registers
pd_first_cpu_reg = 0,
- pd_last_cpu_reg = 16 R18_RESERVED_ONLY(- 1),
+ pd_last_cpu_reg = pd_nof_available_regs - 1,
pd_first_byte_reg = 0,
- pd_last_byte_reg = 16 R18_RESERVED_ONLY(- 1),
+ pd_last_byte_reg = pd_last_cpu_reg,
pd_first_fpu_reg = pd_nof_cpu_regs_frame_map,
pd_last_fpu_reg = pd_first_fpu_reg + 31,
diff --git a/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp
deleted file mode 100644
index 158af57603ca8..0000000000000
--- a/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, Red Hat Inc. 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.
- *
- */
-
-//--------------------------------------------------------
-// FpuStackSim
-//--------------------------------------------------------
-
-// No FPU stack on AARCH64
diff --git a/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.hpp
deleted file mode 100644
index e1cfcf3de6c99..0000000000000
--- a/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, Red Hat Inc. 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.
- *
- */
-
-#ifndef CPU_AARCH64_C1_FPUSTACKSIM_AARCH64_HPP
-#define CPU_AARCH64_C1_FPUSTACKSIM_AARCH64_HPP
-
-// No FPU stack on AARCH64
-class FpuStackSim;
-
-#endif // CPU_AARCH64_C1_FPUSTACKSIM_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp
index 051b2ff47c142..9d30092b45aac 100644
--- a/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp
@@ -193,9 +193,26 @@ void FrameMap::initialize() {
map_register(i, r25); r25_opr = LIR_OprFact::single_cpu(i); i++;
map_register(i, r26); r26_opr = LIR_OprFact::single_cpu(i); i++;
- map_register(i, r27); r27_opr = LIR_OprFact::single_cpu(i); i++; // rheapbase
+ // r27 is allocated conditionally. With compressed oops it holds
+ // the heapbase value and is not visible to the allocator.
+ bool preserve_rheapbase = i >= nof_caller_save_cpu_regs();
+ if (!preserve_rheapbase) {
+ map_register(i, r27); r27_opr = LIR_OprFact::single_cpu(i); i++; // rheapbase
+ }
+
+ if(!PreserveFramePointer) {
+ map_register(i, r29); r29_opr = LIR_OprFact::single_cpu(i); i++;
+ }
+
+ // The unallocatable registers are at the end
+
+ if (preserve_rheapbase) {
+ map_register(i, r27); r27_opr = LIR_OprFact::single_cpu(i); i++; // rheapbase
+ }
map_register(i, r28); r28_opr = LIR_OprFact::single_cpu(i); i++; // rthread
- map_register(i, r29); r29_opr = LIR_OprFact::single_cpu(i); i++; // rfp
+ if(PreserveFramePointer) {
+ map_register(i, r29); r29_opr = LIR_OprFact::single_cpu(i); i++; // rfp
+ }
map_register(i, r30); r30_opr = LIR_OprFact::single_cpu(i); i++; // lr
map_register(i, r31_sp); sp_opr = LIR_OprFact::single_cpu(i); i++; // sp
map_register(i, r8); r8_opr = LIR_OprFact::single_cpu(i); i++; // rscratch1
@@ -239,6 +256,19 @@ void FrameMap::initialize() {
_caller_save_cpu_regs[16] = r18_opr;
#endif
+ _caller_save_cpu_regs[17 R18_RESERVED_ONLY(-1)] = r19_opr;
+ _caller_save_cpu_regs[18 R18_RESERVED_ONLY(-1)] = r20_opr;
+ _caller_save_cpu_regs[19 R18_RESERVED_ONLY(-1)] = r21_opr;
+ _caller_save_cpu_regs[20 R18_RESERVED_ONLY(-1)] = r22_opr;
+ _caller_save_cpu_regs[21 R18_RESERVED_ONLY(-1)] = r23_opr;
+ _caller_save_cpu_regs[22 R18_RESERVED_ONLY(-1)] = r24_opr;
+ _caller_save_cpu_regs[23 R18_RESERVED_ONLY(-1)] = r25_opr;
+ _caller_save_cpu_regs[24 R18_RESERVED_ONLY(-1)] = r26_opr;
+
+ if (nof_caller_save_cpu_regs() > 25 R18_RESERVED_ONLY(-1)) {
+ _caller_save_cpu_regs[25 R18_RESERVED_ONLY(-1)] = r27_opr;
+ }
+
for (int i = 0; i < 8; i++) {
_caller_save_fpu_regs[i] = LIR_OprFact::single_fpu(i);
}
diff --git a/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.hpp
index 3ec3ce1f67936..4d783418429cb 100644
--- a/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -140,8 +140,27 @@
static bool is_caller_save_register (LIR_Opr opr) { return true; }
static bool is_caller_save_register (Register r) { return true; }
- static int nof_caller_save_cpu_regs() { return pd_nof_caller_save_cpu_regs_frame_map; }
- static int last_cpu_reg() { return pd_last_cpu_reg; }
- static int last_byte_reg() { return pd_last_byte_reg; }
+ static int adjust_reg_range(int range, bool exclude_fp = true) {
+ // r27 is not allocatable when compressed oops is on and heapbase is not
+ // zero, compressed klass pointers doesn't use r27 after JDK-8234794
+ if (UseCompressedOops && (CompressedOops::base() != nullptr)) {
+ range -= 1;
+ }
+
+ // r29 is not allocatable when PreserveFramePointer is on,
+ // but fp saving is handled in MacroAssembler::build_frame()/remove_frame()
+ if (exclude_fp) {
+ range -= 1;
+ }
+
+ // rscratch registers r8, r9
+ // r28=rthread, r30=lr, r31=sp
+ // r18 on masOS/Windows
+ return range - 5 R18_RESERVED_ONLY(-1);
+ }
+
+ static int nof_caller_save_cpu_regs() { return adjust_reg_range(pd_nof_caller_save_cpu_regs_frame_map); }
+ static int last_cpu_reg() { return adjust_reg_range(pd_last_cpu_reg, PreserveFramePointer); }
+ static int last_byte_reg() { return adjust_reg_range(pd_last_byte_reg, PreserveFramePointer); }
#endif // CPU_AARCH64_C1_FRAMEMAP_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
index 0c11d26a4766c..9730e75f26647 100644
--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
@@ -584,14 +584,14 @@ void LIR_Assembler::const2stack(LIR_Opr src, LIR_Opr dest) {
__ str(zr, frame_map()->address_for_slot(dest->single_stack_ix()));
else {
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, nullptr);
- reg2stack(FrameMap::rscratch1_opr, dest, c->type(), false);
+ reg2stack(FrameMap::rscratch1_opr, dest, c->type());
}
}
break;
case T_ADDRESS:
{
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, nullptr);
- reg2stack(FrameMap::rscratch1_opr, dest, c->type(), false);
+ reg2stack(FrameMap::rscratch1_opr, dest, c->type());
}
case T_INT:
case T_FLOAT:
@@ -716,7 +716,7 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
}
}
-void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool pop_fpu_stack) {
+void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
precond(src->is_register() && dest->is_stack());
uint const c_sz32 = sizeof(uint32_t);
@@ -752,7 +752,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
}
-void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool wide) {
+void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide) {
LIR_Address* to_addr = dest->as_address_ptr();
PatchingStub* patch = nullptr;
Register compressed_src = rscratch1;
@@ -905,7 +905,7 @@ void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
temp = FrameMap::rscratch1_opr;
stack2reg(src, temp, src->type());
- reg2stack(temp, dest, dest->type(), false);
+ reg2stack(temp, dest, dest->type());
}
@@ -1598,7 +1598,7 @@ void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, L
__ csel(result->as_register(), opr1->as_register(), opr2->as_register(), acond);
}
-void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest, CodeEmitInfo* info, bool pop_fpu_stack) {
+void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest, CodeEmitInfo* info) {
assert(info == nullptr, "should never be used, idiv/irem and ldiv/lrem not handled by this method");
if (left->is_single_cpu()) {
@@ -1769,9 +1769,6 @@ void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
}
}
-void LIR_Assembler::arith_fpu_implementation(LIR_Code code, int left_index, int right_index, int dest_index, bool pop_fpu_stack) { Unimplemented(); }
-
-
void LIR_Assembler::intrinsic_op(LIR_Code code, LIR_Opr value, LIR_Opr tmp, LIR_Opr dest, LIR_Op* op) {
switch(code) {
case lir_abs : __ fabsd(dest->as_double_reg(), value->as_double_reg()); break;
@@ -2849,8 +2846,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* arg
void LIR_Assembler::volatile_move_op(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmitInfo* info) {
if (dest->is_address() || src->is_address()) {
- move_op(src, dest, type, lir_patch_none, info,
- /*pop_fpu_stack*/false, /*wide*/false);
+ move_op(src, dest, type, lir_patch_none, info, /*wide*/false);
} else {
ShouldNotReachHere();
}
diff --git a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp
index d3cf6c9187d97..12b941fc4f7e8 100644
--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp
@@ -33,8 +33,6 @@ friend class ArrayCopyStub;
int array_element_size(BasicType type) const;
- void arith_fpu_implementation(LIR_Code code, int left_index, int right_index, int dest_index, bool pop_fpu_stack);
-
// helper functions which checks for overflow and sets bailout if it
// occurs. Always returns a valid embeddable pointer but in the
// bailout case the pointer won't be to unique storage.
diff --git a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
index e85daed732429..5fee15c840071 100644
--- a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
@@ -407,7 +407,7 @@ void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
arithmetic_op_fpu(x->op(), reg, left.result(), right.result());
- set_result(x, round_item(reg));
+ set_result(x, reg);
}
// for _ladd, _lmul, _lsub, _ldiv, _lrem
diff --git a/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.cpp
deleted file mode 100644
index d99916ecb8863..0000000000000
--- a/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. 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.
- *
- */
-
-#include "c1/c1_Instruction.hpp"
-#include "c1/c1_LinearScan.hpp"
-#include "utilities/bitMap.inline.hpp"
-
-void LinearScan::allocate_fpu_stack() {
- // No FPU stack on AArch64
-}
diff --git a/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.hpp
index 01a4d27532a5b..4062adf4154b6 100644
--- a/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -41,9 +41,9 @@ inline bool LinearScan::requires_adjacent_regs(BasicType type) {
inline bool LinearScan::is_caller_save(int assigned_reg) {
assert(assigned_reg >= 0 && assigned_reg < nof_regs, "should call this only for registers");
- if (assigned_reg < pd_first_callee_saved_reg)
+ if (assigned_reg < FrameMap::nof_caller_save_cpu_regs())
return true;
- if (assigned_reg > pd_last_callee_saved_reg && assigned_reg < pd_first_callee_saved_fpu_reg)
+ if (assigned_reg >= pd_first_fpu_reg && assigned_reg < pd_first_callee_saved_fpu_reg)
return true;
if (assigned_reg > pd_last_callee_saved_fpu_reg && assigned_reg < pd_last_fpu_reg)
return true;
@@ -66,7 +66,7 @@ inline bool LinearScanWalker::pd_init_regs_for_alloc(Interval* cur) {
return true;
} else if (cur->type() == T_INT || cur->type() == T_LONG || cur->type() == T_OBJECT || cur->type() == T_ADDRESS || cur->type() == T_METADATA) {
_first_reg = pd_first_cpu_reg;
- _last_reg = pd_last_allocatable_cpu_reg;
+ _last_reg = FrameMap::last_cpu_reg();
return true;
}
return false;
diff --git a/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
index 6b1a5a7f1e0c4..afa2ddb47b454 100644
--- a/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
@@ -72,16 +72,17 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
null_check_offset = offset();
- if (DiagnoseSyncOnValueBasedClasses != 0) {
- load_klass(hdr, obj);
- ldrb(hdr, Address(hdr, Klass::misc_flags_offset()));
- tst(hdr, KlassFlags::_misc_is_value_based_class);
- br(Assembler::NE, slow_case);
- }
-
if (LockingMode == LM_LIGHTWEIGHT) {
lightweight_lock(disp_hdr, obj, hdr, temp, rscratch2, slow_case);
} else if (LockingMode == LM_LEGACY) {
+
+ if (DiagnoseSyncOnValueBasedClasses != 0) {
+ load_klass(hdr, obj);
+ ldrb(hdr, Address(hdr, Klass::misc_flags_offset()));
+ tst(hdr, KlassFlags::_misc_is_value_based_class);
+ br(Assembler::NE, slow_case);
+ }
+
Label done;
// Load object header
ldr(hdr, Address(obj, hdr_offset));
diff --git a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
index 7082b4110cdd8..a6aab24349a1f 100644
--- a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
@@ -91,10 +91,10 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, addre
// exception pending => remove activation and forward to exception handler
// make sure that the vm_results are cleared
if (oop_result1->is_valid()) {
- str(zr, Address(rthread, JavaThread::vm_result_offset()));
+ str(zr, Address(rthread, JavaThread::vm_result_oop_offset()));
}
if (metadata_result->is_valid()) {
- str(zr, Address(rthread, JavaThread::vm_result_2_offset()));
+ str(zr, Address(rthread, JavaThread::vm_result_metadata_offset()));
}
if (frame_size() == no_frame_size) {
leave();
@@ -108,10 +108,10 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, addre
}
// get oop results if there are any and reset the values in the thread
if (oop_result1->is_valid()) {
- get_vm_result(oop_result1, rthread);
+ get_vm_result_oop(oop_result1, rthread);
}
if (metadata_result->is_valid()) {
- get_vm_result_2(metadata_result, rthread);
+ get_vm_result_metadata(metadata_result, rthread);
}
return call_offset;
}
@@ -257,15 +257,18 @@ static OopMap* generate_oop_map(StubAssembler* sasm, bool save_fpu_registers) {
int frame_size_in_slots = frame_size_in_bytes / sizeof(jint);
OopMap* oop_map = new OopMap(frame_size_in_slots, 0);
- for (int i = 0; i < FrameMap::nof_cpu_regs; i++) {
- Register r = as_Register(i);
- if (r == rthread || (i <= 18 && i != rscratch1->encoding() && i != rscratch2->encoding())) {
- int sp_offset = cpu_reg_save_offsets[i];
- oop_map->set_callee_saved(VMRegImpl::stack2reg(sp_offset),
- r->as_VMReg());
- }
+ for (int i = 0; i < FrameMap::nof_caller_save_cpu_regs(); i++) {
+ LIR_Opr opr = FrameMap::caller_save_cpu_reg_at(i);
+ Register r = opr->as_register();
+ int reg_num = r->encoding();
+ int sp_offset = cpu_reg_save_offsets[reg_num];
+ oop_map->set_callee_saved(VMRegImpl::stack2reg(cpu_reg_save_offsets[reg_num]), r->as_VMReg());
}
+ Register r = rthread;
+ int reg_num = r->encoding();
+ oop_map->set_callee_saved(VMRegImpl::stack2reg(cpu_reg_save_offsets[reg_num]), r->as_VMReg());
+
if (save_fpu_registers) {
for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
FloatRegister r = as_FloatRegister(i);
@@ -403,8 +406,8 @@ OopMapSet* Runtime1::generate_handle_exception(C1StubId id, StubAssembler *sasm)
__ authenticate_return_address(exception_pc);
// make sure that the vm_results are cleared (may be unnecessary)
- __ str(zr, Address(rthread, JavaThread::vm_result_offset()));
- __ str(zr, Address(rthread, JavaThread::vm_result_2_offset()));
+ __ str(zr, Address(rthread, JavaThread::vm_result_oop_offset()));
+ __ str(zr, Address(rthread, JavaThread::vm_result_metadata_offset()));
break;
case C1StubId::handle_exception_nofpu_id:
case C1StubId::handle_exception_id:
diff --git a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
index e3d197a457215..585812a99eec2 100644
--- a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
@@ -312,10 +312,8 @@ void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Registe
// StoreLoad achieves this.
membar(StoreLoad);
- // Check if the entry lists are empty (EntryList first - by convention).
- ldr(rscratch1, Address(tmp, ObjectMonitor::EntryList_offset()));
- ldr(tmpReg, Address(tmp, ObjectMonitor::cxq_offset()));
- orr(rscratch1, rscratch1, tmpReg);
+ // Check if the entry_list is empty.
+ ldr(rscratch1, Address(tmp, ObjectMonitor::entry_list_offset()));
cmp(rscratch1, zr);
br(Assembler::EQ, cont); // If so we are done.
@@ -362,7 +360,7 @@ void C2_MacroAssembler::fast_lock_lightweight(Register obj, Register box, Regist
Label slow_path;
if (UseObjectMonitorTable) {
- // Clear cache in case fast locking succeeds.
+ // Clear cache in case fast locking succeeds or we need to take the slow-path.
str(zr, Address(box, BasicLock::object_monitor_cache_offset_in_bytes()));
}
@@ -635,10 +633,8 @@ void C2_MacroAssembler::fast_unlock_lightweight(Register obj, Register box, Regi
// StoreLoad achieves this.
membar(StoreLoad);
- // Check if the entry lists are empty (EntryList first - by convention).
- ldr(rscratch1, Address(t1_monitor, ObjectMonitor::EntryList_offset()));
- ldr(t3_t, Address(t1_monitor, ObjectMonitor::cxq_offset()));
- orr(rscratch1, rscratch1, t3_t);
+ // Check if the entry_list is empty.
+ ldr(rscratch1, Address(t1_monitor, ObjectMonitor::entry_list_offset()));
cmp(rscratch1, zr);
br(Assembler::EQ, unlocked); // If so we are done.
@@ -2549,6 +2545,64 @@ void C2_MacroAssembler::neon_reverse_bytes(FloatRegister dst, FloatRegister src,
}
}
+// VectorRearrange implementation for short/int/float/long/double types with NEON
+// instructions. For VectorRearrange short/int/float, we use NEON tbl instruction.
+// But since it supports bytes table only, we need to lookup 2/4 bytes as a group.
+// For VectorRearrange long/double, we compare the shuffle input with iota indices,
+// and use bsl to implement the operation.
+void C2_MacroAssembler::neon_rearrange_hsd(FloatRegister dst, FloatRegister src,
+ FloatRegister shuffle, FloatRegister tmp,
+ BasicType bt, bool isQ) {
+ assert_different_registers(dst, src, shuffle, tmp);
+ SIMD_Arrangement size1 = isQ ? T16B : T8B;
+ SIMD_Arrangement size2 = esize2arrangement((uint)type2aelembytes(bt), isQ);
+
+ // Here is an example that rearranges a NEON vector with 4 ints:
+ // Rearrange V1 int[a0, a1, a2, a3] to V2 int[a2, a3, a0, a1]
+ // 1. We assume the shuffle input is Vi int[2, 3, 0, 1].
+ // 2. Multiply Vi int[2, 3, 0, 1] with constant int vector
+ // [0x04040404, 0x04040404, 0x04040404, 0x04040404], and get
+ // tbl base Vm int[0x08080808, 0x0c0c0c0c, 0x00000000, 0x04040404].
+ // 3. Add Vm with constant int[0x03020100, 0x03020100, 0x03020100, 0x03020100],
+ // and get tbl index Vm int[0x0b0a0908, 0x0f0e0d0c, 0x03020100, 0x07060504]
+ // 4. Use Vm as index register, and use V1 as table register.
+ // Then get V2 as the result by tbl NEON instructions.
+ switch (bt) {
+ case T_SHORT:
+ mov(tmp, size1, 0x02);
+ mulv(dst, size2, shuffle, tmp);
+ mov(tmp, size2, 0x0100);
+ addv(dst, size1, dst, tmp);
+ tbl(dst, size1, src, 1, dst);
+ break;
+ case T_INT:
+ case T_FLOAT:
+ mov(tmp, size1, 0x04);
+ mulv(dst, size2, shuffle, tmp);
+ mov(tmp, size2, 0x03020100);
+ addv(dst, size1, dst, tmp);
+ tbl(dst, size1, src, 1, dst);
+ break;
+ case T_LONG:
+ case T_DOUBLE:
+ // Load the iota indices for Long type. The indices are ordered by
+ // type B/S/I/L/F/D, and the offset between two types is 16; Hence
+ // the offset for L is 48.
+ lea(rscratch1,
+ ExternalAddress(StubRoutines::aarch64::vector_iota_indices() + 48));
+ ldrq(tmp, rscratch1);
+ // Check whether the input "shuffle" is the same with iota indices.
+ // Return "src" if true, otherwise swap the two elements of "src".
+ cm(EQ, dst, size2, shuffle, tmp);
+ ext(tmp, size1, src, src, 8);
+ bsl(dst, size1, src, tmp);
+ break;
+ default:
+ assert(false, "unsupported element type");
+ ShouldNotReachHere();
+ }
+}
+
// Extract a scalar element from an sve vector at position 'idx'.
// The input elements in src are expected to be of integral type.
void C2_MacroAssembler::sve_extract_integral(Register dst, BasicType bt, FloatRegister src,
@@ -2689,3 +2743,107 @@ bool C2_MacroAssembler::in_scratch_emit_size() {
}
return MacroAssembler::in_scratch_emit_size();
}
+
+static void abort_verify_int_in_range(uint idx, jint val, jint lo, jint hi) {
+ fatal("Invalid CastII, idx: %u, val: %d, lo: %d, hi: %d", idx, val, lo, hi);
+}
+
+void C2_MacroAssembler::verify_int_in_range(uint idx, const TypeInt* t, Register rval, Register rtmp) {
+ assert(!t->empty() && !t->singleton(), "%s", Type::str(t));
+ if (t == TypeInt::INT) {
+ return;
+ }
+ BLOCK_COMMENT("verify_int_in_range {");
+ Label L_success, L_failure;
+
+ jint lo = t->_lo;
+ jint hi = t->_hi;
+
+ if (lo != min_jint && hi != max_jint) {
+ subsw(rtmp, rval, lo);
+ br(Assembler::LT, L_failure);
+ subsw(rtmp, rval, hi);
+ br(Assembler::LE, L_success);
+ } else if (lo != min_jint) {
+ subsw(rtmp, rval, lo);
+ br(Assembler::GE, L_success);
+ } else if (hi != max_jint) {
+ subsw(rtmp, rval, hi);
+ br(Assembler::LE, L_success);
+ } else {
+ ShouldNotReachHere();
+ }
+
+ bind(L_failure);
+ movw(c_rarg0, idx);
+ mov(c_rarg1, rval);
+ movw(c_rarg2, lo);
+ movw(c_rarg3, hi);
+ reconstruct_frame_pointer(rtmp);
+ rt_call(CAST_FROM_FN_PTR(address, abort_verify_int_in_range), rtmp);
+ hlt(0);
+
+ bind(L_success);
+ BLOCK_COMMENT("} verify_int_in_range");
+}
+
+static void abort_verify_long_in_range(uint idx, jlong val, jlong lo, jlong hi) {
+ fatal("Invalid CastLL, idx: %u, val: " JLONG_FORMAT ", lo: " JLONG_FORMAT ", hi: " JLONG_FORMAT, idx, val, lo, hi);
+}
+
+void C2_MacroAssembler::verify_long_in_range(uint idx, const TypeLong* t, Register rval, Register rtmp) {
+ assert(!t->empty() && !t->singleton(), "%s", Type::str(t));
+ if (t == TypeLong::LONG) {
+ return;
+ }
+ BLOCK_COMMENT("verify_long_in_range {");
+ Label L_success, L_failure;
+
+ jlong lo = t->_lo;
+ jlong hi = t->_hi;
+
+ if (lo != min_jlong && hi != max_jlong) {
+ subs(rtmp, rval, lo);
+ br(Assembler::LT, L_failure);
+ subs(rtmp, rval, hi);
+ br(Assembler::LE, L_success);
+ } else if (lo != min_jlong) {
+ subs(rtmp, rval, lo);
+ br(Assembler::GE, L_success);
+ } else if (hi != max_jlong) {
+ subs(rtmp, rval, hi);
+ br(Assembler::LE, L_success);
+ } else {
+ ShouldNotReachHere();
+ }
+
+ bind(L_failure);
+ movw(c_rarg0, idx);
+ mov(c_rarg1, rval);
+ mov(c_rarg2, lo);
+ mov(c_rarg3, hi);
+ reconstruct_frame_pointer(rtmp);
+ rt_call(CAST_FROM_FN_PTR(address, abort_verify_long_in_range), rtmp);
+ hlt(0);
+
+ bind(L_success);
+ BLOCK_COMMENT("} verify_long_in_range");
+}
+
+void C2_MacroAssembler::reconstruct_frame_pointer(Register rtmp) {
+ const int framesize = Compile::current()->output()->frame_size_in_bytes();
+ if (PreserveFramePointer) {
+ // frame pointer is valid
+#ifdef ASSERT
+ // Verify frame pointer value in rfp.
+ add(rtmp, sp, framesize - 2 * wordSize);
+ Label L_success;
+ cmp(rfp, rtmp);
+ br(Assembler::EQ, L_success);
+ stop("frame pointer mismatch");
+ bind(L_success);
+#endif // ASSERT
+ } else {
+ add(rfp, sp, framesize - 2 * wordSize);
+ }
+}
diff --git a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.hpp
index d61b050407d21..70e4265c7cc5e 100644
--- a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2025, 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
@@ -179,6 +179,8 @@
void neon_reverse_bytes(FloatRegister dst, FloatRegister src, BasicType bt, bool isQ);
+ void neon_rearrange_hsd(FloatRegister dst, FloatRegister src, FloatRegister shuffle,
+ FloatRegister tmp, BasicType bt, bool isQ);
// java.lang.Math::signum intrinsics
void vector_signum_neon(FloatRegister dst, FloatRegister src, FloatRegister zero,
FloatRegister one, SIMD_Arrangement T);
@@ -186,4 +188,9 @@
void vector_signum_sve(FloatRegister dst, FloatRegister src, FloatRegister zero,
FloatRegister one, FloatRegister vtmp, PRegister pgtmp, SIMD_RegVariant T);
+ void verify_int_in_range(uint idx, const TypeInt* t, Register val, Register tmp);
+ void verify_long_in_range(uint idx, const TypeLong* t, Register val, Register tmp);
+
+ void reconstruct_frame_pointer(Register rtmp);
+
#endif // CPU_AARCH64_C2_MACROASSEMBLER_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp b/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
index 0c2d9a32c8c13..3874c8cd54ef9 100644
--- a/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
@@ -70,7 +70,7 @@ static char* reserve_at_eor_compatible_address(size_t size, bool aslr) {
const uint64_t immediate = ((uint64_t)immediates[index]) << 32;
assert(immediate > 0 && Assembler::operand_valid_for_logical_immediate(/*is32*/false, immediate),
"Invalid immediate %d " UINT64_FORMAT, index, immediate);
- result = os::attempt_reserve_memory_at((char*)immediate, size, false);
+ result = os::attempt_reserve_memory_at((char*)immediate, size, mtNone);
if (result == nullptr) {
log_trace(metaspace, map)("Failed to attach at " UINT64_FORMAT_X, immediate);
}
@@ -114,7 +114,7 @@ char* CompressedKlassPointers::reserve_address_space_for_compressed_classes(size
if (result == nullptr) {
constexpr size_t alignment = nth_bit(32);
log_debug(metaspace, map)("Trying to reserve at a 32-bit-aligned address");
- result = os::reserve_memory_aligned(size, alignment, false);
+ result = os::reserve_memory_aligned(size, alignment, mtNone);
}
return result;
diff --git a/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp b/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
index 7febbaa63bbc9..f30b5d7cf2c64 100644
--- a/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
@@ -77,7 +77,6 @@ RuntimeStub* DowncallLinker::make_downcall_stub(BasicType* signature,
#ifndef PRODUCT
LogTarget(Trace, foreign, downcall) lt;
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
stub->print_on(&ls);
}
@@ -191,7 +190,6 @@ void DowncallLinker::StubGenerator::generate() {
#ifndef PRODUCT
LogTarget(Trace, foreign, downcall) lt;
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
arg_shuffle.print_on(&ls);
}
diff --git a/src/hotspot/cpu/aarch64/frame_aarch64.cpp b/src/hotspot/cpu/aarch64/frame_aarch64.cpp
index 7201674cd639c..b07fa2fa9df64 100644
--- a/src/hotspot/cpu/aarch64/frame_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.cpp
@@ -507,11 +507,11 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
intptr_t* unextended_sp = interpreter_frame_sender_sp();
intptr_t* sender_fp = link();
-#if COMPILER2_OR_JVMCI
+#if defined(COMPILER1) || COMPILER2_OR_JVMCI
if (map->update_map()) {
update_map_with_saved_link(map, (intptr_t**) addr_at(link_offset));
}
-#endif // COMPILER2_OR_JVMCI
+#endif // defined(COMPILER1) || COMPILER1_OR_COMPILER2
// For ROP protection, Interpreter will have signed the sender_pc,
// but there is no requirement to authenticate it here.
diff --git a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
index 828033975a065..869e26d335978 100644
--- a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
@@ -285,10 +285,6 @@ void BarrierSetAssembler::clear_patching_epoch() {
void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slow_path, Label* continuation, Label* guard) {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
- if (bs_nm == nullptr) {
- return;
- }
-
Label local_guard;
Label skip_barrier;
NMethodPatchingType patching_type = nmethod_patching_type();
@@ -361,11 +357,6 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
}
void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler* masm) {
- BarrierSetNMethod* bs = BarrierSet::barrier_set()->barrier_set_nmethod();
- if (bs == nullptr) {
- return;
- }
-
Label bad_call;
__ cbz(rmethod, bad_call);
diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp
index e33ef47cf3c38..e4db8a9ab1f82 100644
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp
@@ -27,9 +27,9 @@
#include "c1/c1_MacroAssembler.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
#include "gc/shared/gc_globals.hpp"
+#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
-#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
#define __ masm->masm()->
diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
index 19270d9fecf57..a2b3f44c68b72 100644
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
+#include "gc/shenandoah/mode/shenandoahMode.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
#include "gc/shenandoah/shenandoahForwarding.hpp"
@@ -30,10 +32,8 @@
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahRuntime.hpp"
#include "gc/shenandoah/shenandoahThreadLocalData.hpp"
-#include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
-#include "gc/shenandoah/mode/shenandoahMode.hpp"
-#include "interpreter/interpreter.hpp"
#include "interpreter/interp_masm.hpp"
+#include "interpreter/interpreter.hpp"
#include "runtime/javaThread.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef COMPILER1
@@ -377,7 +377,8 @@ void ShenandoahBarrierSetAssembler::store_check(MacroAssembler* masm, Register o
assert(CardTable::dirty_card_val() == 0, "must be");
- __ load_byte_map_base(rscratch1);
+ Address curr_ct_holder_addr(rthread, in_bytes(ShenandoahThreadLocalData::card_table_offset()));
+ __ ldr(rscratch1, curr_ct_holder_addr);
if (UseCondCardMark) {
Label L_already_dirty;
@@ -624,7 +625,8 @@ void ShenandoahBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssemb
// number of bytes to copy
__ sub(count, end, start);
- __ load_byte_map_base(scratch);
+ Address curr_ct_holder_addr(rthread, in_bytes(ShenandoahThreadLocalData::card_table_offset()));
+ __ ldr(scratch, curr_ct_holder_addr);
__ add(start, start, scratch);
__ bind(L_loop);
__ strb(zr, Address(start, count));
diff --git a/src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp
index a58c91a6a41e1..7008615ed438a 100644
--- a/src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp
@@ -21,8 +21,8 @@
* questions.
*/
-#include "gc/shared/gcLogPrecious.hpp"
#include "gc/shared/gc_globals.hpp"
+#include "gc/shared/gcLogPrecious.hpp"
#include "gc/z/zAddress.hpp"
#include "gc/z/zBarrierSetAssembler.hpp"
#include "gc/z/zGlobals.hpp"
@@ -95,7 +95,7 @@ size_t ZPlatformAddressOffsetBits() {
static const size_t valid_max_address_offset_bits = probe_valid_max_address_bit() + 1;
const size_t max_address_offset_bits = valid_max_address_offset_bits - 3;
const size_t min_address_offset_bits = max_address_offset_bits - 2;
- const size_t address_offset = round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
+ const size_t address_offset = ZGlobalsPointers::min_address_offset_request();
const size_t address_offset_bits = log2i_exact(address_offset);
return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
}
diff --git a/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp b/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp
index faf635dc33282..948ba97aa2234 100644
--- a/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -46,7 +46,7 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
#define DEFAULT_CACHE_LINE_SIZE 64
// The default padding size for data structures to avoid false sharing.
-#define DEFAULT_PADDING_SIZE DEFAULT_CACHE_LINE_SIZE
+#define DEFAULT_PADDING_SIZE (2*DEFAULT_CACHE_LINE_SIZE)
// According to the ARMv8 ARM, "Concurrent modification and execution
// of instructions can lead to the resulting instruction performing
diff --git a/src/hotspot/cpu/aarch64/icache_aarch64.cpp b/src/hotspot/cpu/aarch64/icache_aarch64.cpp
index 311f3a7de1f73..a942406f45ee9 100644
--- a/src/hotspot/cpu/aarch64/icache_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/icache_aarch64.cpp
@@ -31,4 +31,4 @@ void ICacheStubGenerator::generate_icache_flush(
*flush_icache_stub = nullptr;
}
-void ICache::initialize() {}
+void ICache::initialize(int phase) {}
diff --git a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
index 024d554b98f54..710a1f0677d1a 100644
--- a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
@@ -23,8 +23,8 @@
*
*/
-#include
-#include
+#include // do not reorder
+#include // do not reorder
#include "immediate_aarch64.hpp"
#include "metaprogramming/primitiveConversions.hpp"
diff --git a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
index 9892de21a8114..dd1d7d1d2e1b4 100644
--- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
@@ -693,17 +693,18 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
// Load object pointer into obj_reg %c_rarg3
ldr(obj_reg, Address(lock_reg, obj_offset));
- if (DiagnoseSyncOnValueBasedClasses != 0) {
- load_klass(tmp, obj_reg);
- ldrb(tmp, Address(tmp, Klass::misc_flags_offset()));
- tst(tmp, KlassFlags::_misc_is_value_based_class);
- br(Assembler::NE, slow_case);
- }
-
if (LockingMode == LM_LIGHTWEIGHT) {
lightweight_lock(lock_reg, obj_reg, tmp, tmp2, tmp3, slow_case);
b(done);
} else if (LockingMode == LM_LEGACY) {
+
+ if (DiagnoseSyncOnValueBasedClasses != 0) {
+ load_klass(tmp, obj_reg);
+ ldrb(tmp, Address(tmp, Klass::misc_flags_offset()));
+ tst(tmp, KlassFlags::_misc_is_value_based_class);
+ br(Assembler::NE, slow_case);
+ }
+
// Load (object->mark() | 1) into swap_reg
ldr(rscratch1, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
orr(swap_reg, rscratch1, 1);
@@ -1401,9 +1402,6 @@ void InterpreterMacroAssembler::_interp_verify_oop(Register reg, TosState state,
}
}
-void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { ; }
-
-
void InterpreterMacroAssembler::notify_method_entry() {
// Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
// track stack depth. If it is possible to enter interp_only_mode we add
diff --git a/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp b/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp
index bc2070d283d7d..059d79c3cb93c 100644
--- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp
@@ -303,8 +303,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
// only if +VerifyOops && state == atos
#define interp_verify_oop(reg, state) _interp_verify_oop(reg, state, __FILE__, __LINE__);
void _interp_verify_oop(Register reg, TosState state, const char* file, int line);
- // only if +VerifyFPU && (state == ftos || state == dtos)
- void verify_FPU(int stack_depth, TosState state = ftos);
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
diff --git a/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp b/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp
index 3015206dadc4d..071dd2c417992 100644
--- a/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp
@@ -180,6 +180,7 @@ bool CodeInstaller::pd_relocate(address pc, jint mark) {
case POLL_RETURN_FAR:
_instructions->relocate(pc, relocInfo::poll_return_type);
return true;
+#if INCLUDE_ZGC
case Z_BARRIER_RELOCATION_FORMAT_LOAD_GOOD_BEFORE_TB_X:
_instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatLoadGoodBeforeTbX);
return true;
@@ -192,6 +193,7 @@ bool CodeInstaller::pd_relocate(address pc, jint mark) {
case Z_BARRIER_RELOCATION_FORMAT_STORE_BAD_BEFORE_MOV:
_instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatStoreBadBeforeMov);
return true;
+#endif
}
return false;
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
index b6472b1b94812..cf347768de3e1 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -675,6 +675,9 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
}
static inline bool target_needs_far_branch(address addr) {
+ if (AOTCodeCache::is_on_for_dump()) {
+ return true;
+ }
// codecache size <= 128M
if (!MacroAssembler::far_branches()) {
return false;
@@ -849,7 +852,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
// get oop result if there is one and reset the value in the thread
if (oop_result->is_valid()) {
- get_vm_result(oop_result, java_thread);
+ get_vm_result_oop(oop_result, java_thread);
}
}
@@ -859,6 +862,9 @@ void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, in
// Check the entry target is always reachable from any branch.
static bool is_always_within_branch_range(Address entry) {
+ if (AOTCodeCache::is_on_for_dump()) {
+ return false;
+ }
const address target = entry.target();
if (!CodeCache::contains(target)) {
@@ -1003,9 +1009,6 @@ void MacroAssembler::c2bool(Register x) {
address MacroAssembler::ic_call(address entry, jint method_index) {
RelocationHolder rh = virtual_call_Relocation::spec(pc(), method_index);
- // address const_ptr = long_constant((jlong)Universe::non_oop_word());
- // uintptr_t offset;
- // ldr_constant(rscratch2, const_ptr);
movptr(rscratch2, (intptr_t)Universe::non_oop_word());
return trampoline_call(Address(entry, rh));
}
@@ -1145,15 +1148,15 @@ void MacroAssembler::call_VM(Register oop_result,
}
-void MacroAssembler::get_vm_result(Register oop_result, Register java_thread) {
- ldr(oop_result, Address(java_thread, JavaThread::vm_result_offset()));
- str(zr, Address(java_thread, JavaThread::vm_result_offset()));
+void MacroAssembler::get_vm_result_oop(Register oop_result, Register java_thread) {
+ ldr(oop_result, Address(java_thread, JavaThread::vm_result_oop_offset()));
+ str(zr, Address(java_thread, JavaThread::vm_result_oop_offset()));
verify_oop_msg(oop_result, "broken oop in call_VM_base");
}
-void MacroAssembler::get_vm_result_2(Register metadata_result, Register java_thread) {
- ldr(metadata_result, Address(java_thread, JavaThread::vm_result_2_offset()));
- str(zr, Address(java_thread, JavaThread::vm_result_2_offset()));
+void MacroAssembler::get_vm_result_metadata(Register metadata_result, Register java_thread) {
+ ldr(metadata_result, Address(java_thread, JavaThread::vm_result_metadata_offset()));
+ str(zr, Address(java_thread, JavaThread::vm_result_metadata_offset()));
}
void MacroAssembler::align(int modulus) {
@@ -2041,7 +2044,7 @@ void MacroAssembler::clinit_barrier(Register klass, Register scratch, Label* L_f
// Fast path check: class is fully initialized
lea(scratch, Address(klass, InstanceKlass::init_state_offset()));
ldarb(scratch, scratch);
- subs(zr, scratch, InstanceKlass::fully_initialized);
+ cmp(scratch, InstanceKlass::fully_initialized);
br(Assembler::EQ, *L_fast_path);
// Fast path check: current thread is initializer thread
@@ -2157,7 +2160,7 @@ void MacroAssembler::call_VM_leaf_base(address entry_point,
stp(rscratch1, rmethod, Address(pre(sp, -2 * wordSize)));
- mov(rscratch1, entry_point);
+ mov(rscratch1, RuntimeAddress(entry_point));
blr(rscratch1);
if (retaddr)
bind(*retaddr);
@@ -3234,9 +3237,13 @@ void MacroAssembler::resolve_global_jobject(Register value, Register tmp1, Regis
}
void MacroAssembler::stop(const char* msg) {
- BLOCK_COMMENT(msg);
+ // Skip AOT caching C strings in scratch buffer.
+ const char* str = (code_section()->scratch_emit()) ? msg : AOTCodeCache::add_C_string(msg);
+ BLOCK_COMMENT(str);
+ // load msg into r0 so we can access it from the signal handler
+ // ExternalAddress enables saving and restoring via the code cache
+ lea(c_rarg0, ExternalAddress((address) str));
dcps1(0xdeae);
- emit_int64((uintptr_t)msg);
}
void MacroAssembler::unimplemented(const char* what) {
@@ -5520,9 +5527,8 @@ void MacroAssembler::movoop(Register dst, jobject obj) {
mov(dst, Address((address)obj, rspec));
} else {
address dummy = address(uintptr_t(pc()) & -wordSize); // A nearby aligned address
- ldr_constant(dst, Address(dummy, rspec));
+ ldr(dst, Address(dummy, rspec));
}
-
}
// Move a metadata address into a register.
@@ -7034,10 +7040,17 @@ void MacroAssembler::lightweight_lock(Register basic_lock, Register obj, Registe
ldr(mark, Address(obj, oopDesc::mark_offset_in_bytes()));
if (UseObjectMonitorTable) {
- // Clear cache in case fast locking succeeds.
+ // Clear cache in case fast locking succeeds or we need to take the slow-path.
str(zr, Address(basic_lock, BasicObjectLock::lock_offset() + in_ByteSize((BasicLock::object_monitor_cache_offset_in_bytes()))));
}
+ if (DiagnoseSyncOnValueBasedClasses != 0) {
+ load_klass(t1, obj);
+ ldrb(t1, Address(t1, Klass::misc_flags_offset()));
+ tst(t1, KlassFlags::_misc_is_value_based_class);
+ br(Assembler::NE, slow);
+ }
+
// Check if the lock-stack is full.
ldrw(top, Address(rthread, JavaThread::lock_stack_top_offset()));
cmpw(top, (unsigned)LockStack::end_offset());
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
index bd537af59e471..17ee72a00c0e0 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2024, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -27,6 +27,7 @@
#define CPU_AARCH64_MACROASSEMBLER_AARCH64_HPP
#include "asm/assembler.inline.hpp"
+#include "code/aotCodeCache.hpp"
#include "code/vmreg.hpp"
#include "metaprogramming/enableIf.hpp"
#include "oops/compressedOops.hpp"
@@ -823,8 +824,8 @@ class MacroAssembler: public Assembler {
Register arg_1, Register arg_2, Register arg_3,
bool check_exceptions = true);
- void get_vm_result (Register oop_result, Register thread);
- void get_vm_result_2(Register metadata_result, Register thread);
+ void get_vm_result_oop(Register oop_result, Register thread);
+ void get_vm_result_metadata(Register metadata_result, Register thread);
// These always tightly bind to MacroAssembler::call_VM_base
// bypassing the virtual implementation
@@ -1315,6 +1316,10 @@ class MacroAssembler: public Assembler {
// Check if branches to the non nmethod section require a far jump
static bool codestub_branch_needs_far_jump() {
+ if (AOTCodeCache::is_on_for_dump()) {
+ // To calculate far_codestub_branch_size correctly.
+ return true;
+ }
return CodeCache::max_distance_to_non_nmethod() > branch_range;
}
@@ -1472,16 +1477,6 @@ class MacroAssembler: public Assembler {
public:
- void ldr_constant(Register dest, const Address &const_addr) {
- if (NearCpool) {
- ldr(dest, const_addr);
- } else {
- uint64_t offset;
- adrp(dest, InternalAddress(const_addr.target()), offset);
- ldr(dest, Address(dest, offset));
- }
- }
-
address read_polling_page(Register r, relocInfo::relocType rtype);
void get_polling_page(Register dest, relocInfo::relocType rtype);
@@ -1611,11 +1606,15 @@ class MacroAssembler: public Assembler {
void aes_round(FloatRegister input, FloatRegister subkey);
// ChaCha20 functions support block
- void cc20_quarter_round(FloatRegister aVec, FloatRegister bVec,
- FloatRegister cVec, FloatRegister dVec, FloatRegister scratch,
- FloatRegister tbl);
- void cc20_shift_lane_org(FloatRegister bVec, FloatRegister cVec,
- FloatRegister dVec, bool colToDiag);
+ void cc20_qr_add4(FloatRegister (&addFirst)[4],
+ FloatRegister (&addSecond)[4]);
+ void cc20_qr_xor4(FloatRegister (&firstElem)[4],
+ FloatRegister (&secondElem)[4], FloatRegister (&result)[4]);
+ void cc20_qr_lrot4(FloatRegister (&sourceReg)[4],
+ FloatRegister (&destReg)[4], int bits, FloatRegister table);
+ void cc20_set_qr_registers(FloatRegister (&vectorSet)[4],
+ const FloatRegister (&stateVectors)[16], int idx1, int idx2,
+ int idx3, int idx4);
// Place an ISB after code may have been modified due to a safepoint.
void safepoint_isb();
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp
index 1f7bb8f46f64f..083e81af5d969 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp
@@ -28,60 +28,119 @@
#include "runtime/stubRoutines.hpp"
/**
- * Perform the quarter round calculations on values contained within
- * four SIMD registers.
+ * Perform the vectorized add for a group of 4 quarter round operations.
+ * In the ChaCha20 quarter round, there are two add ops: a += b and c += d.
+ * Each parameter is a set of 4 registers representing the 4 registers
+ * for the each addend in the add operation for each of the quarter rounds.
+ * (e.g. for "a" it would consist of v0/v1/v2/v3). The result of the add
+ * is placed into the vectors in the "addFirst" array.
*
- * @param aVec the SIMD register containing only the "a" values
- * @param bVec the SIMD register containing only the "b" values
- * @param cVec the SIMD register containing only the "c" values
- * @param dVec the SIMD register containing only the "d" values
- * @param scratch scratch SIMD register used for 12 and 7 bit left rotations
- * @param table the SIMD register used as a table for 8 bit left rotations
+ * @param addFirst array of SIMD registers representing the first addend.
+ * @param addSecond array of SIMD registers representing the second addend.
*/
-void MacroAssembler::cc20_quarter_round(FloatRegister aVec, FloatRegister bVec,
- FloatRegister cVec, FloatRegister dVec, FloatRegister scratch,
- FloatRegister table) {
+void MacroAssembler::cc20_qr_add4(FloatRegister (&addFirst)[4],
+ FloatRegister (&addSecond)[4]) {
+ for (int i = 0; i < 4; i++) {
+ addv(addFirst[i], T4S, addFirst[i], addSecond[i]);
+ }
+}
+
+
+/**
+ * Perform the vectorized XOR for a group of 4 quarter round operations.
+ * In the ChaCha20 quarter round, there are two XOR ops: d ^= a and b ^= c
+ * Each parameter is a set of 4 registers representing the 4 registers
+ * for the each element in the xor operation for each of the quarter rounds.
+ * (e.g. for "a" it would consist of v0/v1/v2/v3)
+ * Note: because the b ^= c ops precede a non-byte-aligned left-rotation,
+ * there is a third parameter which can take a set of scratch registers
+ * for the result, which facilitates doing the subsequent operations for
+ * the left rotation.
+ *
+ * @param firstElem array of SIMD registers representing the first element.
+ * @param secondElem array of SIMD registers representing the second element.
+ * @param result array of SIMD registers representing the destination.
+ * May be the same as firstElem or secondElem, or a separate array.
+ */
+void MacroAssembler::cc20_qr_xor4(FloatRegister (&firstElem)[4],
+ FloatRegister (&secondElem)[4], FloatRegister (&result)[4]) {
+ for (int i = 0; i < 4; i++) {
+ eor(result[i], T16B, firstElem[i], secondElem[i]);
+ }
+}
+
+/**
+ * Perform the vectorized left-rotation on 32-bit lanes for a group of
+ * 4 quarter round operations.
+ * Each parameter is a set of 4 registers representing the 4 registers
+ * for the each element in the source and destination for each of the quarter
+ * rounds (e.g. for "d" it would consist of v12/v13/v14/v15 on columns and
+ * v15/v12/v13/v14 on diagonal alignments).
+ *
+ * @param sourceReg array of SIMD registers representing the source
+ * @param destReg array of SIMD registers representing the destination
+ * @param bits the distance of the rotation in bits, must be 16/12/8/7 per
+ * the ChaCha20 specification.
+ */
+void MacroAssembler::cc20_qr_lrot4(FloatRegister (&sourceReg)[4],
+ FloatRegister (&destReg)[4], int bits, FloatRegister table) {
+ switch (bits) {
+ case 16: // reg <<<= 16, in-place swap of half-words
+ for (int i = 0; i < 4; i++) {
+ rev32(destReg[i], T8H, sourceReg[i]);
+ }
+ break;
- // a += b, d ^= a, d <<<= 16
- addv(aVec, T4S, aVec, bVec);
- eor(dVec, T16B, dVec, aVec);
- rev32(dVec, T8H, dVec);
+ case 7: // reg <<<= (12 || 7)
+ case 12: // r-shift src -> dest, l-shift src & ins to dest
+ for (int i = 0; i < 4; i++) {
+ ushr(destReg[i], T4S, sourceReg[i], 32 - bits);
+ }
- // c += d, b ^= c, b <<<= 12
- addv(cVec, T4S, cVec, dVec);
- eor(scratch, T16B, bVec, cVec);
- ushr(bVec, T4S, scratch, 20);
- sli(bVec, T4S, scratch, 12);
+ for (int i = 0; i < 4; i++) {
+ sli(destReg[i], T4S, sourceReg[i], bits);
+ }
+ break;
- // a += b, d ^= a, d <<<= 8
- addv(aVec, T4S, aVec, bVec);
- eor(dVec, T16B, dVec, aVec);
- tbl(dVec, T16B, dVec, 1, table);
+ case 8: // reg <<<= 8, simulate left rotation with table reorg
+ for (int i = 0; i < 4; i++) {
+ tbl(destReg[i], T16B, sourceReg[i], 1, table);
+ }
+ break;
- // c += d, b ^= c, b <<<= 7
- addv(cVec, T4S, cVec, dVec);
- eor(scratch, T16B, bVec, cVec);
- ushr(bVec, T4S, scratch, 25);
- sli(bVec, T4S, scratch, 7);
+ default:
+ // The caller shouldn't be sending bit rotation values outside
+ // of the 16/12/8/7 as defined in the specification.
+ ShouldNotReachHere();
+ }
}
/**
- * Shift the b, c, and d vectors between columnar and diagonal representations.
- * Note that the "a" vector does not shift.
+ * Set the FloatRegisters for a 4-vector register set. These will be used
+ * during various quarter round transformations (adds, xors and left-rotations).
+ * This method itself does not result in the output of any assembly
+ * instructions. It just organizes the vectors so they can be in columnar or
+ * diagonal alignments.
*
- * @param bVec the SIMD register containing only the "b" values
- * @param cVec the SIMD register containing only the "c" values
- * @param dVec the SIMD register containing only the "d" values
- * @param colToDiag true if moving columnar to diagonal, false if
- * moving diagonal back to columnar.
+ * @param vectorSet a 4-vector array to be altered into a new alignment
+ * @param stateVectors the 16-vector array that represents the current
+ * working state. The indices of this array match up with the
+ * organization of the ChaCha20 state per RFC 7539 (e.g. stateVectors[12]
+ * would contain the vector that holds the 32-bit counter, etc.)
+ * @param idx1 the index of the stateVectors array to be assigned to the
+ * first vectorSet element.
+ * @param idx2 the index of the stateVectors array to be assigned to the
+ * second vectorSet element.
+ * @param idx3 the index of the stateVectors array to be assigned to the
+ * third vectorSet element.
+ * @param idx4 the index of the stateVectors array to be assigned to the
+ * fourth vectorSet element.
*/
-void MacroAssembler::cc20_shift_lane_org(FloatRegister bVec, FloatRegister cVec,
- FloatRegister dVec, bool colToDiag) {
- int bShift = colToDiag ? 4 : 12;
- int cShift = 8;
- int dShift = colToDiag ? 12 : 4;
-
- ext(bVec, T16B, bVec, bVec, bShift);
- ext(cVec, T16B, cVec, cVec, cShift);
- ext(dVec, T16B, dVec, dVec, dShift);
+void MacroAssembler::cc20_set_qr_registers(FloatRegister (&vectorSet)[4],
+ const FloatRegister (&stateVectors)[16], int idx1, int idx2,
+ int idx3, int idx4) {
+ vectorSet[0] = stateVectors[idx1];
+ vectorSet[1] = stateVectors[idx2];
+ vectorSet[2] = stateVectors[idx3];
+ vectorSet[3] = stateVectors[idx4];
}
diff --git a/src/hotspot/cpu/aarch64/matcher_aarch64.hpp b/src/hotspot/cpu/aarch64/matcher_aarch64.hpp
index 447c5f57a8aa5..0fbc2ef141e8b 100644
--- a/src/hotspot/cpu/aarch64/matcher_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/matcher_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025, 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
@@ -115,9 +115,6 @@
// C code as the Java calling convention forces doubles to be aligned.
static const bool misaligned_doubles_ok = true;
- // Advertise here if the CPU requires explicit rounding operations to implement strictfp mode.
- static const bool strict_fp_requires_explicit_rounding = false;
-
// Are floats converted to double when stored to stack during
// deoptimization?
static constexpr bool float_in_double() { return false; }
@@ -203,4 +200,8 @@
return false;
}
+ // Is FEAT_FP16 supported for this CPU?
+ static bool is_feat_fp16_supported() {
+ return (VM_Version::supports_fphp() && VM_Version::supports_asimdhp());
+ }
#endif // CPU_AARCH64_MATCHER_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp b/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp
index 588b8898d2d2a..cdf67e3423f66 100644
--- a/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp
@@ -93,14 +93,60 @@ void MethodHandles::verify_klass(MacroAssembler* _masm,
void MethodHandles::verify_ref_kind(MacroAssembler* _masm, int ref_kind, Register member_reg, Register temp) { }
+void MethodHandles::verify_method(MacroAssembler* _masm, Register method, vmIntrinsics::ID iid) {
+ BLOCK_COMMENT("verify_method {");
+ __ verify_method_ptr(method);
+ if (VerifyMethodHandles) {
+ Label L_ok;
+ assert_different_registers(method, rscratch1, rscratch2);
+ const Register method_holder = rscratch1;
+ __ load_method_holder(method_holder, method);
+
+ switch (iid) {
+ case vmIntrinsicID::_invokeBasic:
+ // Require compiled LambdaForm class to be fully initialized.
+ __ lea(rscratch2, Address(method_holder, InstanceKlass::init_state_offset()));
+ __ ldarb(rscratch2, rscratch2);
+ __ cmp(rscratch2, InstanceKlass::fully_initialized);
+ __ br(Assembler::EQ, L_ok);
+ break;
+
+ case vmIntrinsicID::_linkToStatic:
+ __ clinit_barrier(method_holder, rscratch2, &L_ok);
+ break;
+
+ case vmIntrinsicID::_linkToVirtual:
+ case vmIntrinsicID::_linkToSpecial:
+ case vmIntrinsicID::_linkToInterface:
+ // Class initialization check is too strong here. Just ensure that class initialization has been initiated.
+ __ lea(rscratch2, Address(method_holder, InstanceKlass::init_state_offset()));
+ __ ldarb(rscratch2, rscratch2);
+ __ cmp(rscratch2, InstanceKlass::being_initialized);
+ __ br(Assembler::GE, L_ok);
+
+ // init_state check failed, but it may be an abstract interface method
+ __ ldrh(rscratch2, Address(method, Method::access_flags_offset()));
+ __ tbnz(rscratch2, exact_log2(JVM_ACC_ABSTRACT), L_ok);
+ break;
+
+ default:
+ fatal("unexpected intrinsic %d: %s", vmIntrinsics::as_int(iid), vmIntrinsics::name_at(iid));
+ }
+
+ // Method holder init state check failed for a concrete method.
+ __ stop("Method holder klass is not initialized");
+ __ bind(L_ok);
+ }
+ BLOCK_COMMENT("} verify_method");
+}
#endif //ASSERT
void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
- bool for_compiler_entry) {
+ bool for_compiler_entry, vmIntrinsics::ID iid) {
assert(method == rmethod, "interpreter calling convention");
Label L_no_such_method;
__ cbz(rmethod, L_no_such_method);
- __ verify_method_ptr(method);
+ verify_method(_masm, method, iid);
if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
Label run_compiled_code;
@@ -160,7 +206,7 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
__ BIND(L);
}
- jump_from_method_handle(_masm, method_temp, temp2, for_compiler_entry);
+ jump_from_method_handle(_masm, method_temp, temp2, for_compiler_entry, vmIntrinsics::_invokeBasic);
BLOCK_COMMENT("} jump_to_lambda_form");
}
@@ -447,8 +493,7 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
// After figuring out which concrete method to call, jump into it.
// Note that this works in the interpreter with no data motion.
// But the compiled version will require that r2_recv be shifted out.
- __ verify_method_ptr(rmethod);
- jump_from_method_handle(_masm, rmethod, temp1, for_compiler_entry);
+ jump_from_method_handle(_masm, rmethod, temp1, for_compiler_entry, iid);
if (iid == vmIntrinsics::_linkToInterface) {
__ bind(L_incompatible_class_change_error);
__ far_jump(RuntimeAddress(SharedRuntime::throw_IncompatibleClassChangeError_entry()));
diff --git a/src/hotspot/cpu/aarch64/methodHandles_aarch64.hpp b/src/hotspot/cpu/aarch64/methodHandles_aarch64.hpp
index bd36f3e84c29a..e82f4d6237ea1 100644
--- a/src/hotspot/cpu/aarch64/methodHandles_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/methodHandles_aarch64.hpp
@@ -39,6 +39,8 @@ enum /* platform_dependent_constants */ {
Register obj, vmClassID klass_id,
const char* error_message = "wrong klass") NOT_DEBUG_RETURN;
+ static void verify_method(MacroAssembler* _masm, Register method, vmIntrinsics::ID iid) NOT_DEBUG_RETURN;
+
static void verify_method_handle(MacroAssembler* _masm, Register mh_reg) {
verify_klass(_masm, mh_reg, VM_CLASS_ID(java_lang_invoke_MethodHandle),
"reference is a MH");
@@ -49,7 +51,7 @@ enum /* platform_dependent_constants */ {
// Similar to InterpreterMacroAssembler::jump_from_interpreted.
// Takes care of special dispatch from single stepping too.
static void jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
- bool for_compiler_entry);
+ bool for_compiler_entry, vmIntrinsics::ID iid);
static void jump_to_lambda_form(MacroAssembler* _masm,
Register recv, Register method_temp,
diff --git a/src/hotspot/cpu/aarch64/register_aarch64.hpp b/src/hotspot/cpu/aarch64/register_aarch64.hpp
index ab635e1be9040..108f0f34140b4 100644
--- a/src/hotspot/cpu/aarch64/register_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/register_aarch64.hpp
@@ -412,4 +412,135 @@ inline Register as_Register(FloatRegister reg) {
// High-level register class of an OptoReg or a VMReg register.
enum RC { rc_bad, rc_int, rc_float, rc_predicate, rc_stack };
+// AArch64 Vector Register Sequence management support
+//
+// VSeq implements an indexable (by operator[]) vector register
+// sequence starting from a fixed base register and with a fixed delta
+// (defaulted to 1, but sometimes 0 or 2) e.g. VSeq<4>(16) will return
+// registers v16, ... v19 for indices 0, ... 3.
+//
+// Generator methods may iterate across sets of VSeq<4> to schedule an
+// operation 4 times using distinct input and output registers,
+// profiting from 4-way instruction parallelism.
+//
+// A VSeq<2> can be used to specify registers loaded with special
+// constants e.g. --> .
+//
+// A VSeq with base n and delta 0 can be used to generate code that
+// combines values in another VSeq with the constant in register vn.
+//
+// A VSeq with base n and delta 2 can be used to select an odd or even
+// indexed set of registers.
+//
+// Methods which accept arguments of type VSeq<8>, may split their
+// inputs into front and back halves or odd and even halves (see
+// convenience methods below).
+
+// helper macro for computing register masks
+#define VS_MASK_BIT(base, delta, i) (1 << (base + delta * i))
+
+template class VSeq {
+ static_assert(N >= 2, "vector sequence length must be greater than 1");
+private:
+ int _base; // index of first register in sequence
+ int _delta; // increment to derive successive indices
+public:
+ VSeq(FloatRegister base_reg, int delta = 1) : VSeq(base_reg->encoding(), delta) { }
+ VSeq(int base, int delta = 1) : _base(base), _delta(delta) {
+ assert (_base >= 0 && _base <= 31, "invalid base register");
+ assert ((_base + (N - 1) * _delta) >= 0, "register range underflow");
+ assert ((_base + (N - 1) * _delta) < 32, "register range overflow");
+ }
+ // indexed access to sequence
+ FloatRegister operator [](int i) const {
+ assert (0 <= i && i < N, "index out of bounds");
+ return as_FloatRegister(_base + i * _delta);
+ }
+ int mask() const {
+ int m = 0;
+ for (int i = 0; i < N; i++) {
+ m |= VS_MASK_BIT(_base, _delta, i);
+ }
+ return m;
+ }
+ int base() const { return _base; }
+ int delta() const { return _delta; }
+ bool is_constant() const { return _delta == 0; }
+};
+
+// methods for use in asserts to check VSeq inputs and outputs are
+// either disjoint or equal
+
+template bool vs_disjoint(const VSeq& n, const VSeq& m) { return (n.mask() & m.mask()) == 0; }
+template bool vs_same(const VSeq& n, const VSeq& m) { return n.mask() == m.mask(); }
+
+// method for use in asserts to check whether registers appearing in
+// an output sequence will be written before they are read from an
+// input sequence.
+
+template bool vs_write_before_read(const VSeq& vout, const VSeq& vin) {
+ int b_in = vin.base();
+ int d_in = vin.delta();
+ int b_out = vout.base();
+ int d_out = vout.delta();
+ int bit_in = 1 << b_in;
+ int bit_out = 1 << b_out;
+ int mask_read = vin.mask(); // all pending reads
+ int mask_write = 0; // no writes as yet
+
+
+ for (int i = 0; i < N - 1; i++) {
+ // check whether a pending read clashes with a write
+ if ((mask_write & mask_read) != 0) {
+ return true;
+ }
+ // remove the pending input (so long as this is a constant
+ // sequence)
+ if (d_in != 0) {
+ mask_read ^= VS_MASK_BIT(b_in, d_in, i);
+ }
+ // record the next write
+ mask_write |= VS_MASK_BIT(b_out, d_out, i);
+ }
+ // no write before read
+ return false;
+}
+
+// convenience methods for splitting 8-way or 4-way vector register
+// sequences in half -- needed because vector operations can normally
+// benefit from 4-way instruction parallelism or, occasionally, 2-way
+// parallelism
+
+template
+VSeq vs_front(const VSeq& v) {
+ static_assert(N > 0 && ((N & 1) == 0), "sequence length must be even");
+ return VSeq(v.base(), v.delta());
+}
+
+template
+VSeq vs_back(const VSeq& v) {
+ static_assert(N > 0 && ((N & 1) == 0), "sequence length must be even");
+ return VSeq(v.base() + N / 2 * v.delta(), v.delta());
+}
+
+template
+VSeq vs_even(const VSeq& v) {
+ static_assert(N > 0 && ((N & 1) == 0), "sequence length must be even");
+ return VSeq(v.base(), v.delta() * 2);
+}
+
+template
+VSeq vs_odd(const VSeq& v) {
+ static_assert(N > 0 && ((N & 1) == 0), "sequence length must be even");
+ return VSeq(v.base() + v.delta(), v.delta() * 2);
+}
+
+// convenience method to construct a vector register sequence that
+// indexes its elements in reverse order to the original
+
+template
+VSeq vs_reverse(const VSeq& v) {
+ return VSeq(v.base() + (N - 1) * v.delta(), -v.delta());
+}
+
#endif // CPU_AARCH64_REGISTER_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/runtime_aarch64.cpp b/src/hotspot/cpu/aarch64/runtime_aarch64.cpp
index 635c074eadc63..2361d584f4252 100644
--- a/src/hotspot/cpu/aarch64/runtime_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/runtime_aarch64.cpp
@@ -59,11 +59,15 @@ class SimpleRuntimeFrame {
#define __ masm->
//------------------------------generate_uncommon_trap_blob--------------------
-void OptoRuntime::generate_uncommon_trap_blob() {
+UncommonTrapBlob* OptoRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
- CodeBuffer buffer("uncommon_trap_blob", 2048, 1024);
+ const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
+ CodeBuffer buffer(name, 2048, 1024);
+ if (buffer.blob() == nullptr) {
+ return nullptr;
+ }
MacroAssembler* masm = new MacroAssembler(&buffer);
assert(SimpleRuntimeFrame::framesize % 4 == 0, "sp not 16-byte aligned");
@@ -242,7 +246,7 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// Make sure all code is generated
masm->flush();
- _uncommon_trap_blob = UncommonTrapBlob::create(&buffer, oop_maps,
+ return UncommonTrapBlob::create(&buffer, oop_maps,
SimpleRuntimeFrame::framesize >> 1);
}
@@ -272,7 +276,7 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// Registers r0, r3, r2, r4, r5, r8-r11 are not callee saved.
//
-void OptoRuntime::generate_exception_blob() {
+ExceptionBlob* OptoRuntime::generate_exception_blob() {
assert(!OptoRuntime::is_callee_saved_register(R3_num), "");
assert(!OptoRuntime::is_callee_saved_register(R0_num), "");
assert(!OptoRuntime::is_callee_saved_register(R2_num), "");
@@ -282,7 +286,11 @@ void OptoRuntime::generate_exception_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
- CodeBuffer buffer("exception_blob", 2048, 1024);
+ const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
+ CodeBuffer buffer(name, 2048, 1024);
+ if (buffer.blob() == nullptr) {
+ return nullptr;
+ }
MacroAssembler* masm = new MacroAssembler(&buffer);
// TODO check various assumptions made here
@@ -376,7 +384,7 @@ void OptoRuntime::generate_exception_blob() {
masm->flush();
// Set exception blob
- _exception_blob = ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
+ return ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
}
#endif // COMPILER2
diff --git a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
index b0b299876018a..0c3dfabc93e88 100644
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
@@ -557,40 +557,6 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
// If this happens, control eventually transfers back to the compiled
// caller, but with an uncorrected stack, causing delayed havoc.
- if (VerifyAdapterCalls &&
- (Interpreter::code() != nullptr || StubRoutines::final_stubs_code() != nullptr)) {
-#if 0
- // So, let's test for cascading c2i/i2c adapters right now.
- // assert(Interpreter::contains($return_addr) ||
- // StubRoutines::contains($return_addr),
- // "i2c adapter must return to an interpreter frame");
- __ block_comment("verify_i2c { ");
- Label L_ok;
- if (Interpreter::code() != nullptr) {
- range_check(masm, rax, r11,
- Interpreter::code()->code_start(), Interpreter::code()->code_end(),
- L_ok);
- }
- if (StubRoutines::initial_stubs_code() != nullptr) {
- range_check(masm, rax, r11,
- StubRoutines::initial_stubs_code()->code_begin(),
- StubRoutines::initial_stubs_code()->code_end(),
- L_ok);
- }
- if (StubRoutines::final_stubs_code() != nullptr) {
- range_check(masm, rax, r11,
- StubRoutines::final_stubs_code()->code_begin(),
- StubRoutines::final_stubs_code()->code_end(),
- L_ok);
- }
- const char* msg = "i2c adapter must return to an interpreter frame";
- __ block_comment(msg);
- __ stop(msg);
- __ bind(L_ok);
- __ block_comment("} verify_i2ce ");
-#endif
- }
-
// Cut-out for having no stack args.
int comp_words_on_stack = align_up(comp_args_on_stack*VMRegImpl::stack_slot_size, wordSize)>>LogBytesPerWord;
if (comp_args_on_stack) {
@@ -711,12 +677,12 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
}
// ---------------------------------------------------------------
-AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
- int total_args_passed,
- int comp_args_on_stack,
- const BasicType *sig_bt,
- const VMRegPair *regs,
- AdapterFingerPrint* fingerprint) {
+void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
+ int total_args_passed,
+ int comp_args_on_stack,
+ const BasicType *sig_bt,
+ const VMRegPair *regs,
+ AdapterHandlerEntry* handler) {
address i2c_entry = __ pc();
gen_i2c_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs);
@@ -777,7 +743,8 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup);
- return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry, c2i_no_clinit_check_entry);
+ handler->set_entry_points(i2c_entry, c2i_entry, c2i_unverified_entry, c2i_no_clinit_check_entry);
+ return;
}
static int c_calling_convention_priv(const BasicType *sig_bt,
@@ -2783,7 +2750,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
__ cbnz(rscratch1, pending);
// get the returned Method*
- __ get_vm_result_2(rmethod, rthread);
+ __ get_vm_result_metadata(rmethod, rthread);
__ str(rmethod, Address(sp, reg_save.reg_offset_in_bytes(rmethod)));
// r0 is where we want to jump, overwrite rscratch1 which is saved and scratch
@@ -2802,7 +2769,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
// exception pending => remove activation and forward to exception handler
- __ str(zr, Address(rthread, JavaThread::vm_result_offset()));
+ __ str(zr, Address(rthread, JavaThread::vm_result_oop_offset()));
__ ldr(r0, Address(rthread, Thread::pending_exception_offset()));
__ far_jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
diff --git a/src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp b/src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp
index 1830bdf4a88d6..425146e6bf46d 100644
--- a/src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp
@@ -44,7 +44,7 @@
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
- do_arch_blob(compiler, 30000 ZGC_ONLY(+10000)) \
+ do_arch_blob(compiler, 70000) \
do_stub(compiler, vector_iota_indices) \
do_arch_entry(aarch64, compiler, vector_iota_indices, \
vector_iota_indices, vector_iota_indices) \
@@ -109,7 +109,7 @@
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
- do_arch_blob(final, 20000 ZGC_ONLY(+100000)) \
+ do_arch_blob(final, 20000 ZGC_ONLY(+60000)) \
do_stub(final, copy_byte_f) \
do_arch_entry(aarch64, final, copy_byte_f, copy_byte_f, \
copy_byte_f) \
diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
index 5f901a5e9ea11..f5567dcc03ac5 100644
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
@@ -4063,6 +4063,95 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
+ // Execute one round of keccak of two computations in parallel.
+ // One of the states should be loaded into the lower halves of
+ // the vector registers v0-v24, the other should be loaded into
+ // the upper halves of those registers. The ld1r instruction loads
+ // the round constant into both halves of register v31.
+ // Intermediate results c0...c5 and d0...d5 are computed
+ // in registers v25...v30.
+ // All vector instructions that are used operate on both register
+ // halves in parallel.
+ // If only a single computation is needed, one can only load the lower halves.
+ void keccak_round(Register rscratch1) {
+ __ eor3(v29, __ T16B, v4, v9, v14); // c4 = a4 ^ a9 ^ a14
+ __ eor3(v26, __ T16B, v1, v6, v11); // c1 = a1 ^ a16 ^ a11
+ __ eor3(v28, __ T16B, v3, v8, v13); // c3 = a3 ^ a8 ^a13
+ __ eor3(v25, __ T16B, v0, v5, v10); // c0 = a0 ^ a5 ^ a10
+ __ eor3(v27, __ T16B, v2, v7, v12); // c2 = a2 ^ a7 ^ a12
+ __ eor3(v29, __ T16B, v29, v19, v24); // c4 ^= a19 ^ a24
+ __ eor3(v26, __ T16B, v26, v16, v21); // c1 ^= a16 ^ a21
+ __ eor3(v28, __ T16B, v28, v18, v23); // c3 ^= a18 ^ a23
+ __ eor3(v25, __ T16B, v25, v15, v20); // c0 ^= a15 ^ a20
+ __ eor3(v27, __ T16B, v27, v17, v22); // c2 ^= a17 ^ a22
+
+ __ rax1(v30, __ T2D, v29, v26); // d0 = c4 ^ rol(c1, 1)
+ __ rax1(v26, __ T2D, v26, v28); // d2 = c1 ^ rol(c3, 1)
+ __ rax1(v28, __ T2D, v28, v25); // d4 = c3 ^ rol(c0, 1)
+ __ rax1(v25, __ T2D, v25, v27); // d1 = c0 ^ rol(c2, 1)
+ __ rax1(v27, __ T2D, v27, v29); // d3 = c2 ^ rol(c4, 1)
+
+ __ eor(v0, __ T16B, v0, v30); // a0 = a0 ^ d0
+ __ xar(v29, __ T2D, v1, v25, (64 - 1)); // a10' = rol((a1^d1), 1)
+ __ xar(v1, __ T2D, v6, v25, (64 - 44)); // a1 = rol(a6^d1), 44)
+ __ xar(v6, __ T2D, v9, v28, (64 - 20)); // a6 = rol((a9^d4), 20)
+ __ xar(v9, __ T2D, v22, v26, (64 - 61)); // a9 = rol((a22^d2), 61)
+ __ xar(v22, __ T2D, v14, v28, (64 - 39)); // a22 = rol((a14^d4), 39)
+ __ xar(v14, __ T2D, v20, v30, (64 - 18)); // a14 = rol((a20^d0), 18)
+ __ xar(v31, __ T2D, v2, v26, (64 - 62)); // a20' = rol((a2^d2), 62)
+ __ xar(v2, __ T2D, v12, v26, (64 - 43)); // a2 = rol((a12^d2), 43)
+ __ xar(v12, __ T2D, v13, v27, (64 - 25)); // a12 = rol((a13^d3), 25)
+ __ xar(v13, __ T2D, v19, v28, (64 - 8)); // a13 = rol((a19^d4), 8)
+ __ xar(v19, __ T2D, v23, v27, (64 - 56)); // a19 = rol((a23^d3), 56)
+ __ xar(v23, __ T2D, v15, v30, (64 - 41)); // a23 = rol((a15^d0), 41)
+ __ xar(v15, __ T2D, v4, v28, (64 - 27)); // a15 = rol((a4^d4), 27)
+ __ xar(v28, __ T2D, v24, v28, (64 - 14)); // a4' = rol((a24^d4), 14)
+ __ xar(v24, __ T2D, v21, v25, (64 - 2)); // a24 = rol((a21^d1), 2)
+ __ xar(v8, __ T2D, v8, v27, (64 - 55)); // a21' = rol((a8^d3), 55)
+ __ xar(v4, __ T2D, v16, v25, (64 - 45)); // a8' = rol((a16^d1), 45)
+ __ xar(v16, __ T2D, v5, v30, (64 - 36)); // a16 = rol((a5^d0), 36)
+ __ xar(v5, __ T2D, v3, v27, (64 - 28)); // a5 = rol((a3^d3), 28)
+ __ xar(v27, __ T2D, v18, v27, (64 - 21)); // a3' = rol((a18^d3), 21)
+ __ xar(v3, __ T2D, v17, v26, (64 - 15)); // a18' = rol((a17^d2), 15)
+ __ xar(v25, __ T2D, v11, v25, (64 - 10)); // a17' = rol((a11^d1), 10)
+ __ xar(v26, __ T2D, v7, v26, (64 - 6)); // a11' = rol((a7^d2), 6)
+ __ xar(v30, __ T2D, v10, v30, (64 - 3)); // a7' = rol((a10^d0), 3)
+
+ __ bcax(v20, __ T16B, v31, v22, v8); // a20 = a20' ^ (~a21 & a22')
+ __ bcax(v21, __ T16B, v8, v23, v22); // a21 = a21' ^ (~a22 & a23)
+ __ bcax(v22, __ T16B, v22, v24, v23); // a22 = a22 ^ (~a23 & a24)
+ __ bcax(v23, __ T16B, v23, v31, v24); // a23 = a23 ^ (~a24 & a20')
+ __ bcax(v24, __ T16B, v24, v8, v31); // a24 = a24 ^ (~a20' & a21')
+
+ __ ld1r(v31, __ T2D, __ post(rscratch1, 8)); // rc = round_constants[i]
+
+ __ bcax(v17, __ T16B, v25, v19, v3); // a17 = a17' ^ (~a18' & a19)
+ __ bcax(v18, __ T16B, v3, v15, v19); // a18 = a18' ^ (~a19 & a15')
+ __ bcax(v19, __ T16B, v19, v16, v15); // a19 = a19 ^ (~a15 & a16)
+ __ bcax(v15, __ T16B, v15, v25, v16); // a15 = a15 ^ (~a16 & a17')
+ __ bcax(v16, __ T16B, v16, v3, v25); // a16 = a16 ^ (~a17' & a18')
+
+ __ bcax(v10, __ T16B, v29, v12, v26); // a10 = a10' ^ (~a11' & a12)
+ __ bcax(v11, __ T16B, v26, v13, v12); // a11 = a11' ^ (~a12 & a13)
+ __ bcax(v12, __ T16B, v12, v14, v13); // a12 = a12 ^ (~a13 & a14)
+ __ bcax(v13, __ T16B, v13, v29, v14); // a13 = a13 ^ (~a14 & a10')
+ __ bcax(v14, __ T16B, v14, v26, v29); // a14 = a14 ^ (~a10' & a11')
+
+ __ bcax(v7, __ T16B, v30, v9, v4); // a7 = a7' ^ (~a8' & a9)
+ __ bcax(v8, __ T16B, v4, v5, v9); // a8 = a8' ^ (~a9 & a5)
+ __ bcax(v9, __ T16B, v9, v6, v5); // a9 = a9 ^ (~a5 & a6)
+ __ bcax(v5, __ T16B, v5, v30, v6); // a5 = a5 ^ (~a6 & a7)
+ __ bcax(v6, __ T16B, v6, v4, v30); // a6 = a6 ^ (~a7 & a8')
+
+ __ bcax(v3, __ T16B, v27, v0, v28); // a3 = a3' ^ (~a4' & a0)
+ __ bcax(v4, __ T16B, v28, v1, v0); // a4 = a4' ^ (~a0 & a1)
+ __ bcax(v0, __ T16B, v0, v2, v1); // a0 = a0 ^ (~a1 & a2)
+ __ bcax(v1, __ T16B, v1, v27, v2); // a1 = a1 ^ (~a2 & a3)
+ __ bcax(v2, __ T16B, v2, v28, v27); // a2 = a2 ^ (~a3 & a4')
+
+ __ eor(v0, __ T16B, v0, v31); // a0 = a0 ^ rc
+ }
+
// Arguments:
//
// Inputs:
@@ -4072,229 +4161,2801 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg3 - int offset
// c_rarg4 - int limit
//
- address generate_sha3_implCompress(StubGenStubId stub_id) {
- bool multi_block;
- switch (stub_id) {
- case sha3_implCompress_id:
- multi_block = false;
- break;
- case sha3_implCompressMB_id:
- multi_block = true;
- break;
- default:
- ShouldNotReachHere();
+ address generate_sha3_implCompress(StubGenStubId stub_id) {
+ bool multi_block;
+ switch (stub_id) {
+ case sha3_implCompress_id:
+ multi_block = false;
+ break;
+ case sha3_implCompressMB_id:
+ multi_block = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ static const uint64_t round_consts[24] = {
+ 0x0000000000000001L, 0x0000000000008082L, 0x800000000000808AL,
+ 0x8000000080008000L, 0x000000000000808BL, 0x0000000080000001L,
+ 0x8000000080008081L, 0x8000000000008009L, 0x000000000000008AL,
+ 0x0000000000000088L, 0x0000000080008009L, 0x000000008000000AL,
+ 0x000000008000808BL, 0x800000000000008BL, 0x8000000000008089L,
+ 0x8000000000008003L, 0x8000000000008002L, 0x8000000000000080L,
+ 0x000000000000800AL, 0x800000008000000AL, 0x8000000080008081L,
+ 0x8000000000008080L, 0x0000000080000001L, 0x8000000080008008L
+ };
+
+ __ align(CodeEntryAlignment);
+
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+
+ Register buf = c_rarg0;
+ Register state = c_rarg1;
+ Register block_size = c_rarg2;
+ Register ofs = c_rarg3;
+ Register limit = c_rarg4;
+
+ Label sha3_loop, rounds24_loop;
+ Label sha3_512_or_sha3_384, shake128;
+
+ __ stpd(v8, v9, __ pre(sp, -64));
+ __ stpd(v10, v11, Address(sp, 16));
+ __ stpd(v12, v13, Address(sp, 32));
+ __ stpd(v14, v15, Address(sp, 48));
+
+ // load state
+ __ add(rscratch1, state, 32);
+ __ ld1(v0, v1, v2, v3, __ T1D, state);
+ __ ld1(v4, v5, v6, v7, __ T1D, __ post(rscratch1, 32));
+ __ ld1(v8, v9, v10, v11, __ T1D, __ post(rscratch1, 32));
+ __ ld1(v12, v13, v14, v15, __ T1D, __ post(rscratch1, 32));
+ __ ld1(v16, v17, v18, v19, __ T1D, __ post(rscratch1, 32));
+ __ ld1(v20, v21, v22, v23, __ T1D, __ post(rscratch1, 32));
+ __ ld1(v24, __ T1D, rscratch1);
+
+ __ BIND(sha3_loop);
+
+ // 24 keccak rounds
+ __ movw(rscratch2, 24);
+
+ // load round_constants base
+ __ lea(rscratch1, ExternalAddress((address) round_consts));
+
+ // load input
+ __ ld1(v25, v26, v27, v28, __ T8B, __ post(buf, 32));
+ __ ld1(v29, v30, v31, __ T8B, __ post(buf, 24));
+ __ eor(v0, __ T8B, v0, v25);
+ __ eor(v1, __ T8B, v1, v26);
+ __ eor(v2, __ T8B, v2, v27);
+ __ eor(v3, __ T8B, v3, v28);
+ __ eor(v4, __ T8B, v4, v29);
+ __ eor(v5, __ T8B, v5, v30);
+ __ eor(v6, __ T8B, v6, v31);
+
+ // block_size == 72, SHA3-512; block_size == 104, SHA3-384
+ __ tbz(block_size, 7, sha3_512_or_sha3_384);
+
+ __ ld1(v25, v26, v27, v28, __ T8B, __ post(buf, 32));
+ __ ld1(v29, v30, v31, __ T8B, __ post(buf, 24));
+ __ eor(v7, __ T8B, v7, v25);
+ __ eor(v8, __ T8B, v8, v26);
+ __ eor(v9, __ T8B, v9, v27);
+ __ eor(v10, __ T8B, v10, v28);
+ __ eor(v11, __ T8B, v11, v29);
+ __ eor(v12, __ T8B, v12, v30);
+ __ eor(v13, __ T8B, v13, v31);
+
+ __ ld1(v25, v26, v27, __ T8B, __ post(buf, 24));
+ __ eor(v14, __ T8B, v14, v25);
+ __ eor(v15, __ T8B, v15, v26);
+ __ eor(v16, __ T8B, v16, v27);
+
+ // block_size == 136, bit4 == 0 and bit5 == 0, SHA3-256 or SHAKE256
+ __ andw(c_rarg5, block_size, 48);
+ __ cbzw(c_rarg5, rounds24_loop);
+
+ __ tbnz(block_size, 5, shake128);
+ // block_size == 144, bit5 == 0, SHA3-224
+ __ ldrd(v28, __ post(buf, 8));
+ __ eor(v17, __ T8B, v17, v28);
+ __ b(rounds24_loop);
+
+ __ BIND(shake128);
+ __ ld1(v28, v29, v30, v31, __ T8B, __ post(buf, 32));
+ __ eor(v17, __ T8B, v17, v28);
+ __ eor(v18, __ T8B, v18, v29);
+ __ eor(v19, __ T8B, v19, v30);
+ __ eor(v20, __ T8B, v20, v31);
+ __ b(rounds24_loop); // block_size == 168, SHAKE128
+
+ __ BIND(sha3_512_or_sha3_384);
+ __ ld1(v25, v26, __ T8B, __ post(buf, 16));
+ __ eor(v7, __ T8B, v7, v25);
+ __ eor(v8, __ T8B, v8, v26);
+ __ tbz(block_size, 5, rounds24_loop); // SHA3-512
+
+ // SHA3-384
+ __ ld1(v27, v28, v29, v30, __ T8B, __ post(buf, 32));
+ __ eor(v9, __ T8B, v9, v27);
+ __ eor(v10, __ T8B, v10, v28);
+ __ eor(v11, __ T8B, v11, v29);
+ __ eor(v12, __ T8B, v12, v30);
+
+ __ BIND(rounds24_loop);
+ __ subw(rscratch2, rscratch2, 1);
+
+ keccak_round(rscratch1);
+
+ __ cbnzw(rscratch2, rounds24_loop);
+
+ if (multi_block) {
+ __ add(ofs, ofs, block_size);
+ __ cmp(ofs, limit);
+ __ br(Assembler::LE, sha3_loop);
+ __ mov(c_rarg0, ofs); // return ofs
+ }
+
+ __ st1(v0, v1, v2, v3, __ T1D, __ post(state, 32));
+ __ st1(v4, v5, v6, v7, __ T1D, __ post(state, 32));
+ __ st1(v8, v9, v10, v11, __ T1D, __ post(state, 32));
+ __ st1(v12, v13, v14, v15, __ T1D, __ post(state, 32));
+ __ st1(v16, v17, v18, v19, __ T1D, __ post(state, 32));
+ __ st1(v20, v21, v22, v23, __ T1D, __ post(state, 32));
+ __ st1(v24, __ T1D, state);
+
+ // restore callee-saved registers
+ __ ldpd(v14, v15, Address(sp, 48));
+ __ ldpd(v12, v13, Address(sp, 32));
+ __ ldpd(v10, v11, Address(sp, 16));
+ __ ldpd(v8, v9, __ post(sp, 64));
+
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Inputs:
+ // c_rarg0 - long[] state0
+ // c_rarg1 - long[] state1
+ address generate_double_keccak() {
+ static const uint64_t round_consts[24] = {
+ 0x0000000000000001L, 0x0000000000008082L, 0x800000000000808AL,
+ 0x8000000080008000L, 0x000000000000808BL, 0x0000000080000001L,
+ 0x8000000080008081L, 0x8000000000008009L, 0x000000000000008AL,
+ 0x0000000000000088L, 0x0000000080008009L, 0x000000008000000AL,
+ 0x000000008000808BL, 0x800000000000008BL, 0x8000000000008089L,
+ 0x8000000000008003L, 0x8000000000008002L, 0x8000000000000080L,
+ 0x000000000000800AL, 0x800000008000000AL, 0x8000000080008081L,
+ 0x8000000000008080L, 0x0000000080000001L, 0x8000000080008008L
+ };
+
+ // Implements the double_keccak() method of the
+ // sun.secyrity.provider.SHA3Parallel class
+ __ align(CodeEntryAlignment);
+ StubCodeMark mark(this, "StubRoutines", "double_keccak");
+ address start = __ pc();
+ __ enter();
+
+ Register state0 = c_rarg0;
+ Register state1 = c_rarg1;
+
+ Label rounds24_loop;
+
+ // save callee-saved registers
+ __ stpd(v8, v9, __ pre(sp, -64));
+ __ stpd(v10, v11, Address(sp, 16));
+ __ stpd(v12, v13, Address(sp, 32));
+ __ stpd(v14, v15, Address(sp, 48));
+
+ // load states
+ __ add(rscratch1, state0, 32);
+ __ ld4(v0, v1, v2, v3, __ D, 0, state0);
+ __ ld4(v4, v5, v6, v7, __ D, 0, __ post(rscratch1, 32));
+ __ ld4(v8, v9, v10, v11, __ D, 0, __ post(rscratch1, 32));
+ __ ld4(v12, v13, v14, v15, __ D, 0, __ post(rscratch1, 32));
+ __ ld4(v16, v17, v18, v19, __ D, 0, __ post(rscratch1, 32));
+ __ ld4(v20, v21, v22, v23, __ D, 0, __ post(rscratch1, 32));
+ __ ld1(v24, __ D, 0, rscratch1);
+ __ add(rscratch1, state1, 32);
+ __ ld4(v0, v1, v2, v3, __ D, 1, state1);
+ __ ld4(v4, v5, v6, v7, __ D, 1, __ post(rscratch1, 32));
+ __ ld4(v8, v9, v10, v11, __ D, 1, __ post(rscratch1, 32));
+ __ ld4(v12, v13, v14, v15, __ D, 1, __ post(rscratch1, 32));
+ __ ld4(v16, v17, v18, v19, __ D, 1, __ post(rscratch1, 32));
+ __ ld4(v20, v21, v22, v23, __ D, 1, __ post(rscratch1, 32));
+ __ ld1(v24, __ D, 1, rscratch1);
+
+ // 24 keccak rounds
+ __ movw(rscratch2, 24);
+
+ // load round_constants base
+ __ lea(rscratch1, ExternalAddress((address) round_consts));
+
+ __ BIND(rounds24_loop);
+ __ subw(rscratch2, rscratch2, 1);
+ keccak_round(rscratch1);
+ __ cbnzw(rscratch2, rounds24_loop);
+
+ __ st4(v0, v1, v2, v3, __ D, 0, __ post(state0, 32));
+ __ st4(v4, v5, v6, v7, __ D, 0, __ post(state0, 32));
+ __ st4(v8, v9, v10, v11, __ D, 0, __ post(state0, 32));
+ __ st4(v12, v13, v14, v15, __ D, 0, __ post(state0, 32));
+ __ st4(v16, v17, v18, v19, __ D, 0, __ post(state0, 32));
+ __ st4(v20, v21, v22, v23, __ D, 0, __ post(state0, 32));
+ __ st1(v24, __ D, 0, state0);
+ __ st4(v0, v1, v2, v3, __ D, 1, __ post(state1, 32));
+ __ st4(v4, v5, v6, v7, __ D, 1, __ post(state1, 32));
+ __ st4(v8, v9, v10, v11, __ D, 1, __ post(state1, 32));
+ __ st4(v12, v13, v14, v15, __ D, 1, __ post(state1, 32));
+ __ st4(v16, v17, v18, v19, __ D, 1, __ post(state1, 32));
+ __ st4(v20, v21, v22, v23, __ D, 1, __ post(state1, 32));
+ __ st1(v24, __ D, 1, state1);
+
+ // restore callee-saved vector registers
+ __ ldpd(v14, v15, Address(sp, 48));
+ __ ldpd(v12, v13, Address(sp, 32));
+ __ ldpd(v10, v11, Address(sp, 16));
+ __ ldpd(v8, v9, __ post(sp, 64));
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // ChaCha20 block function. This version parallelizes the 32-bit
+ // state elements on each of 16 vectors, producing 4 blocks of
+ // keystream at a time.
+ //
+ // state (int[16]) = c_rarg0
+ // keystream (byte[256]) = c_rarg1
+ // return - number of bytes of produced keystream (always 256)
+ //
+ // This implementation takes each 32-bit integer from the state
+ // array and broadcasts it across all 4 32-bit lanes of a vector register
+ // (e.g. state[0] is replicated on all 4 lanes of v4, state[1] to all 4 lanes
+ // of v5, etc.). Once all 16 elements have been broadcast onto 16 vectors,
+ // the quarter round schedule is implemented as outlined in RFC 7539 section
+ // 2.3. However, instead of sequentially processing the 3 quarter round
+ // operations represented by one QUARTERROUND function, we instead stack all
+ // the adds, xors and left-rotations from the first 4 quarter rounds together
+ // and then do the same for the second set of 4 quarter rounds. This removes
+ // some latency that would otherwise be incurred by waiting for an add to
+ // complete before performing an xor (which depends on the result of the
+ // add), etc. An adjustment happens between the first and second groups of 4
+ // quarter rounds, but this is done only in the inputs to the macro functions
+ // that generate the assembly instructions - these adjustments themselves are
+ // not part of the resulting assembly.
+ // The 4 registers v0-v3 are used during the quarter round operations as
+ // scratch registers. Once the 20 rounds are complete, these 4 scratch
+ // registers become the vectors involved in adding the start state back onto
+ // the post-QR working state. After the adds are complete, each of the 16
+ // vectors write their first lane back to the keystream buffer, followed
+ // by the second lane from all vectors and so on.
+ address generate_chacha20Block_blockpar() {
+ Label L_twoRounds, L_cc20_const;
+ // The constant data is broken into two 128-bit segments to be loaded
+ // onto FloatRegisters. The first 128 bits are a counter add overlay
+ // that adds +0/+1/+2/+3 to the vector holding replicated state[12].
+ // The second 128-bits is a table constant used for 8-bit left rotations.
+ __ BIND(L_cc20_const);
+ __ emit_int64(0x0000000100000000UL);
+ __ emit_int64(0x0000000300000002UL);
+ __ emit_int64(0x0605040702010003UL);
+ __ emit_int64(0x0E0D0C0F0A09080BUL);
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::chacha20Block_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ int i, j;
+ const Register state = c_rarg0;
+ const Register keystream = c_rarg1;
+ const Register loopCtr = r10;
+ const Register tmpAddr = r11;
+ const FloatRegister ctrAddOverlay = v28;
+ const FloatRegister lrot8Tbl = v29;
+
+ // Organize SIMD registers in an array that facilitates
+ // putting repetitive opcodes into loop structures. It is
+ // important that each grouping of 4 registers is monotonically
+ // increasing to support the requirements of multi-register
+ // instructions (e.g. ld4r, st4, etc.)
+ const FloatRegister workSt[16] = {
+ v4, v5, v6, v7, v16, v17, v18, v19,
+ v20, v21, v22, v23, v24, v25, v26, v27
+ };
+
+ // Pull in constant data. The first 16 bytes are the add overlay
+ // which is applied to the vector holding the counter (state[12]).
+ // The second 16 bytes is the index register for the 8-bit left
+ // rotation tbl instruction.
+ __ adr(tmpAddr, L_cc20_const);
+ __ ldpq(ctrAddOverlay, lrot8Tbl, Address(tmpAddr));
+
+ // Load from memory and interlace across 16 SIMD registers,
+ // With each word from memory being broadcast to all lanes of
+ // each successive SIMD register.
+ // Addr(0) -> All lanes in workSt[i]
+ // Addr(4) -> All lanes workSt[i + 1], etc.
+ __ mov(tmpAddr, state);
+ for (i = 0; i < 16; i += 4) {
+ __ ld4r(workSt[i], workSt[i + 1], workSt[i + 2], workSt[i + 3], __ T4S,
+ __ post(tmpAddr, 16));
+ }
+ __ addv(workSt[12], __ T4S, workSt[12], ctrAddOverlay); // Add ctr overlay
+
+ // Before entering the loop, create 5 4-register arrays. These
+ // will hold the 4 registers that represent the a/b/c/d fields
+ // in the quarter round operation. For instance the "b" field
+ // for the first 4 quarter round operations is the set of v16/v17/v18/v19,
+ // but in the second 4 quarter rounds it gets adjusted to v17/v18/v19/v16
+ // since it is part of a diagonal organization. The aSet and scratch
+ // register sets are defined at declaration time because they do not change
+ // organization at any point during the 20-round processing.
+ FloatRegister aSet[4] = { v4, v5, v6, v7 };
+ FloatRegister bSet[4];
+ FloatRegister cSet[4];
+ FloatRegister dSet[4];
+ FloatRegister scratch[4] = { v0, v1, v2, v3 };
+
+ // Set up the 10 iteration loop and perform all 8 quarter round ops
+ __ mov(loopCtr, 10);
+ __ BIND(L_twoRounds);
+
+ // Set to columnar organization and do the following 4 quarter-rounds:
+ // QUARTERROUND(0, 4, 8, 12)
+ // QUARTERROUND(1, 5, 9, 13)
+ // QUARTERROUND(2, 6, 10, 14)
+ // QUARTERROUND(3, 7, 11, 15)
+ __ cc20_set_qr_registers(bSet, workSt, 4, 5, 6, 7);
+ __ cc20_set_qr_registers(cSet, workSt, 8, 9, 10, 11);
+ __ cc20_set_qr_registers(dSet, workSt, 12, 13, 14, 15);
+
+ __ cc20_qr_add4(aSet, bSet); // a += b
+ __ cc20_qr_xor4(dSet, aSet, dSet); // d ^= a
+ __ cc20_qr_lrot4(dSet, dSet, 16, lrot8Tbl); // d <<<= 16
+
+ __ cc20_qr_add4(cSet, dSet); // c += d
+ __ cc20_qr_xor4(bSet, cSet, scratch); // b ^= c (scratch)
+ __ cc20_qr_lrot4(scratch, bSet, 12, lrot8Tbl); // b <<<= 12
+
+ __ cc20_qr_add4(aSet, bSet); // a += b
+ __ cc20_qr_xor4(dSet, aSet, dSet); // d ^= a
+ __ cc20_qr_lrot4(dSet, dSet, 8, lrot8Tbl); // d <<<= 8
+
+ __ cc20_qr_add4(cSet, dSet); // c += d
+ __ cc20_qr_xor4(bSet, cSet, scratch); // b ^= c (scratch)
+ __ cc20_qr_lrot4(scratch, bSet, 7, lrot8Tbl); // b <<<= 12
+
+ // Set to diagonal organization and do the next 4 quarter-rounds:
+ // QUARTERROUND(0, 5, 10, 15)
+ // QUARTERROUND(1, 6, 11, 12)
+ // QUARTERROUND(2, 7, 8, 13)
+ // QUARTERROUND(3, 4, 9, 14)
+ __ cc20_set_qr_registers(bSet, workSt, 5, 6, 7, 4);
+ __ cc20_set_qr_registers(cSet, workSt, 10, 11, 8, 9);
+ __ cc20_set_qr_registers(dSet, workSt, 15, 12, 13, 14);
+
+ __ cc20_qr_add4(aSet, bSet); // a += b
+ __ cc20_qr_xor4(dSet, aSet, dSet); // d ^= a
+ __ cc20_qr_lrot4(dSet, dSet, 16, lrot8Tbl); // d <<<= 16
+
+ __ cc20_qr_add4(cSet, dSet); // c += d
+ __ cc20_qr_xor4(bSet, cSet, scratch); // b ^= c (scratch)
+ __ cc20_qr_lrot4(scratch, bSet, 12, lrot8Tbl); // b <<<= 12
+
+ __ cc20_qr_add4(aSet, bSet); // a += b
+ __ cc20_qr_xor4(dSet, aSet, dSet); // d ^= a
+ __ cc20_qr_lrot4(dSet, dSet, 8, lrot8Tbl); // d <<<= 8
+
+ __ cc20_qr_add4(cSet, dSet); // c += d
+ __ cc20_qr_xor4(bSet, cSet, scratch); // b ^= c (scratch)
+ __ cc20_qr_lrot4(scratch, bSet, 7, lrot8Tbl); // b <<<= 12
+
+ // Decrement and iterate
+ __ sub(loopCtr, loopCtr, 1);
+ __ cbnz(loopCtr, L_twoRounds);
+
+ __ mov(tmpAddr, state);
+
+ // Add the starting state back to the post-loop keystream
+ // state. We read/interlace the state array from memory into
+ // 4 registers similar to what we did in the beginning. Then
+ // add the counter overlay onto workSt[12] at the end.
+ for (i = 0; i < 16; i += 4) {
+ __ ld4r(v0, v1, v2, v3, __ T4S, __ post(tmpAddr, 16));
+ __ addv(workSt[i], __ T4S, workSt[i], v0);
+ __ addv(workSt[i + 1], __ T4S, workSt[i + 1], v1);
+ __ addv(workSt[i + 2], __ T4S, workSt[i + 2], v2);
+ __ addv(workSt[i + 3], __ T4S, workSt[i + 3], v3);
+ }
+ __ addv(workSt[12], __ T4S, workSt[12], ctrAddOverlay); // Add ctr overlay
+
+ // Write working state into the keystream buffer. This is accomplished
+ // by taking the lane "i" from each of the four vectors and writing
+ // it to consecutive 4-byte offsets, then post-incrementing by 16 and
+ // repeating with the next 4 vectors until all 16 vectors have been used.
+ // Then move to the next lane and repeat the process until all lanes have
+ // been written.
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 16; j += 4) {
+ __ st4(workSt[j], workSt[j + 1], workSt[j + 2], workSt[j + 3], __ S, i,
+ __ post(keystream, 16));
+ }
+ }
+
+ __ mov(r0, 256); // Return length of output keystream
+ __ leave();
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Helpers to schedule parallel operation bundles across vector
+ // register sequences of size 2, 4 or 8.
+
+ // Implement various primitive computations across vector sequences
+
+ template
+ void vs_addv(const VSeq& v, Assembler::SIMD_Arrangement T,
+ const VSeq& v1, const VSeq& v2) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ assert(!vs_write_before_read(v, v2), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ addv(v[i], T, v1[i], v2[i]);
+ }
+ }
+
+ template
+ void vs_subv(const VSeq& v, Assembler::SIMD_Arrangement T,
+ const VSeq& v1, const VSeq& v2) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ assert(!vs_write_before_read(v, v2), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ subv(v[i], T, v1[i], v2[i]);
+ }
+ }
+
+ template
+ void vs_mulv(const VSeq& v, Assembler::SIMD_Arrangement T,
+ const VSeq& v1, const VSeq& v2) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ assert(!vs_write_before_read(v, v2), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ mulv(v[i], T, v1[i], v2[i]);
+ }
+ }
+
+ template
+ void vs_negr(const VSeq& v, Assembler::SIMD_Arrangement T, const VSeq& v1) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ negr(v[i], T, v1[i]);
+ }
+ }
+
+ template
+ void vs_sshr(const VSeq& v, Assembler::SIMD_Arrangement T,
+ const VSeq& v1, int shift) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ sshr(v[i], T, v1[i], shift);
+ }
+ }
+
+ template
+ void vs_andr(const VSeq& v, const VSeq& v1, const VSeq& v2) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ assert(!vs_write_before_read(v, v2), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ andr(v[i], __ T16B, v1[i], v2[i]);
+ }
+ }
+
+ template
+ void vs_orr(const VSeq& v, const VSeq& v1, const VSeq& v2) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ assert(!vs_write_before_read(v, v2), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ orr(v[i], __ T16B, v1[i], v2[i]);
+ }
+ }
+
+ template
+ void vs_notr(const VSeq& v, const VSeq& v1) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ notr(v[i], __ T16B, v1[i]);
+ }
+ }
+
+ template
+ void vs_sqdmulh(const VSeq& v, Assembler::SIMD_Arrangement T, const VSeq& v1, const VSeq& v2) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ assert(!vs_write_before_read(v, v2), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ sqdmulh(v[i], T, v1[i], v2[i]);
+ }
+ }
+
+ template
+ void vs_mlsv(const VSeq& v, Assembler::SIMD_Arrangement T, const VSeq& v1, VSeq& v2) {
+ // output must not be constant
+ assert(N == 1 || !v.is_constant(), "cannot output multiple values to a constant vector");
+ // output cannot overwrite pending inputs
+ assert(!vs_write_before_read(v, v1), "output overwrites input");
+ assert(!vs_write_before_read(v, v2), "output overwrites input");
+ for (int i = 0; i < N; i++) {
+ __ mlsv(v[i], T, v1[i], v2[i]);
+ }
+ }
+
+ // load N/2 successive pairs of quadword values from memory in order
+ // into N successive vector registers of the sequence via the
+ // address supplied in base.
+ template
+ void vs_ldpq(const VSeq& v, Register base) {
+ for (int i = 0; i < N; i += 2) {
+ __ ldpq(v[i], v[i+1], Address(base, 32 * i));
+ }
+ }
+
+ // load N/2 successive pairs of quadword values from memory in order
+ // into N vector registers of the sequence via the address supplied
+ // in base using post-increment addressing
+ template
+ void vs_ldpq_post(const VSeq& v, Register base) {
+ static_assert((N & (N - 1)) == 0, "sequence length must be even");
+ for (int i = 0; i < N; i += 2) {
+ __ ldpq(v[i], v[i+1], __ post(base, 32));
+ }
+ }
+
+ // store N successive vector registers of the sequence into N/2
+ // successive pairs of quadword memory locations via the address
+ // supplied in base using post-increment addressing
+ template
+ void vs_stpq_post(const VSeq& v, Register base) {
+ static_assert((N & (N - 1)) == 0, "sequence length must be even");
+ for (int i = 0; i < N; i += 2) {
+ __ stpq(v[i], v[i+1], __ post(base, 32));
+ }
+ }
+
+ // load N/2 pairs of quadword values from memory de-interleaved into
+ // N vector registers 2 at a time via the address supplied in base
+ // using post-increment addressing.
+ template
+ void vs_ld2_post(const VSeq& v, Assembler::SIMD_Arrangement T, Register base) {
+ static_assert((N & (N - 1)) == 0, "sequence length must be even");
+ for (int i = 0; i < N; i += 2) {
+ __ ld2(v[i], v[i+1], T, __ post(base, 32));
+ }
+ }
+
+ // store N vector registers interleaved into N/2 pairs of quadword
+ // memory locations via the address supplied in base using
+ // post-increment addressing.
+ template
+ void vs_st2_post(const VSeq& v, Assembler::SIMD_Arrangement T, Register base) {
+ static_assert((N & (N - 1)) == 0, "sequence length must be even");
+ for (int i = 0; i < N; i += 2) {
+ __ st2(v[i], v[i+1], T, __ post(base, 32));
+ }
+ }
+
+ // load N quadword values from memory de-interleaved into N vector
+ // registers 3 elements at a time via the address supplied in base.
+ template
+ void vs_ld3(const VSeq& v, Assembler::SIMD_Arrangement T, Register base) {
+ static_assert(N == ((N / 3) * 3), "sequence length must be multiple of 3");
+ for (int i = 0; i < N; i += 3) {
+ __ ld3(v[i], v[i+1], v[i+2], T, base);
+ }
+ }
+
+ // load N quadword values from memory de-interleaved into N vector
+ // registers 3 elements at a time via the address supplied in base
+ // using post-increment addressing.
+ template
+ void vs_ld3_post(const VSeq& v, Assembler::SIMD_Arrangement T, Register base) {
+ static_assert(N == ((N / 3) * 3), "sequence length must be multiple of 3");
+ for (int i = 0; i < N; i += 3) {
+ __ ld3(v[i], v[i+1], v[i+2], T, __ post(base, 48));
+ }
+ }
+
+ // load N/2 pairs of quadword values from memory into N vector
+ // registers via the address supplied in base with each pair indexed
+ // using the the start offset plus the corresponding entry in the
+ // offsets array
+ template
+ void vs_ldpq_indexed(const VSeq& v, Register base, int start, int (&offsets)[N/2]) {
+ for (int i = 0; i < N/2; i++) {
+ __ ldpq(v[2*i], v[2*i+1], Address(base, start + offsets[i]));
+ }
+ }
+
+ // store N vector registers into N/2 pairs of quadword memory
+ // locations via the address supplied in base with each pair indexed
+ // using the the start offset plus the corresponding entry in the
+ // offsets array
+ template
+ void vs_stpq_indexed(const VSeq& v, Register base, int start, int offsets[N/2]) {
+ for (int i = 0; i < N/2; i++) {
+ __ stpq(v[2*i], v[2*i+1], Address(base, start + offsets[i]));
+ }
+ }
+
+ // load N single quadword values from memory into N vector registers
+ // via the address supplied in base with each value indexed using
+ // the the start offset plus the corresponding entry in the offsets
+ // array
+ template
+ void vs_ldr_indexed(const VSeq& v, Assembler::SIMD_RegVariant T, Register base,
+ int start, int (&offsets)[N]) {
+ for (int i = 0; i < N; i++) {
+ __ ldr(v[i], T, Address(base, start + offsets[i]));
+ }
+ }
+
+ // store N vector registers into N single quadword memory locations
+ // via the address supplied in base with each value indexed using
+ // the the start offset plus the corresponding entry in the offsets
+ // array
+ template
+ void vs_str_indexed(const VSeq& v, Assembler::SIMD_RegVariant T, Register base,
+ int start, int (&offsets)[N]) {
+ for (int i = 0; i < N; i++) {
+ __ str(v[i], T, Address(base, start + offsets[i]));
+ }
+ }
+
+ // load N/2 pairs of quadword values from memory de-interleaved into
+ // N vector registers 2 at a time via the address supplied in base
+ // with each pair indexed using the the start offset plus the
+ // corresponding entry in the offsets array
+ template
+ void vs_ld2_indexed(const VSeq& v, Assembler::SIMD_Arrangement T, Register base,
+ Register tmp, int start, int (&offsets)[N/2]) {
+ for (int i = 0; i < N/2; i++) {
+ __ add(tmp, base, start + offsets[i]);
+ __ ld2(v[2*i], v[2*i+1], T, tmp);
+ }
+ }
+
+ // store N vector registers 2 at a time interleaved into N/2 pairs
+ // of quadword memory locations via the address supplied in base
+ // with each pair indexed using the the start offset plus the
+ // corresponding entry in the offsets array
+ template
+ void vs_st2_indexed(const VSeq& v, Assembler::SIMD_Arrangement T, Register base,
+ Register tmp, int start, int (&offsets)[N/2]) {
+ for (int i = 0; i < N/2; i++) {
+ __ add(tmp, base, start + offsets[i]);
+ __ st2(v[2*i], v[2*i+1], T, tmp);
+ }
+ }
+
+ // Helper routines for various flavours of Montgomery multiply
+
+ // Perform 16 32-bit (4x4S) or 32 16-bit (4 x 8H) Montgomery
+ // multiplications in parallel
+ //
+
+ // See the montMul() method of the sun.security.provider.ML_DSA
+ // class.
+ //
+ // Computes 4x4S results or 8x8H results
+ // a = b * c * 2^MONT_R_BITS mod MONT_Q
+ // Inputs: vb, vc - 4x4S or 4x8H vector register sequences
+ // vq - 2x4S or 2x8H constants
+ // Temps: vtmp - 4x4S or 4x8H vector sequence trashed after call
+ // Outputs: va - 4x4S or 4x8H vector register sequences
+ // vb, vc, vtmp and vq must all be disjoint
+ // va must be disjoint from all other inputs/temps or must equal vc
+ // va must have a non-zero delta i.e. it must not be a constant vseq.
+ // n.b. MONT_R_BITS is 16 or 32, so the right shift by it is implicit.
+ void vs_montmul4(const VSeq<4>& va, const VSeq<4>& vb, const VSeq<4>& vc,
+ Assembler::SIMD_Arrangement T,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ assert (T == __ T4S || T == __ T8H, "invalid arrangement for montmul");
+ assert(vs_disjoint(vb, vc), "vb and vc overlap");
+ assert(vs_disjoint(vb, vq), "vb and vq overlap");
+ assert(vs_disjoint(vb, vtmp), "vb and vtmp overlap");
+
+ assert(vs_disjoint(vc, vq), "vc and vq overlap");
+ assert(vs_disjoint(vc, vtmp), "vc and vtmp overlap");
+
+ assert(vs_disjoint(vq, vtmp), "vq and vtmp overlap");
+
+ assert(vs_disjoint(va, vc) || vs_same(va, vc), "va and vc neither disjoint nor equal");
+ assert(vs_disjoint(va, vb), "va and vb overlap");
+ assert(vs_disjoint(va, vq), "va and vq overlap");
+ assert(vs_disjoint(va, vtmp), "va and vtmp overlap");
+ assert(!va.is_constant(), "output vector must identify 4 different registers");
+
+ // schedule 4 streams of instructions across the vector sequences
+ for (int i = 0; i < 4; i++) {
+ __ sqdmulh(vtmp[i], T, vb[i], vc[i]); // aHigh = hi32(2 * b * c)
+ __ mulv(va[i], T, vb[i], vc[i]); // aLow = lo32(b * c)
+ }
+
+ for (int i = 0; i < 4; i++) {
+ __ mulv(va[i], T, va[i], vq[0]); // m = aLow * qinv
+ }
+
+ for (int i = 0; i < 4; i++) {
+ __ sqdmulh(va[i], T, va[i], vq[1]); // n = hi32(2 * m * q)
+ }
+
+ for (int i = 0; i < 4; i++) {
+ __ shsubv(va[i], T, vtmp[i], va[i]); // a = (aHigh - n) / 2
+ }
+ }
+
+ // Perform 8 32-bit (4x4S) or 16 16-bit (2 x 8H) Montgomery
+ // multiplications in parallel
+ //
+
+ // See the montMul() method of the sun.security.provider.ML_DSA
+ // class.
+ //
+ // Computes 4x4S results or 8x8H results
+ // a = b * c * 2^MONT_R_BITS mod MONT_Q
+ // Inputs: vb, vc - 4x4S or 4x8H vector register sequences
+ // vq - 2x4S or 2x8H constants
+ // Temps: vtmp - 4x4S or 4x8H vector sequence trashed after call
+ // Outputs: va - 4x4S or 4x8H vector register sequences
+ // vb, vc, vtmp and vq must all be disjoint
+ // va must be disjoint from all other inputs/temps or must equal vc
+ // va must have a non-zero delta i.e. it must not be a constant vseq.
+ // n.b. MONT_R_BITS is 16 or 32, so the right shift by it is implicit.
+ void vs_montmul2(const VSeq<2>& va, const VSeq<2>& vb, const VSeq<2>& vc,
+ Assembler::SIMD_Arrangement T,
+ const VSeq<2>& vtmp, const VSeq<2>& vq) {
+ assert (T == __ T4S || T == __ T8H, "invalid arrangement for montmul");
+ assert(vs_disjoint(vb, vc), "vb and vc overlap");
+ assert(vs_disjoint(vb, vq), "vb and vq overlap");
+ assert(vs_disjoint(vb, vtmp), "vb and vtmp overlap");
+
+ assert(vs_disjoint(vc, vq), "vc and vq overlap");
+ assert(vs_disjoint(vc, vtmp), "vc and vtmp overlap");
+
+ assert(vs_disjoint(vq, vtmp), "vq and vtmp overlap");
+
+ assert(vs_disjoint(va, vc) || vs_same(va, vc), "va and vc neither disjoint nor equal");
+ assert(vs_disjoint(va, vb), "va and vb overlap");
+ assert(vs_disjoint(va, vq), "va and vq overlap");
+ assert(vs_disjoint(va, vtmp), "va and vtmp overlap");
+ assert(!va.is_constant(), "output vector must identify 2 different registers");
+
+ // schedule 2 streams of instructions across the vector sequences
+ for (int i = 0; i < 2; i++) {
+ __ sqdmulh(vtmp[i], T, vb[i], vc[i]); // aHigh = hi32(2 * b * c)
+ __ mulv(va[i], T, vb[i], vc[i]); // aLow = lo32(b * c)
+ }
+
+ for (int i = 0; i < 2; i++) {
+ __ mulv(va[i], T, va[i], vq[0]); // m = aLow * qinv
+ }
+
+ for (int i = 0; i < 2; i++) {
+ __ sqdmulh(va[i], T, va[i], vq[1]); // n = hi32(2 * m * q)
+ }
+
+ for (int i = 0; i < 2; i++) {
+ __ shsubv(va[i], T, vtmp[i], va[i]); // a = (aHigh - n) / 2
+ }
+ }
+
+ // Perform 16 16-bit Montgomery multiplications in parallel.
+ void kyber_montmul16(const VSeq<2>& va, const VSeq<2>& vb, const VSeq<2>& vc,
+ const VSeq<2>& vtmp, const VSeq<2>& vq) {
+ // Use the helper routine to schedule a 2x8H Montgomery multiply.
+ // It will assert that the register use is valid
+ vs_montmul2(va, vb, vc, __ T8H, vtmp, vq);
+ }
+
+ // Perform 32 16-bit Montgomery multiplications in parallel.
+ void kyber_montmul32(const VSeq<4>& va, const VSeq<4>& vb, const VSeq<4>& vc,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ // Use the helper routine to schedule a 4x8H Montgomery multiply.
+ // It will assert that the register use is valid
+ vs_montmul4(va, vb, vc, __ T8H, vtmp, vq);
+ }
+
+ // Perform 64 16-bit Montgomery multiplications in parallel.
+ void kyber_montmul64(const VSeq<8>& va, const VSeq<8>& vb, const VSeq<8>& vc,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ // Schedule two successive 4x8H multiplies via the montmul helper
+ // on the front and back halves of va, vb and vc. The helper will
+ // assert that the register use has no overlap conflicts on each
+ // individual call but we also need to ensure that the necessary
+ // disjoint/equality constraints are met across both calls.
+
+ // vb, vc, vtmp and vq must be disjoint. va must either be
+ // disjoint from all other registers or equal vc
+
+ assert(vs_disjoint(vb, vc), "vb and vc overlap");
+ assert(vs_disjoint(vb, vq), "vb and vq overlap");
+ assert(vs_disjoint(vb, vtmp), "vb and vtmp overlap");
+
+ assert(vs_disjoint(vc, vq), "vc and vq overlap");
+ assert(vs_disjoint(vc, vtmp), "vc and vtmp overlap");
+
+ assert(vs_disjoint(vq, vtmp), "vq and vtmp overlap");
+
+ assert(vs_disjoint(va, vc) || vs_same(va, vc), "va and vc neither disjoint nor equal");
+ assert(vs_disjoint(va, vb), "va and vb overlap");
+ assert(vs_disjoint(va, vq), "va and vq overlap");
+ assert(vs_disjoint(va, vtmp), "va and vtmp overlap");
+
+ // we multiply the front and back halves of each sequence 4 at a
+ // time because
+ //
+ // 1) we are currently only able to get 4-way instruction
+ // parallelism at best
+ //
+ // 2) we need registers for the constants in vq and temporary
+ // scratch registers to hold intermediate results so vtmp can only
+ // be a VSeq<4> which means we only have 4 scratch slots
+
+ vs_montmul4(vs_front(va), vs_front(vb), vs_front(vc), __ T8H, vtmp, vq);
+ vs_montmul4(vs_back(va), vs_back(vb), vs_back(vc), __ T8H, vtmp, vq);
+ }
+
+ void kyber_montmul32_sub_add(const VSeq<4>& va0, const VSeq<4>& va1,
+ const VSeq<4>& vc,
+ const VSeq<4>& vtmp,
+ const VSeq<2>& vq) {
+ // compute a = montmul(a1, c)
+ kyber_montmul32(vc, va1, vc, vtmp, vq);
+ // ouptut a1 = a0 - a
+ vs_subv(va1, __ T8H, va0, vc);
+ // and a0 = a0 + a
+ vs_addv(va0, __ T8H, va0, vc);
+ }
+
+ void kyber_sub_add_montmul32(const VSeq<4>& va0, const VSeq<4>& va1,
+ const VSeq<4>& vb,
+ const VSeq<4>& vtmp1,
+ const VSeq<4>& vtmp2,
+ const VSeq<2>& vq) {
+ // compute c = a0 - a1
+ vs_subv(vtmp1, __ T8H, va0, va1);
+ // output a0 = a0 + a1
+ vs_addv(va0, __ T8H, va0, va1);
+ // output a1 = b montmul c
+ kyber_montmul32(va1, vtmp1, vb, vtmp2, vq);
+ }
+
+ void load64shorts(const VSeq<8>& v, Register shorts) {
+ vs_ldpq_post(v, shorts);
+ }
+
+ void load32shorts(const VSeq<4>& v, Register shorts) {
+ vs_ldpq_post(v, shorts);
+ }
+
+ void store64shorts(VSeq<8> v, Register tmpAddr) {
+ vs_stpq_post(v, tmpAddr);
+ }
+
+ // Kyber NTT function.
+ // Implements
+ // static int implKyberNtt(short[] poly, short[] ntt_zetas) {}
+ //
+ // coeffs (short[256]) = c_rarg0
+ // ntt_zetas (short[256]) = c_rarg1
+ address generate_kyberNtt() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::kyberNtt_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register coeffs = c_rarg0;
+ const Register zetas = c_rarg1;
+
+ const Register kyberConsts = r10;
+ const Register tmpAddr = r11;
+
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x8H inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+
+ __ lea(kyberConsts, ExternalAddress((address) StubRoutines::aarch64::_kyberConsts));
+ // load the montmul constants
+ vs_ldpq(vq, kyberConsts);
+
+ // Each level corresponds to an iteration of the outermost loop of the
+ // Java method seilerNTT(int[] coeffs). There are some differences
+ // from what is done in the seilerNTT() method, though:
+ // 1. The computation is using 16-bit signed values, we do not convert them
+ // to ints here.
+ // 2. The zetas are delivered in a bigger array, 128 zetas are stored in
+ // this array for each level, it is easier that way to fill up the vector
+ // registers.
+ // 3. In the seilerNTT() method we use R = 2^20 for the Montgomery
+ // multiplications (this is because that way there should not be any
+ // overflow during the inverse NTT computation), here we usr R = 2^16 so
+ // that we can use the 16-bit arithmetic in the vector unit.
+ //
+ // On each level, we fill up the vector registers in such a way that the
+ // array elements that need to be multiplied by the zetas go into one
+ // set of vector registers while the corresponding ones that don't need to
+ // be multiplied, go into another set.
+ // We can do 32 Montgomery multiplications in parallel, using 12 vector
+ // registers interleaving the steps of 4 identical computations,
+ // each done on 8 16-bit values per register.
+
+ // At levels 0-3 the coefficients multiplied by or added/subtracted
+ // to the zetas occur in discrete blocks whose size is some multiple
+ // of 32.
+
+ // level 0
+ __ add(tmpAddr, coeffs, 256);
+ load64shorts(vs1, tmpAddr);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 0);
+ load64shorts(vs1, tmpAddr);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 0);
+ vs_stpq_post(vs1, tmpAddr);
+ __ add(tmpAddr, coeffs, 256);
+ vs_stpq_post(vs3, tmpAddr);
+ // restore montmul constants
+ vs_ldpq(vq, kyberConsts);
+ load64shorts(vs1, tmpAddr);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 128);
+ load64shorts(vs1, tmpAddr);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 128);
+ store64shorts(vs1, tmpAddr);
+ __ add(tmpAddr, coeffs, 384);
+ store64shorts(vs3, tmpAddr);
+
+ // level 1
+ // restore montmul constants
+ vs_ldpq(vq, kyberConsts);
+ __ add(tmpAddr, coeffs, 128);
+ load64shorts(vs1, tmpAddr);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 0);
+ load64shorts(vs1, tmpAddr);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 0);
+ store64shorts(vs1, tmpAddr);
+ store64shorts(vs3, tmpAddr);
+ vs_ldpq(vq, kyberConsts);
+ __ add(tmpAddr, coeffs, 384);
+ load64shorts(vs1, tmpAddr);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 256);
+ load64shorts(vs1, tmpAddr);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 256);
+ store64shorts(vs1, tmpAddr);
+ store64shorts(vs3, tmpAddr);
+
+ // level 2
+ vs_ldpq(vq, kyberConsts);
+ int offsets1[4] = { 0, 32, 128, 160 };
+ vs_ldpq_indexed(vs1, coeffs, 64, offsets1);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_ldpq_indexed(vs1, coeffs, 0, offsets1);
+ // kyber_subv_addv64();
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 0);
+ vs_stpq_post(vs_front(vs1), tmpAddr);
+ vs_stpq_post(vs_front(vs3), tmpAddr);
+ vs_stpq_post(vs_back(vs1), tmpAddr);
+ vs_stpq_post(vs_back(vs3), tmpAddr);
+ vs_ldpq(vq, kyberConsts);
+ vs_ldpq_indexed(vs1, tmpAddr, 64, offsets1);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_ldpq_indexed(vs1, coeffs, 256, offsets1);
+ // kyber_subv_addv64();
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 256);
+ vs_stpq_post(vs_front(vs1), tmpAddr);
+ vs_stpq_post(vs_front(vs3), tmpAddr);
+ vs_stpq_post(vs_back(vs1), tmpAddr);
+ vs_stpq_post(vs_back(vs3), tmpAddr);
+
+ // level 3
+ vs_ldpq(vq, kyberConsts);
+ int offsets2[4] = { 0, 64, 128, 192 };
+ vs_ldpq_indexed(vs1, coeffs, 32, offsets2);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_ldpq_indexed(vs1, coeffs, 0, offsets2);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ vs_stpq_indexed(vs1, coeffs, 0, offsets2);
+ vs_stpq_indexed(vs3, coeffs, 32, offsets2);
+
+ vs_ldpq(vq, kyberConsts);
+ vs_ldpq_indexed(vs1, coeffs, 256 + 32, offsets2);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_ldpq_indexed(vs1, coeffs, 256, offsets2);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ vs_stpq_indexed(vs1, coeffs, 256, offsets2);
+ vs_stpq_indexed(vs3, coeffs, 256 + 32, offsets2);
+
+ // level 4
+ // At level 4 coefficients occur in 8 discrete blocks of size 16
+ // so they are loaded using employing an ldr at 8 distinct offsets.
+
+ vs_ldpq(vq, kyberConsts);
+ int offsets3[8] = { 0, 32, 64, 96, 128, 160, 192, 224 };
+ vs_ldr_indexed(vs1, __ Q, coeffs, 16, offsets3);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_ldr_indexed(vs1, __ Q, coeffs, 0, offsets3);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ vs_str_indexed(vs1, __ Q, coeffs, 0, offsets3);
+ vs_str_indexed(vs3, __ Q, coeffs, 16, offsets3);
+
+ vs_ldpq(vq, kyberConsts);
+ vs_ldr_indexed(vs1, __ Q, coeffs, 256 + 16, offsets3);
+ load64shorts(vs2, zetas);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_ldr_indexed(vs1, __ Q, coeffs, 256, offsets3);
+ vs_subv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_addv(vs1, __ T8H, vs1, vs2);
+ vs_str_indexed(vs1, __ Q, coeffs, 256, offsets3);
+ vs_str_indexed(vs3, __ Q, coeffs, 256 + 16, offsets3);
+
+ // level 5
+ // At level 5 related coefficients occur in discrete blocks of size 8 so
+ // need to be loaded interleaved using an ld2 operation with arrangement 2D.
+
+ vs_ldpq(vq, kyberConsts);
+ int offsets4[4] = { 0, 32, 64, 96 };
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 0, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 0, offsets4);
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 128, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 128, offsets4);
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 256, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 256, offsets4);
+
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 384, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 384, offsets4);
+
+ // level 6
+ // At level 6 related coefficients occur in discrete blocks of size 4 so
+ // need to be loaded interleaved using an ld2 operation with arrangement 4S.
+
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 0, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 0, offsets4);
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 128, offsets4);
+ // __ ldpq(v18, v19, __ post(zetas, 32));
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 128, offsets4);
+
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 256, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 256, offsets4);
+
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 384, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_montmul32_sub_add(vs_even(vs1), vs_odd(vs1), vs_front(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 384, offsets4);
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Kyber Inverse NTT function
+ // Implements
+ // static int implKyberInverseNtt(short[] poly, short[] zetas) {}
+ //
+ // coeffs (short[256]) = c_rarg0
+ // ntt_zetas (short[256]) = c_rarg1
+ address generate_kyberInverseNtt() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::kyberInverseNtt_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register coeffs = c_rarg0;
+ const Register zetas = c_rarg1;
+
+ const Register kyberConsts = r10;
+ const Register tmpAddr = r11;
+ const Register tmpAddr2 = c_rarg2;
+
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x8H inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+
+ __ lea(kyberConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_kyberConsts));
+
+ // level 0
+ // At level 0 related coefficients occur in discrete blocks of size 4 so
+ // need to be loaded interleaved using an ld2 operation with arrangement 4S.
+
+ vs_ldpq(vq, kyberConsts);
+ int offsets4[4] = { 0, 32, 64, 96 };
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 0, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 0, offsets4);
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 128, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 128, offsets4);
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 256, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 256, offsets4);
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, 384, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, 384, offsets4);
+
+ // level 1
+ // At level 1 related coefficients occur in discrete blocks of size 8 so
+ // need to be loaded interleaved using an ld2 operation with arrangement 2D.
+
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 0, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 0, offsets4);
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 128, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 128, offsets4);
+
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 256, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 256, offsets4);
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, 384, offsets4);
+ load32shorts(vs_front(vs2), zetas);
+ kyber_sub_add_montmul32(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, 384, offsets4);
+
+ // level 2
+ // At level 2 coefficients occur in 8 discrete blocks of size 16
+ // so they are loaded using employing an ldr at 8 distinct offsets.
+
+ int offsets3[8] = { 0, 32, 64, 96, 128, 160, 192, 224 };
+ vs_ldr_indexed(vs1, __ Q, coeffs, 0, offsets3);
+ vs_ldr_indexed(vs2, __ Q, coeffs, 16, offsets3);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ vs_str_indexed(vs3, __ Q, coeffs, 0, offsets3);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_str_indexed(vs2, __ Q, coeffs, 16, offsets3);
+
+ vs_ldr_indexed(vs1, __ Q, coeffs, 256, offsets3);
+ vs_ldr_indexed(vs2, __ Q, coeffs, 256 + 16, offsets3);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ vs_str_indexed(vs3, __ Q, coeffs, 256, offsets3);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_str_indexed(vs2, __ Q, coeffs, 256 + 16, offsets3);
+
+ // Barrett reduction at indexes where overflow may happen
+
+ // load q and the multiplier for the Barrett reduction
+ __ add(tmpAddr, kyberConsts, 16);
+ vs_ldpq(vq, tmpAddr);
+
+ VSeq<8> vq1 = VSeq<8>(vq[0], 0); // 2 constant 8 sequences
+ VSeq<8> vq2 = VSeq<8>(vq[1], 0); // for above two kyber constants
+ VSeq<8> vq3 = VSeq<8>(v29, 0); // 3rd sequence for const montmul
+ vs_ldr_indexed(vs1, __ Q, coeffs, 0, offsets3);
+ vs_sqdmulh(vs2, __ T8H, vs1, vq2);
+ vs_sshr(vs2, __ T8H, vs2, 11);
+ vs_mlsv(vs1, __ T8H, vs2, vq1);
+ vs_str_indexed(vs1, __ Q, coeffs, 0, offsets3);
+ vs_ldr_indexed(vs1, __ Q, coeffs, 256, offsets3);
+ vs_sqdmulh(vs2, __ T8H, vs1, vq2);
+ vs_sshr(vs2, __ T8H, vs2, 11);
+ vs_mlsv(vs1, __ T8H, vs2, vq1);
+ vs_str_indexed(vs1, __ Q, coeffs, 256, offsets3);
+
+ // level 3
+ // From level 3 upwards coefficients occur in discrete blocks whose size is
+ // some multiple of 32 so can be loaded using ldpq and suitable indexes.
+
+ int offsets2[4] = { 0, 64, 128, 192 };
+ vs_ldpq_indexed(vs1, coeffs, 0, offsets2);
+ vs_ldpq_indexed(vs2, coeffs, 32, offsets2);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ vs_stpq_indexed(vs3, coeffs, 0, offsets2);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_stpq_indexed(vs2, coeffs, 32, offsets2);
+
+ vs_ldpq_indexed(vs1, coeffs, 256, offsets2);
+ vs_ldpq_indexed(vs2, coeffs, 256 + 32, offsets2);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ vs_stpq_indexed(vs3, coeffs, 256, offsets2);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_stpq_indexed(vs2, coeffs, 256 + 32, offsets2);
+
+ // level 4
+
+ int offsets1[4] = { 0, 32, 128, 160 };
+ vs_ldpq_indexed(vs1, coeffs, 0, offsets1);
+ vs_ldpq_indexed(vs2, coeffs, 64, offsets1);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ vs_stpq_indexed(vs3, coeffs, 0, offsets1);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_stpq_indexed(vs2, coeffs, 64, offsets1);
+
+ vs_ldpq_indexed(vs1, coeffs, 256, offsets1);
+ vs_ldpq_indexed(vs2, coeffs, 256 + 64, offsets1);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ vs_stpq_indexed(vs3, coeffs, 256, offsets1);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ vs_stpq_indexed(vs2, coeffs, 256 + 64, offsets1);
+
+ // level 5
+
+ __ add(tmpAddr, coeffs, 0);
+ load64shorts(vs1, tmpAddr);
+ __ add(tmpAddr, coeffs, 128);
+ load64shorts(vs2, tmpAddr);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 0);
+ store64shorts(vs3, tmpAddr);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 128);
+ store64shorts(vs2, tmpAddr);
+
+ load64shorts(vs1, tmpAddr);
+ __ add(tmpAddr, coeffs, 384);
+ load64shorts(vs2, tmpAddr);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 256);
+ store64shorts(vs3, tmpAddr);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 384);
+ store64shorts(vs2, tmpAddr);
+
+ // Barrett reduction at indexes where overflow may happen
+
+ // load q and the multiplier for the Barrett reduction
+ __ add(tmpAddr, kyberConsts, 16);
+ vs_ldpq(vq, tmpAddr);
+
+ int offsets0[2] = { 0, 256 };
+ vs_ldpq_indexed(vs_front(vs1), coeffs, 0, offsets0);
+ vs_sqdmulh(vs2, __ T8H, vs1, vq2);
+ vs_sshr(vs2, __ T8H, vs2, 11);
+ vs_mlsv(vs1, __ T8H, vs2, vq1);
+ vs_stpq_indexed(vs_front(vs1), coeffs, 0, offsets0);
+
+ // level 6
+
+ __ add(tmpAddr, coeffs, 0);
+ load64shorts(vs1, tmpAddr);
+ __ add(tmpAddr, coeffs, 256);
+ load64shorts(vs2, tmpAddr);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 0);
+ store64shorts(vs3, tmpAddr);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 256);
+ store64shorts(vs2, tmpAddr);
+
+ __ add(tmpAddr, coeffs, 128);
+ load64shorts(vs1, tmpAddr);
+ __ add(tmpAddr, coeffs, 384);
+ load64shorts(vs2, tmpAddr);
+ vs_addv(vs3, __ T8H, vs1, vs2); // n.b. trashes vq
+ vs_subv(vs1, __ T8H, vs1, vs2);
+ __ add(tmpAddr, coeffs, 128);
+ store64shorts(vs3, tmpAddr);
+ load64shorts(vs2, zetas);
+ vs_ldpq(vq, kyberConsts);
+ kyber_montmul64(vs2, vs1, vs2, vtmp, vq);
+ __ add(tmpAddr, coeffs, 384);
+ store64shorts(vs2, tmpAddr);
+
+ // multiply by 2^-n
+
+ // load toMont(2^-n mod q)
+ __ add(tmpAddr, kyberConsts, 48);
+ __ ldr(v29, __ Q, tmpAddr);
+
+ vs_ldpq(vq, kyberConsts);
+ __ add(tmpAddr, coeffs, 0);
+ load64shorts(vs1, tmpAddr);
+ kyber_montmul64(vs2, vs1, vq3, vtmp, vq);
+ __ add(tmpAddr, coeffs, 0);
+ store64shorts(vs2, tmpAddr);
+
+ // now tmpAddr contains coeffs + 128 because store64shorts adjusted it so
+ load64shorts(vs1, tmpAddr);
+ kyber_montmul64(vs2, vs1, vq3, vtmp, vq);
+ __ add(tmpAddr, coeffs, 128);
+ store64shorts(vs2, tmpAddr);
+
+ // now tmpAddr contains coeffs + 256
+ load64shorts(vs1, tmpAddr);
+ kyber_montmul64(vs2, vs1, vq3, vtmp, vq);
+ __ add(tmpAddr, coeffs, 256);
+ store64shorts(vs2, tmpAddr);
+
+ // now tmpAddr contains coeffs + 384
+ load64shorts(vs1, tmpAddr);
+ kyber_montmul64(vs2, vs1, vq3, vtmp, vq);
+ __ add(tmpAddr, coeffs, 384);
+ store64shorts(vs2, tmpAddr);
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Kyber multiply polynomials in the NTT domain.
+ // Implements
+ // static int implKyberNttMult(
+ // short[] result, short[] ntta, short[] nttb, short[] zetas) {}
+ //
+ // result (short[256]) = c_rarg0
+ // ntta (short[256]) = c_rarg1
+ // nttb (short[256]) = c_rarg2
+ // zetas (short[128]) = c_rarg3
+ address generate_kyberNttMult() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::kyberNttMult_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register result = c_rarg0;
+ const Register ntta = c_rarg1;
+ const Register nttb = c_rarg2;
+ const Register zetas = c_rarg3;
+
+ const Register kyberConsts = r10;
+ const Register limit = r11;
+
+ VSeq<4> vs1(0), vs2(4); // 4 sets of 8x8H inputs/outputs/tmps
+ VSeq<4> vs3(16), vs4(20);
+ VSeq<2> vq(30); // pair of constants for montmul: q, qinv
+ VSeq<2> vz(28); // pair of zetas
+ VSeq<4> vc(27, 0); // constant sequence for montmul: montRSquareModQ
+
+ __ lea(kyberConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_kyberConsts));
+
+ Label kyberNttMult_loop;
+
+ __ add(limit, result, 512);
+
+ // load q and qinv
+ vs_ldpq(vq, kyberConsts);
+
+ // load R^2 mod q (to convert back from Montgomery representation)
+ __ add(kyberConsts, kyberConsts, 64);
+ __ ldr(v27, __ Q, kyberConsts);
+
+ __ BIND(kyberNttMult_loop);
+
+ // load 16 zetas
+ vs_ldpq_post(vz, zetas);
+
+ // load 2 sets of 32 coefficients from the two input arrays
+ // interleaved as shorts. i.e. pairs of shorts adjacent in memory
+ // are striped across pairs of vector registers
+ vs_ld2_post(vs_front(vs1), __ T8H, ntta); // x 8H
+ vs_ld2_post(vs_back(vs1), __ T8H, nttb); // x 8H
+ vs_ld2_post(vs_front(vs4), __ T8H, ntta); // x 8H
+ vs_ld2_post(vs_back(vs4), __ T8H, nttb); // x 8H
+
+ // compute 4 montmul cross-products for pairs (a0,a1) and (b0,b1)
+ // i.e. montmul the first and second halves of vs1 in order and
+ // then with one sequence reversed storing the two results in vs3
+ //
+ // vs3[0] <- montmul(a0, b0)
+ // vs3[1] <- montmul(a1, b1)
+ // vs3[2] <- montmul(a0, b1)
+ // vs3[3] <- montmul(a1, b0)
+ kyber_montmul16(vs_front(vs3), vs_front(vs1), vs_back(vs1), vs_front(vs2), vq);
+ kyber_montmul16(vs_back(vs3),
+ vs_front(vs1), vs_reverse(vs_back(vs1)), vs_back(vs2), vq);
+
+ // compute 4 montmul cross-products for pairs (a2,a3) and (b2,b3)
+ // i.e. montmul the first and second halves of vs4 in order and
+ // then with one sequence reversed storing the two results in vs1
+ //
+ // vs1[0] <- montmul(a2, b2)
+ // vs1[1] <- montmul(a3, b3)
+ // vs1[2] <- montmul(a2, b3)
+ // vs1[3] <- montmul(a3, b2)
+ kyber_montmul16(vs_front(vs1), vs_front(vs4), vs_back(vs4), vs_front(vs2), vq);
+ kyber_montmul16(vs_back(vs1),
+ vs_front(vs4), vs_reverse(vs_back(vs4)), vs_back(vs2), vq);
+
+ // montmul result 2 of each cross-product i.e. (a1*b1, a3*b3) by a zeta.
+ // We can schedule two montmuls at a time if we use a suitable vector
+ // sequence .
+ int delta = vs1[1]->encoding() - vs3[1]->encoding();
+ VSeq<2> vs5(vs3[1], delta);
+
+ // vs3[1] <- montmul(montmul(a1, b1), z0)
+ // vs1[1] <- montmul(montmul(a3, b3), z1)
+ kyber_montmul16(vs5, vz, vs5, vs_front(vs2), vq);
+
+ // add results in pairs storing in vs3
+ // vs3[0] <- montmul(a0, b0) + montmul(montmul(a1, b1), z0);
+ // vs3[1] <- montmul(a0, b1) + montmul(a1, b0);
+ vs_addv(vs_front(vs3), __ T8H, vs_even(vs3), vs_odd(vs3));
+
+ // vs3[2] <- montmul(a2, b2) + montmul(montmul(a3, b3), z1);
+ // vs3[3] <- montmul(a2, b3) + montmul(a3, b2);
+ vs_addv(vs_back(vs3), __ T8H, vs_even(vs1), vs_odd(vs1));
+
+ // vs1 <- montmul(vs3, montRSquareModQ)
+ kyber_montmul32(vs1, vs3, vc, vs2, vq);
+
+ // store back the two pairs of result vectors de-interleaved as 8H elements
+ // i.e. storing each pairs of shorts striped across a register pair adjacent
+ // in memory
+ vs_st2_post(vs1, __ T8H, result);
+
+ __ cmp(result, limit);
+ __ br(Assembler::NE, kyberNttMult_loop);
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Kyber add 2 polynomials.
+ // Implements
+ // static int implKyberAddPoly(short[] result, short[] a, short[] b) {}
+ //
+ // result (short[256]) = c_rarg0
+ // a (short[256]) = c_rarg1
+ // b (short[256]) = c_rarg2
+ address generate_kyberAddPoly_2() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::kyberAddPoly_2_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register result = c_rarg0;
+ const Register a = c_rarg1;
+ const Register b = c_rarg2;
+
+ const Register kyberConsts = r11;
+
+ // We sum 256 sets of values in total i.e. 32 x 8H quadwords.
+ // So, we can load, add and store the data in 3 groups of 11,
+ // 11 and 10 at a time i.e. we need to map sets of 10 or 11
+ // registers. A further constraint is that the mapping needs
+ // to skip callee saves. So, we allocate the register
+ // sequences using two 8 sequences, two 2 sequences and two
+ // single registers.
+ VSeq<8> vs1_1(0);
+ VSeq<2> vs1_2(16);
+ FloatRegister vs1_3 = v28;
+ VSeq<8> vs2_1(18);
+ VSeq<2> vs2_2(26);
+ FloatRegister vs2_3 = v29;
+
+ // two constant vector sequences
+ VSeq<8> vc_1(31, 0);
+ VSeq<2> vc_2(31, 0);
+
+ FloatRegister vc_3 = v31;
+ __ lea(kyberConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_kyberConsts));
+
+ __ ldr(vc_3, __ Q, Address(kyberConsts, 16)); // q
+ for (int i = 0; i < 3; i++) {
+ // load 80 or 88 values from a into vs1_1/2/3
+ vs_ldpq_post(vs1_1, a);
+ vs_ldpq_post(vs1_2, a);
+ if (i < 2) {
+ __ ldr(vs1_3, __ Q, __ post(a, 16));
+ }
+ // load 80 or 88 values from b into vs2_1/2/3
+ vs_ldpq_post(vs2_1, b);
+ vs_ldpq_post(vs2_2, b);
+ if (i < 2) {
+ __ ldr(vs2_3, __ Q, __ post(b, 16));
+ }
+ // sum 80 or 88 values across vs1 and vs2 into vs1
+ vs_addv(vs1_1, __ T8H, vs1_1, vs2_1);
+ vs_addv(vs1_2, __ T8H, vs1_2, vs2_2);
+ if (i < 2) {
+ __ addv(vs1_3, __ T8H, vs1_3, vs2_3);
+ }
+ // add constant to all 80 or 88 results
+ vs_addv(vs1_1, __ T8H, vs1_1, vc_1);
+ vs_addv(vs1_2, __ T8H, vs1_2, vc_2);
+ if (i < 2) {
+ __ addv(vs1_3, __ T8H, vs1_3, vc_3);
+ }
+ // store 80 or 88 values
+ vs_stpq_post(vs1_1, result);
+ vs_stpq_post(vs1_2, result);
+ if (i < 2) {
+ __ str(vs1_3, __ Q, __ post(result, 16));
+ }
+ }
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Kyber add 3 polynomials.
+ // Implements
+ // static int implKyberAddPoly(short[] result, short[] a, short[] b, short[] c) {}
+ //
+ // result (short[256]) = c_rarg0
+ // a (short[256]) = c_rarg1
+ // b (short[256]) = c_rarg2
+ // c (short[256]) = c_rarg3
+ address generate_kyberAddPoly_3() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::kyberAddPoly_3_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register result = c_rarg0;
+ const Register a = c_rarg1;
+ const Register b = c_rarg2;
+ const Register c = c_rarg3;
+
+ const Register kyberConsts = r11;
+
+ // As above we sum 256 sets of values in total i.e. 32 x 8H
+ // quadwords. So, we can load, add and store the data in 3
+ // groups of 11, 11 and 10 at a time i.e. we need to map sets
+ // of 10 or 11 registers. A further constraint is that the
+ // mapping needs to skip callee saves. So, we allocate the
+ // register sequences using two 8 sequences, two 2 sequences
+ // and two single registers.
+ VSeq<8> vs1_1(0);
+ VSeq<2> vs1_2(16);
+ FloatRegister vs1_3 = v28;
+ VSeq<8> vs2_1(18);
+ VSeq<2> vs2_2(26);
+ FloatRegister vs2_3 = v29;
+
+ // two constant vector sequences
+ VSeq<8> vc_1(31, 0);
+ VSeq<2> vc_2(31, 0);
+
+ FloatRegister vc_3 = v31;
+
+ __ lea(kyberConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_kyberConsts));
+
+ __ ldr(vc_3, __ Q, Address(kyberConsts, 16)); // q
+ for (int i = 0; i < 3; i++) {
+ // load 80 or 88 values from a into vs1_1/2/3
+ vs_ldpq_post(vs1_1, a);
+ vs_ldpq_post(vs1_2, a);
+ if (i < 2) {
+ __ ldr(vs1_3, __ Q, __ post(a, 16));
+ }
+ // load 80 or 88 values from b into vs2_1/2/3
+ vs_ldpq_post(vs2_1, b);
+ vs_ldpq_post(vs2_2, b);
+ if (i < 2) {
+ __ ldr(vs2_3, __ Q, __ post(b, 16));
+ }
+ // sum 80 or 88 values across vs1 and vs2 into vs1
+ vs_addv(vs1_1, __ T8H, vs1_1, vs2_1);
+ vs_addv(vs1_2, __ T8H, vs1_2, vs2_2);
+ if (i < 2) {
+ __ addv(vs1_3, __ T8H, vs1_3, vs2_3);
+ }
+ // load 80 or 88 values from c into vs2_1/2/3
+ vs_ldpq_post(vs2_1, c);
+ vs_ldpq_post(vs2_2, c);
+ if (i < 2) {
+ __ ldr(vs2_3, __ Q, __ post(c, 16));
+ }
+ // sum 80 or 88 values across vs1 and vs2 into vs1
+ vs_addv(vs1_1, __ T8H, vs1_1, vs2_1);
+ vs_addv(vs1_2, __ T8H, vs1_2, vs2_2);
+ if (i < 2) {
+ __ addv(vs1_3, __ T8H, vs1_3, vs2_3);
+ }
+ // add constant to all 80 or 88 results
+ vs_addv(vs1_1, __ T8H, vs1_1, vc_1);
+ vs_addv(vs1_2, __ T8H, vs1_2, vc_2);
+ if (i < 2) {
+ __ addv(vs1_3, __ T8H, vs1_3, vc_3);
+ }
+ // store 80 or 88 values
+ vs_stpq_post(vs1_1, result);
+ vs_stpq_post(vs1_2, result);
+ if (i < 2) {
+ __ str(vs1_3, __ Q, __ post(result, 16));
+ }
+ }
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Kyber parse XOF output to polynomial coefficient candidates
+ // or decodePoly(12, ...).
+ // Implements
+ // static int implKyber12To16(
+ // byte[] condensed, int index, short[] parsed, int parsedLength) {}
+ //
+ // (parsedLength or (parsedLength - 48) must be divisible by 64.)
+ //
+ // condensed (byte[]) = c_rarg0
+ // condensedIndex = c_rarg1
+ // parsed (short[112 or 256]) = c_rarg2
+ // parsedLength (112 or 256) = c_rarg3
+ address generate_kyber12To16() {
+ Label L_F00, L_loop, L_end;
+
+ __ BIND(L_F00);
+ __ emit_int64(0x0f000f000f000f00);
+ __ emit_int64(0x0f000f000f000f00);
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::kyber12To16_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register condensed = c_rarg0;
+ const Register condensedOffs = c_rarg1;
+ const Register parsed = c_rarg2;
+ const Register parsedLength = c_rarg3;
+
+ const Register tmpAddr = r11;
+
+ // Data is input 96 bytes at a time i.e. in groups of 6 x 16B
+ // quadwords so we need a 6 vector sequence for the inputs.
+ // Parsing produces 64 shorts, employing two 8 vector
+ // sequences to store and combine the intermediate data.
+ VSeq<6> vin(24);
+ VSeq<8> va(0), vb(16);
+
+ __ adr(tmpAddr, L_F00);
+ __ ldr(v31, __ Q, tmpAddr); // 8H times 0x0f00
+ __ add(condensed, condensed, condensedOffs);
+
+ __ BIND(L_loop);
+ // load 96 (6 x 16B) byte values
+ vs_ld3_post(vin, __ T16B, condensed);
+
+ // The front half of sequence vin (vin[0], vin[1] and vin[2])
+ // holds 48 (16x3) contiguous bytes from memory striped
+ // horizontally across each of the 16 byte lanes. Equivalently,
+ // that is 16 pairs of 12-bit integers. Likewise the back half
+ // holds the next 48 bytes in the same arrangement.
+
+ // Each vector in the front half can also be viewed as a vertical
+ // strip across the 16 pairs of 12 bit integers. Each byte in
+ // vin[0] stores the low 8 bits of the first int in a pair. Each
+ // byte in vin[1] stores the high 4 bits of the first int and the
+ // low 4 bits of the second int. Each byte in vin[2] stores the
+ // high 8 bits of the second int. Likewise the vectors in second
+ // half.
+
+ // Converting the data to 16-bit shorts requires first of all
+ // expanding each of the 6 x 16B vectors into 6 corresponding
+ // pairs of 8H vectors. Mask, shift and add operations on the
+ // resulting vector pairs can be used to combine 4 and 8 bit
+ // parts of related 8H vector elements.
+ //
+ // The middle vectors (vin[2] and vin[5]) are actually expanded
+ // twice, one copy manipulated to provide the lower 4 bits
+ // belonging to the first short in a pair and another copy
+ // manipulated to provide the higher 4 bits belonging to the
+ // second short in a pair. This is why the the vector sequences va
+ // and vb used to hold the expanded 8H elements are of length 8.
+
+ // Expand vin[0] into va[0:1], and vin[1] into va[2:3] and va[4:5]
+ // n.b. target elements 2 and 3 duplicate elements 4 and 5
+ __ ushll(va[0], __ T8H, vin[0], __ T8B, 0);
+ __ ushll2(va[1], __ T8H, vin[0], __ T16B, 0);
+ __ ushll(va[2], __ T8H, vin[1], __ T8B, 0);
+ __ ushll2(va[3], __ T8H, vin[1], __ T16B, 0);
+ __ ushll(va[4], __ T8H, vin[1], __ T8B, 0);
+ __ ushll2(va[5], __ T8H, vin[1], __ T16B, 0);
+
+ // likewise expand vin[3] into vb[0:1], and vin[4] into vb[2:3]
+ // and vb[4:5]
+ __ ushll(vb[0], __ T8H, vin[3], __ T8B, 0);
+ __ ushll2(vb[1], __ T8H, vin[3], __ T16B, 0);
+ __ ushll(vb[2], __ T8H, vin[4], __ T8B, 0);
+ __ ushll2(vb[3], __ T8H, vin[4], __ T16B, 0);
+ __ ushll(vb[4], __ T8H, vin[4], __ T8B, 0);
+ __ ushll2(vb[5], __ T8H, vin[4], __ T16B, 0);
+
+ // shift lo byte of copy 1 of the middle stripe into the high byte
+ __ shl(va[2], __ T8H, va[2], 8);
+ __ shl(va[3], __ T8H, va[3], 8);
+ __ shl(vb[2], __ T8H, vb[2], 8);
+ __ shl(vb[3], __ T8H, vb[3], 8);
+
+ // expand vin[2] into va[6:7] and vin[5] into vb[6:7] but this
+ // time pre-shifted by 4 to ensure top bits of input 12-bit int
+ // are in bit positions [4..11].
+ __ ushll(va[6], __ T8H, vin[2], __ T8B, 4);
+ __ ushll2(va[7], __ T8H, vin[2], __ T16B, 4);
+ __ ushll(vb[6], __ T8H, vin[5], __ T8B, 4);
+ __ ushll2(vb[7], __ T8H, vin[5], __ T16B, 4);
+
+ // mask hi 4 bits of the 1st 12-bit int in a pair from copy1 and
+ // shift lo 4 bits of the 2nd 12-bit int in a pair to the bottom of
+ // copy2
+ __ andr(va[2], __ T16B, va[2], v31);
+ __ andr(va[3], __ T16B, va[3], v31);
+ __ ushr(va[4], __ T8H, va[4], 4);
+ __ ushr(va[5], __ T8H, va[5], 4);
+ __ andr(vb[2], __ T16B, vb[2], v31);
+ __ andr(vb[3], __ T16B, vb[3], v31);
+ __ ushr(vb[4], __ T8H, vb[4], 4);
+ __ ushr(vb[5], __ T8H, vb[5], 4);
+
+ // sum hi 4 bits and lo 8 bits of the 1st 12-bit int in each pair and
+ // hi 8 bits plus lo 4 bits of the 2nd 12-bit int in each pair
+ // n.b. the ordering ensures: i) inputs are consumed before they
+ // are overwritten ii) the order of 16-bit results across successive
+ // pairs of vectors in va and then vb reflects the order of the
+ // corresponding 12-bit inputs
+ __ addv(va[0], __ T8H, va[0], va[2]);
+ __ addv(va[2], __ T8H, va[1], va[3]);
+ __ addv(va[1], __ T8H, va[4], va[6]);
+ __ addv(va[3], __ T8H, va[5], va[7]);
+ __ addv(vb[0], __ T8H, vb[0], vb[2]);
+ __ addv(vb[2], __ T8H, vb[1], vb[3]);
+ __ addv(vb[1], __ T8H, vb[4], vb[6]);
+ __ addv(vb[3], __ T8H, vb[5], vb[7]);
+
+ // store 64 results interleaved as shorts
+ vs_st2_post(vs_front(va), __ T8H, parsed);
+ vs_st2_post(vs_front(vb), __ T8H, parsed);
+
+ __ sub(parsedLength, parsedLength, 64);
+ __ cmp(parsedLength, (u1)64);
+ __ br(Assembler::GE, L_loop);
+ __ cbz(parsedLength, L_end);
+
+ // if anything is left it should be a final 72 bytes of input
+ // i.e. a final 48 12-bit values. so we handle this by loading
+ // 48 bytes into all 16B lanes of front(vin) and only 24
+ // bytes into the lower 8B lane of back(vin)
+ vs_ld3_post(vs_front(vin), __ T16B, condensed);
+ vs_ld3(vs_back(vin), __ T8B, condensed);
+
+ // Expand vin[0] into va[0:1], and vin[1] into va[2:3] and va[4:5]
+ // n.b. target elements 2 and 3 of va duplicate elements 4 and
+ // 5 and target element 2 of vb duplicates element 4.
+ __ ushll(va[0], __ T8H, vin[0], __ T8B, 0);
+ __ ushll2(va[1], __ T8H, vin[0], __ T16B, 0);
+ __ ushll(va[2], __ T8H, vin[1], __ T8B, 0);
+ __ ushll2(va[3], __ T8H, vin[1], __ T16B, 0);
+ __ ushll(va[4], __ T8H, vin[1], __ T8B, 0);
+ __ ushll2(va[5], __ T8H, vin[1], __ T16B, 0);
+
+ // This time expand just the lower 8 lanes
+ __ ushll(vb[0], __ T8H, vin[3], __ T8B, 0);
+ __ ushll(vb[2], __ T8H, vin[4], __ T8B, 0);
+ __ ushll(vb[4], __ T8H, vin[4], __ T8B, 0);
+
+ // shift lo byte of copy 1 of the middle stripe into the high byte
+ __ shl(va[2], __ T8H, va[2], 8);
+ __ shl(va[3], __ T8H, va[3], 8);
+ __ shl(vb[2], __ T8H, vb[2], 8);
+
+ // expand vin[2] into va[6:7] and lower 8 lanes of vin[5] into
+ // vb[6] pre-shifted by 4 to ensure top bits of the input 12-bit
+ // int are in bit positions [4..11].
+ __ ushll(va[6], __ T8H, vin[2], __ T8B, 4);
+ __ ushll2(va[7], __ T8H, vin[2], __ T16B, 4);
+ __ ushll(vb[6], __ T8H, vin[5], __ T8B, 4);
+
+ // mask hi 4 bits of each 1st 12-bit int in pair from copy1 and
+ // shift lo 4 bits of each 2nd 12-bit int in pair to bottom of
+ // copy2
+ __ andr(va[2], __ T16B, va[2], v31);
+ __ andr(va[3], __ T16B, va[3], v31);
+ __ ushr(va[4], __ T8H, va[4], 4);
+ __ ushr(va[5], __ T8H, va[5], 4);
+ __ andr(vb[2], __ T16B, vb[2], v31);
+ __ ushr(vb[4], __ T8H, vb[4], 4);
+
+
+
+ // sum hi 4 bits and lo 8 bits of each 1st 12-bit int in pair and
+ // hi 8 bits plus lo 4 bits of each 2nd 12-bit int in pair
+
+ // n.b. ordering ensures: i) inputs are consumed before they are
+ // overwritten ii) order of 16-bit results across succsessive
+ // pairs of vectors in va and then lower half of vb reflects order
+ // of corresponding 12-bit inputs
+ __ addv(va[0], __ T8H, va[0], va[2]);
+ __ addv(va[2], __ T8H, va[1], va[3]);
+ __ addv(va[1], __ T8H, va[4], va[6]);
+ __ addv(va[3], __ T8H, va[5], va[7]);
+ __ addv(vb[0], __ T8H, vb[0], vb[2]);
+ __ addv(vb[1], __ T8H, vb[4], vb[6]);
+
+ // store 48 results interleaved as shorts
+ vs_st2_post(vs_front(va), __ T8H, parsed);
+ vs_st2_post(vs_front(vs_front(vb)), __ T8H, parsed);
+
+ __ BIND(L_end);
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Kyber Barrett reduce function.
+ // Implements
+ // static int implKyberBarrettReduce(short[] coeffs) {}
+ //
+ // coeffs (short[256]) = c_rarg0
+ address generate_kyberBarrettReduce() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::kyberBarrettReduce_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register coeffs = c_rarg0;
+
+ const Register kyberConsts = r10;
+ const Register result = r11;
+
+ // As above we process 256 sets of values in total i.e. 32 x
+ // 8H quadwords. So, we can load, add and store the data in 3
+ // groups of 11, 11 and 10 at a time i.e. we need to map sets
+ // of 10 or 11 registers. A further constraint is that the
+ // mapping needs to skip callee saves. So, we allocate the
+ // register sequences using two 8 sequences, two 2 sequences
+ // and two single registers.
+ VSeq<8> vs1_1(0);
+ VSeq<2> vs1_2(16);
+ FloatRegister vs1_3 = v28;
+ VSeq<8> vs2_1(18);
+ VSeq<2> vs2_2(26);
+ FloatRegister vs2_3 = v29;
+
+ // we also need a pair of corresponding constant sequences
+
+ VSeq<8> vc1_1(30, 0);
+ VSeq<2> vc1_2(30, 0);
+ FloatRegister vc1_3 = v30; // for kyber_q
+
+ VSeq<8> vc2_1(31, 0);
+ VSeq<2> vc2_2(31, 0);
+ FloatRegister vc2_3 = v31; // for kyberBarrettMultiplier
+
+ __ add(result, coeffs, 0);
+ __ lea(kyberConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_kyberConsts));
+
+ // load q and the multiplier for the Barrett reduction
+ __ add(kyberConsts, kyberConsts, 16);
+ __ ldpq(vc1_3, vc2_3, kyberConsts);
+
+ for (int i = 0; i < 3; i++) {
+ // load 80 or 88 coefficients
+ vs_ldpq_post(vs1_1, coeffs);
+ vs_ldpq_post(vs1_2, coeffs);
+ if (i < 2) {
+ __ ldr(vs1_3, __ Q, __ post(coeffs, 16));
+ }
+
+ // vs2 <- (2 * vs1 * kyberBarrettMultiplier) >> 16
+ vs_sqdmulh(vs2_1, __ T8H, vs1_1, vc2_1);
+ vs_sqdmulh(vs2_2, __ T8H, vs1_2, vc2_2);
+ if (i < 2) {
+ __ sqdmulh(vs2_3, __ T8H, vs1_3, vc2_3);
+ }
+
+ // vs2 <- (vs1 * kyberBarrettMultiplier) >> 26
+ vs_sshr(vs2_1, __ T8H, vs2_1, 11);
+ vs_sshr(vs2_2, __ T8H, vs2_2, 11);
+ if (i < 2) {
+ __ sshr(vs2_3, __ T8H, vs2_3, 11);
+ }
+
+ // vs1 <- vs1 - vs2 * kyber_q
+ vs_mlsv(vs1_1, __ T8H, vs2_1, vc1_1);
+ vs_mlsv(vs1_2, __ T8H, vs2_2, vc1_2);
+ if (i < 2) {
+ __ mlsv(vs1_3, __ T8H, vs2_3, vc1_3);
+ }
+
+ vs_stpq_post(vs1_1, result);
+ vs_stpq_post(vs1_2, result);
+ if (i < 2) {
+ __ str(vs1_3, __ Q, __ post(result, 16));
+ }
+ }
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+
+ // Dilithium-specific montmul helper routines that generate parallel
+ // code for, respectively, a single 4x4s vector sequence montmul or
+ // two such multiplies in a row.
+
+ // Perform 16 32-bit Montgomery multiplications in parallel
+ void dilithium_montmul16(const VSeq<4>& va, const VSeq<4>& vb, const VSeq<4>& vc,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ // Use the helper routine to schedule a 4x4S Montgomery multiply.
+ // It will assert that the register use is valid
+ vs_montmul4(va, vb, vc, __ T4S, vtmp, vq);
+ }
+
+ // Perform 2x16 32-bit Montgomery multiplications in parallel
+ void dilithium_montmul32(const VSeq<8>& va, const VSeq<8>& vb, const VSeq<8>& vc,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ // Schedule two successive 4x4S multiplies via the montmul helper
+ // on the front and back halves of va, vb and vc. The helper will
+ // assert that the register use has no overlap conflicts on each
+ // individual call but we also need to ensure that the necessary
+ // disjoint/equality constraints are met across both calls.
+
+ // vb, vc, vtmp and vq must be disjoint. va must either be
+ // disjoint from all other registers or equal vc
+
+ assert(vs_disjoint(vb, vc), "vb and vc overlap");
+ assert(vs_disjoint(vb, vq), "vb and vq overlap");
+ assert(vs_disjoint(vb, vtmp), "vb and vtmp overlap");
+
+ assert(vs_disjoint(vc, vq), "vc and vq overlap");
+ assert(vs_disjoint(vc, vtmp), "vc and vtmp overlap");
+
+ assert(vs_disjoint(vq, vtmp), "vq and vtmp overlap");
+
+ assert(vs_disjoint(va, vc) || vs_same(va, vc), "va and vc neither disjoint nor equal");
+ assert(vs_disjoint(va, vb), "va and vb overlap");
+ assert(vs_disjoint(va, vq), "va and vq overlap");
+ assert(vs_disjoint(va, vtmp), "va and vtmp overlap");
+
+ // We multiply the front and back halves of each sequence 4 at a
+ // time because
+ //
+ // 1) we are currently only able to get 4-way instruction
+ // parallelism at best
+ //
+ // 2) we need registers for the constants in vq and temporary
+ // scratch registers to hold intermediate results so vtmp can only
+ // be a VSeq<4> which means we only have 4 scratch slots.
+
+ vs_montmul4(vs_front(va), vs_front(vb), vs_front(vc), __ T4S, vtmp, vq);
+ vs_montmul4(vs_back(va), vs_back(vb), vs_back(vc), __ T4S, vtmp, vq);
+ }
+
+ // Perform combined montmul then add/sub on 4x4S vectors.
+ void dilithium_montmul16_sub_add(
+ const VSeq<4>& va0, const VSeq<4>& va1, const VSeq<4>& vc,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ // compute a = montmul(a1, c)
+ dilithium_montmul16(vc, va1, vc, vtmp, vq);
+ // ouptut a1 = a0 - a
+ vs_subv(va1, __ T4S, va0, vc);
+ // and a0 = a0 + a
+ vs_addv(va0, __ T4S, va0, vc);
+ }
+
+ // Perform combined add/sub then montul on 4x4S vectors.
+ void dilithium_sub_add_montmul16(
+ const VSeq<4>& va0, const VSeq<4>& va1, const VSeq<4>& vb,
+ const VSeq<4>& vtmp1, const VSeq<4>& vtmp2, const VSeq<2>& vq) {
+ // compute c = a0 - a1
+ vs_subv(vtmp1, __ T4S, va0, va1);
+ // output a0 = a0 + a1
+ vs_addv(va0, __ T4S, va0, va1);
+ // output a1 = b montmul c
+ dilithium_montmul16(va1, vtmp1, vb, vtmp2, vq);
+ }
+
+ // At these levels, the indices that correspond to the 'j's (and 'j+l's)
+ // in the Java implementation come in sequences of at least 8, so we
+ // can use ldpq to collect the corresponding data into pairs of vector
+ // registers.
+ // We collect the coefficients corresponding to the 'j+l' indexes into
+ // the vector registers v0-v7, the zetas into the vector registers v16-v23
+ // then we do the (Montgomery) multiplications by the zetas in parallel
+ // into v16-v23, load the coeffs corresponding to the 'j' indexes into
+ // v0-v7, then do the additions into v24-v31 and the subtractions into
+ // v0-v7 and finally save the results back to the coeffs array.
+ void dilithiumNttLevel0_4(const Register dilithiumConsts,
+ const Register coeffs, const Register zetas) {
+ int c1 = 0;
+ int c2 = 512;
+ int startIncr;
+ // don't use callee save registers v8 - v15
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x4s inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+ int offsets[4] = { 0, 32, 64, 96 };
+
+ for (int level = 0; level < 5; level++) {
+ int c1Start = c1;
+ int c2Start = c2;
+ if (level == 3) {
+ offsets[1] = 32;
+ offsets[2] = 128;
+ offsets[3] = 160;
+ } else if (level == 4) {
+ offsets[1] = 64;
+ offsets[2] = 128;
+ offsets[3] = 192;
+ }
+
+ // For levels 1 - 4 we simply load 2 x 4 adjacent values at a
+ // time at 4 different offsets and multiply them in order by the
+ // next set of input values. So we employ indexed load and store
+ // pair instructions with arrangement 4S.
+ for (int i = 0; i < 4; i++) {
+ // reload q and qinv
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // load 8x4S coefficients via second start pos == c2
+ vs_ldpq_indexed(vs1, coeffs, c2Start, offsets);
+ // load next 8x4S inputs == b
+ vs_ldpq_post(vs2, zetas);
+ // compute a == c2 * b mod MONT_Q
+ dilithium_montmul32(vs2, vs1, vs2, vtmp, vq);
+ // load 8x4s coefficients via first start pos == c1
+ vs_ldpq_indexed(vs1, coeffs, c1Start, offsets);
+ // compute a1 = c1 + a
+ vs_addv(vs3, __ T4S, vs1, vs2);
+ // compute a2 = c1 - a
+ vs_subv(vs1, __ T4S, vs1, vs2);
+ // output a1 and a2
+ vs_stpq_indexed(vs3, coeffs, c1Start, offsets);
+ vs_stpq_indexed(vs1, coeffs, c2Start, offsets);
+
+ int k = 4 * level + i;
+
+ if (k > 7) {
+ startIncr = 256;
+ } else if (k == 5) {
+ startIncr = 384;
+ } else {
+ startIncr = 128;
+ }
+
+ c1Start += startIncr;
+ c2Start += startIncr;
+ }
+
+ c2 /= 2;
+ }
+ }
+
+ // Dilithium NTT function except for the final "normalization" to |coeff| < Q.
+ // Implements the method
+ // static int implDilithiumAlmostNtt(int[] coeffs, int zetas[]) {}
+ // of the Java class sun.security.provider
+ //
+ // coeffs (int[256]) = c_rarg0
+ // zetas (int[256]) = c_rarg1
+ address generate_dilithiumAlmostNtt() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::dilithiumAlmostNtt_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register coeffs = c_rarg0;
+ const Register zetas = c_rarg1;
+
+ const Register tmpAddr = r9;
+ const Register dilithiumConsts = r10;
+ const Register result = r11;
+ // don't use callee save registers v8 - v15
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x4s inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+ int offsets[4] = { 0, 32, 64, 96};
+ int offsets1[8] = { 16, 48, 80, 112, 144, 176, 208, 240 };
+ int offsets2[8] = { 0, 32, 64, 96, 128, 160, 192, 224 };
+ __ add(result, coeffs, 0);
+ __ lea(dilithiumConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_dilithiumConsts));
+
+ // Each level represents one iteration of the outer for loop of the Java version.
+
+ // level 0-4
+ dilithiumNttLevel0_4(dilithiumConsts, coeffs, zetas);
+
+ // level 5
+
+ // At level 5 the coefficients we need to combine with the zetas
+ // are grouped in memory in blocks of size 4. So, for both sets of
+ // coefficients we load 4 adjacent values at 8 different offsets
+ // using an indexed ldr with register variant Q and multiply them
+ // in sequence order by the next set of inputs. Likewise we store
+ // the resuls using an indexed str with register variant Q.
+ for (int i = 0; i < 1024; i += 256) {
+ // reload constants q, qinv each iteration as they get clobbered later
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // load 32 (8x4S) coefficients via first offsets = c1
+ vs_ldr_indexed(vs1, __ Q, coeffs, i, offsets1);
+ // load next 32 (8x4S) inputs = b
+ vs_ldpq_post(vs2, zetas);
+ // a = b montul c1
+ dilithium_montmul32(vs2, vs1, vs2, vtmp, vq);
+ // load 32 (8x4S) coefficients via second offsets = c2
+ vs_ldr_indexed(vs1, __ Q, coeffs, i, offsets2);
+ // add/sub with result of multiply
+ vs_addv(vs3, __ T4S, vs1, vs2); // a1 = a - c2
+ vs_subv(vs1, __ T4S, vs1, vs2); // a0 = a + c1
+ // write back new coefficients using same offsets
+ vs_str_indexed(vs3, __ Q, coeffs, i, offsets2);
+ vs_str_indexed(vs1, __ Q, coeffs, i, offsets1);
+ }
+
+ // level 6
+ // At level 6 the coefficients we need to combine with the zetas
+ // are grouped in memory in pairs, the first two being montmul
+ // inputs and the second add/sub inputs. We can still implement
+ // the montmul+sub+add using 4-way parallelism but only if we
+ // combine the coefficients with the zetas 16 at a time. We load 8
+ // adjacent values at 4 different offsets using an ld2 load with
+ // arrangement 2D. That interleaves the lower and upper halves of
+ // each pair of quadwords into successive vector registers. We
+ // then need to montmul the 4 even elements of the coefficients
+ // register sequence by the zetas in order and then add/sub the 4
+ // odd elements of the coefficients register sequence. We use an
+ // equivalent st2 operation to store the results back into memory
+ // de-interleaved.
+ for (int i = 0; i < 1024; i += 128) {
+ // reload constants q, qinv each iteration as they get clobbered later
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // load interleaved 16 (4x2D) coefficients via offsets
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, i, offsets);
+ // load next 16 (4x4S) inputs
+ vs_ldpq_post(vs_front(vs2), zetas);
+ // mont multiply odd elements of vs1 by vs2 and add/sub into odds/evens
+ dilithium_montmul16_sub_add(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vtmp, vq);
+ // store interleaved 16 (4x2D) coefficients via offsets
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, i, offsets);
+ }
+
+ // level 7
+ // At level 7 the coefficients we need to combine with the zetas
+ // occur singly with montmul inputs alterating with add/sub
+ // inputs. Once again we can use 4-way parallelism to combine 16
+ // zetas at a time. However, we have to load 8 adjacent values at
+ // 4 different offsets using an ld2 load with arrangement 4S. That
+ // interleaves the the odd words of each pair into one
+ // coefficients vector register and the even words of the pair
+ // into the next register. We then need to montmul the 4 even
+ // elements of the coefficients register sequence by the zetas in
+ // order and then add/sub the 4 odd elements of the coefficients
+ // register sequence. We use an equivalent st2 operation to store
+ // the results back into memory de-interleaved.
+
+ for (int i = 0; i < 1024; i += 128) {
+ // reload constants q, qinv each iteration as they get clobbered later
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // load interleaved 16 (4x4S) coefficients via offsets
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, i, offsets);
+ // load next 16 (4x4S) inputs
+ vs_ldpq_post(vs_front(vs2), zetas);
+ // mont multiply odd elements of vs1 by vs2 and add/sub into odds/evens
+ dilithium_montmul16_sub_add(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vtmp, vq);
+ // store interleaved 16 (4x4S) coefficients via offsets
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, i, offsets);
+ }
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // At these levels, the indices that correspond to the 'j's (and 'j+l's)
+ // in the Java implementation come in sequences of at least 8, so we
+ // can use ldpq to collect the corresponding data into pairs of vector
+ // registers
+ // We collect the coefficients that correspond to the 'j's into vs1
+ // the coefficiets that correspond to the 'j+l's into vs2 then
+ // do the additions into vs3 and the subtractions into vs1 then
+ // save the result of the additions, load the zetas into vs2
+ // do the (Montgomery) multiplications by zeta in parallel into vs2
+ // finally save the results back to the coeffs array
+ void dilithiumInverseNttLevel3_7(const Register dilithiumConsts,
+ const Register coeffs, const Register zetas) {
+ int c1 = 0;
+ int c2 = 32;
+ int startIncr;
+ int offsets[4];
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x4s inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+
+ offsets[0] = 0;
+
+ for (int level = 3; level < 8; level++) {
+ int c1Start = c1;
+ int c2Start = c2;
+ if (level == 3) {
+ offsets[1] = 64;
+ offsets[2] = 128;
+ offsets[3] = 192;
+ } else if (level == 4) {
+ offsets[1] = 32;
+ offsets[2] = 128;
+ offsets[3] = 160;
+ } else {
+ offsets[1] = 32;
+ offsets[2] = 64;
+ offsets[3] = 96;
+ }
+
+ // For levels 3 - 7 we simply load 2 x 4 adjacent values at a
+ // time at 4 different offsets and multiply them in order by the
+ // next set of input values. So we employ indexed load and store
+ // pair instructions with arrangement 4S.
+ for (int i = 0; i < 4; i++) {
+ // load v1 32 (8x4S) coefficients relative to first start index
+ vs_ldpq_indexed(vs1, coeffs, c1Start, offsets);
+ // load v2 32 (8x4S) coefficients relative to second start index
+ vs_ldpq_indexed(vs2, coeffs, c2Start, offsets);
+ // a0 = v1 + v2 -- n.b. clobbers vqs
+ vs_addv(vs3, __ T4S, vs1, vs2);
+ // a1 = v1 - v2
+ vs_subv(vs1, __ T4S, vs1, vs2);
+ // save a1 relative to first start index
+ vs_stpq_indexed(vs3, coeffs, c1Start, offsets);
+ // load constants q, qinv each iteration as they get clobbered above
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // load b next 32 (8x4S) inputs
+ vs_ldpq_post(vs2, zetas);
+ // a = a1 montmul b
+ dilithium_montmul32(vs2, vs1, vs2, vtmp, vq);
+ // save a relative to second start index
+ vs_stpq_indexed(vs2, coeffs, c2Start, offsets);
+
+ int k = 4 * level + i;
+
+ if (k < 24) {
+ startIncr = 256;
+ } else if (k == 25) {
+ startIncr = 384;
+ } else {
+ startIncr = 128;
+ }
+
+ c1Start += startIncr;
+ c2Start += startIncr;
+ }
+
+ c2 *= 2;
}
+ }
- static const uint64_t round_consts[24] = {
- 0x0000000000000001L, 0x0000000000008082L, 0x800000000000808AL,
- 0x8000000080008000L, 0x000000000000808BL, 0x0000000080000001L,
- 0x8000000080008081L, 0x8000000000008009L, 0x000000000000008AL,
- 0x0000000000000088L, 0x0000000080008009L, 0x000000008000000AL,
- 0x000000008000808BL, 0x800000000000008BL, 0x8000000000008089L,
- 0x8000000000008003L, 0x8000000000008002L, 0x8000000000000080L,
- 0x000000000000800AL, 0x800000008000000AL, 0x8000000080008081L,
- 0x8000000000008080L, 0x0000000080000001L, 0x8000000080008008L
- };
+ // Dilithium Inverse NTT function except the final mod Q division by 2^256.
+ // Implements the method
+ // static int implDilithiumAlmostInverseNtt(int[] coeffs, int[] zetas) {} of
+ // the sun.security.provider.ML_DSA class.
+ //
+ // coeffs (int[256]) = c_rarg0
+ // zetas (int[256]) = c_rarg1
+ address generate_dilithiumAlmostInverseNtt() {
__ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::dilithiumAlmostInverseNtt_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ const Register coeffs = c_rarg0;
+ const Register zetas = c_rarg1;
+
+ const Register tmpAddr = r9;
+ const Register dilithiumConsts = r10;
+ const Register result = r11;
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x4s inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+ int offsets[4] = { 0, 32, 64, 96 };
+ int offsets1[8] = { 0, 32, 64, 96, 128, 160, 192, 224 };
+ int offsets2[8] = { 16, 48, 80, 112, 144, 176, 208, 240 };
+
+ __ add(result, coeffs, 0);
+ __ lea(dilithiumConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_dilithiumConsts));
+
+ // Each level represents one iteration of the outer for loop of the Java version
+
+ // level 0
+ // At level 0 we need to interleave adjacent quartets of
+ // coefficients before we multiply and add/sub by the next 16
+ // zetas just as we did for level 7 in the multiply code. So we
+ // load and store the values using an ld2/st2 with arrangement 4S.
+ for (int i = 0; i < 1024; i += 128) {
+ // load constants q, qinv
+ // n.b. this can be moved out of the loop as they do not get
+ // clobbered by first two loops
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // a0/a1 load interleaved 32 (8x4S) coefficients
+ vs_ld2_indexed(vs1, __ T4S, coeffs, tmpAddr, i, offsets);
+ // b load next 32 (8x4S) inputs
+ vs_ldpq_post(vs_front(vs2), zetas);
+ // compute in parallel (a0, a1) = (a0 + a1, (a0 - a1) montmul b)
+ // n.b. second half of vs2 provides temporary register storage
+ dilithium_sub_add_montmul16(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ // a0/a1 store interleaved 32 (8x4S) coefficients
+ vs_st2_indexed(vs1, __ T4S, coeffs, tmpAddr, i, offsets);
+ }
+
+ // level 1
+ // At level 1 we need to interleave pairs of adjacent pairs of
+ // coefficients before we multiply by the next 16 zetas just as we
+ // did for level 6 in the multiply code. So we load and store the
+ // values an ld2/st2 with arrangement 2D.
+ for (int i = 0; i < 1024; i += 128) {
+ // a0/a1 load interleaved 32 (8x2D) coefficients
+ vs_ld2_indexed(vs1, __ T2D, coeffs, tmpAddr, i, offsets);
+ // b load next 16 (4x4S) inputs
+ vs_ldpq_post(vs_front(vs2), zetas);
+ // compute in parallel (a0, a1) = (a0 + a1, (a0 - a1) montmul b)
+ // n.b. second half of vs2 provides temporary register storage
+ dilithium_sub_add_montmul16(vs_even(vs1), vs_odd(vs1),
+ vs_front(vs2), vs_back(vs2), vtmp, vq);
+ // a0/a1 store interleaved 32 (8x2D) coefficients
+ vs_st2_indexed(vs1, __ T2D, coeffs, tmpAddr, i, offsets);
+ }
+
+ // level 2
+ // At level 2 coefficients come in blocks of 4. So, we load 4
+ // adjacent coefficients at 8 distinct offsets for both the first
+ // and second coefficient sequences, using an ldr with register
+ // variant Q then combine them with next set of 32 zetas. Likewise
+ // we store the results using an str with register variant Q.
+ for (int i = 0; i < 1024; i += 256) {
+ // c0 load 32 (8x4S) coefficients via first offsets
+ vs_ldr_indexed(vs1, __ Q, coeffs, i, offsets1);
+ // c1 load 32 (8x4S) coefficients via second offsets
+ vs_ldr_indexed(vs2, __ Q,coeffs, i, offsets2);
+ // a0 = c0 + c1 n.b. clobbers vq which overlaps vs3
+ vs_addv(vs3, __ T4S, vs1, vs2);
+ // c = c0 - c1
+ vs_subv(vs1, __ T4S, vs1, vs2);
+ // store a0 32 (8x4S) coefficients via first offsets
+ vs_str_indexed(vs3, __ Q, coeffs, i, offsets1);
+ // b load 32 (8x4S) next inputs
+ vs_ldpq_post(vs2, zetas);
+ // reload constants q, qinv -- they were clobbered earlier
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // compute a1 = b montmul c
+ dilithium_montmul32(vs2, vs1, vs2, vtmp, vq);
+ // store a1 32 (8x4S) coefficients via second offsets
+ vs_str_indexed(vs2, __ Q, coeffs, i, offsets2);
+ }
+
+ // level 3-7
+ dilithiumInverseNttLevel3_7(dilithiumConsts, coeffs, zetas);
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Dilithium multiply polynomials in the NTT domain.
+ // Straightforward implementation of the method
+ // static int implDilithiumNttMult(
+ // int[] result, int[] ntta, int[] nttb {} of
+ // the sun.security.provider.ML_DSA class.
+ //
+ // result (int[256]) = c_rarg0
+ // poly1 (int[256]) = c_rarg1
+ // poly2 (int[256]) = c_rarg2
+ address generate_dilithiumNttMult() {
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::dilithiumNttMult_id;
StubCodeMark mark(this, stub_id);
address start = __ pc();
+ __ enter();
- Register buf = c_rarg0;
- Register state = c_rarg1;
- Register block_size = c_rarg2;
- Register ofs = c_rarg3;
- Register limit = c_rarg4;
+ Label L_loop;
- Label sha3_loop, rounds24_loop;
- Label sha3_512_or_sha3_384, shake128;
+ const Register result = c_rarg0;
+ const Register poly1 = c_rarg1;
+ const Register poly2 = c_rarg2;
- __ stpd(v8, v9, __ pre(sp, -64));
- __ stpd(v10, v11, Address(sp, 16));
- __ stpd(v12, v13, Address(sp, 32));
- __ stpd(v14, v15, Address(sp, 48));
+ const Register dilithiumConsts = r10;
+ const Register len = r11;
- // load state
- __ add(rscratch1, state, 32);
- __ ld1(v0, v1, v2, v3, __ T1D, state);
- __ ld1(v4, v5, v6, v7, __ T1D, __ post(rscratch1, 32));
- __ ld1(v8, v9, v10, v11, __ T1D, __ post(rscratch1, 32));
- __ ld1(v12, v13, v14, v15, __ T1D, __ post(rscratch1, 32));
- __ ld1(v16, v17, v18, v19, __ T1D, __ post(rscratch1, 32));
- __ ld1(v20, v21, v22, v23, __ T1D, __ post(rscratch1, 32));
- __ ld1(v24, __ T1D, rscratch1);
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x4s inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+ VSeq<8> vrsquare(29, 0); // for montmul by constant RSQUARE
- __ BIND(sha3_loop);
+ __ lea(dilithiumConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_dilithiumConsts));
- // 24 keccak rounds
- __ movw(rscratch2, 24);
+ // load constants q, qinv
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // load constant rSquare into v29
+ __ ldr(v29, __ Q, Address(dilithiumConsts, 48)); // rSquare
- // load round_constants base
- __ lea(rscratch1, ExternalAddress((address) round_consts));
+ __ mov(len, zr);
+ __ add(len, len, 1024);
- // load input
- __ ld1(v25, v26, v27, v28, __ T8B, __ post(buf, 32));
- __ ld1(v29, v30, v31, __ T8B, __ post(buf, 24));
- __ eor(v0, __ T8B, v0, v25);
- __ eor(v1, __ T8B, v1, v26);
- __ eor(v2, __ T8B, v2, v27);
- __ eor(v3, __ T8B, v3, v28);
- __ eor(v4, __ T8B, v4, v29);
- __ eor(v5, __ T8B, v5, v30);
- __ eor(v6, __ T8B, v6, v31);
+ __ BIND(L_loop);
- // block_size == 72, SHA3-512; block_size == 104, SHA3-384
- __ tbz(block_size, 7, sha3_512_or_sha3_384);
+ // b load 32 (8x4S) next inputs from poly1
+ vs_ldpq_post(vs1, poly1);
+ // c load 32 (8x4S) next inputs from poly2
+ vs_ldpq_post(vs2, poly2);
+ // compute a = b montmul c
+ dilithium_montmul32(vs2, vs1, vs2, vtmp, vq);
+ // compute a = rsquare montmul a
+ dilithium_montmul32(vs2, vrsquare, vs2, vtmp, vq);
+ // save a 32 (8x4S) results
+ vs_stpq_post(vs2, result);
- __ ld1(v25, v26, v27, v28, __ T8B, __ post(buf, 32));
- __ ld1(v29, v30, v31, __ T8B, __ post(buf, 24));
- __ eor(v7, __ T8B, v7, v25);
- __ eor(v8, __ T8B, v8, v26);
- __ eor(v9, __ T8B, v9, v27);
- __ eor(v10, __ T8B, v10, v28);
- __ eor(v11, __ T8B, v11, v29);
- __ eor(v12, __ T8B, v12, v30);
- __ eor(v13, __ T8B, v13, v31);
+ __ sub(len, len, 128);
+ __ cmp(len, (u1)128);
+ __ br(Assembler::GE, L_loop);
- __ ld1(v25, v26, v27, __ T8B, __ post(buf, 24));
- __ eor(v14, __ T8B, v14, v25);
- __ eor(v15, __ T8B, v15, v26);
- __ eor(v16, __ T8B, v16, v27);
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
- // block_size == 136, bit4 == 0 and bit5 == 0, SHA3-256 or SHAKE256
- __ andw(c_rarg5, block_size, 48);
- __ cbzw(c_rarg5, rounds24_loop);
+ return start;
+ }
- __ tbnz(block_size, 5, shake128);
- // block_size == 144, bit5 == 0, SHA3-244
- __ ldrd(v28, __ post(buf, 8));
- __ eor(v17, __ T8B, v17, v28);
- __ b(rounds24_loop);
+ // Dilithium Motgomery multiply an array by a constant.
+ // A straightforward implementation of the method
+ // static int implDilithiumMontMulByConstant(int[] coeffs, int constant) {}
+ // of the sun.security.provider.MLDSA class
+ //
+ // coeffs (int[256]) = c_rarg0
+ // constant (int) = c_rarg1
+ address generate_dilithiumMontMulByConstant() {
- __ BIND(shake128);
- __ ld1(v28, v29, v30, v31, __ T8B, __ post(buf, 32));
- __ eor(v17, __ T8B, v17, v28);
- __ eor(v18, __ T8B, v18, v29);
- __ eor(v19, __ T8B, v19, v30);
- __ eor(v20, __ T8B, v20, v31);
- __ b(rounds24_loop); // block_size == 168, SHAKE128
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::dilithiumMontMulByConstant_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
- __ BIND(sha3_512_or_sha3_384);
- __ ld1(v25, v26, __ T8B, __ post(buf, 16));
- __ eor(v7, __ T8B, v7, v25);
- __ eor(v8, __ T8B, v8, v26);
- __ tbz(block_size, 5, rounds24_loop); // SHA3-512
+ Label L_loop;
- // SHA3-384
- __ ld1(v27, v28, v29, v30, __ T8B, __ post(buf, 32));
- __ eor(v9, __ T8B, v9, v27);
- __ eor(v10, __ T8B, v10, v28);
- __ eor(v11, __ T8B, v11, v29);
- __ eor(v12, __ T8B, v12, v30);
+ const Register coeffs = c_rarg0;
+ const Register constant = c_rarg1;
- __ BIND(rounds24_loop);
- __ subw(rscratch2, rscratch2, 1);
+ const Register dilithiumConsts = r10;
+ const Register result = r11;
+ const Register len = r12;
- __ eor3(v29, __ T16B, v4, v9, v14);
- __ eor3(v26, __ T16B, v1, v6, v11);
- __ eor3(v28, __ T16B, v3, v8, v13);
- __ eor3(v25, __ T16B, v0, v5, v10);
- __ eor3(v27, __ T16B, v2, v7, v12);
- __ eor3(v29, __ T16B, v29, v19, v24);
- __ eor3(v26, __ T16B, v26, v16, v21);
- __ eor3(v28, __ T16B, v28, v18, v23);
- __ eor3(v25, __ T16B, v25, v15, v20);
- __ eor3(v27, __ T16B, v27, v17, v22);
-
- __ rax1(v30, __ T2D, v29, v26);
- __ rax1(v26, __ T2D, v26, v28);
- __ rax1(v28, __ T2D, v28, v25);
- __ rax1(v25, __ T2D, v25, v27);
- __ rax1(v27, __ T2D, v27, v29);
-
- __ eor(v0, __ T16B, v0, v30);
- __ xar(v29, __ T2D, v1, v25, (64 - 1));
- __ xar(v1, __ T2D, v6, v25, (64 - 44));
- __ xar(v6, __ T2D, v9, v28, (64 - 20));
- __ xar(v9, __ T2D, v22, v26, (64 - 61));
- __ xar(v22, __ T2D, v14, v28, (64 - 39));
- __ xar(v14, __ T2D, v20, v30, (64 - 18));
- __ xar(v31, __ T2D, v2, v26, (64 - 62));
- __ xar(v2, __ T2D, v12, v26, (64 - 43));
- __ xar(v12, __ T2D, v13, v27, (64 - 25));
- __ xar(v13, __ T2D, v19, v28, (64 - 8));
- __ xar(v19, __ T2D, v23, v27, (64 - 56));
- __ xar(v23, __ T2D, v15, v30, (64 - 41));
- __ xar(v15, __ T2D, v4, v28, (64 - 27));
- __ xar(v28, __ T2D, v24, v28, (64 - 14));
- __ xar(v24, __ T2D, v21, v25, (64 - 2));
- __ xar(v8, __ T2D, v8, v27, (64 - 55));
- __ xar(v4, __ T2D, v16, v25, (64 - 45));
- __ xar(v16, __ T2D, v5, v30, (64 - 36));
- __ xar(v5, __ T2D, v3, v27, (64 - 28));
- __ xar(v27, __ T2D, v18, v27, (64 - 21));
- __ xar(v3, __ T2D, v17, v26, (64 - 15));
- __ xar(v25, __ T2D, v11, v25, (64 - 10));
- __ xar(v26, __ T2D, v7, v26, (64 - 6));
- __ xar(v30, __ T2D, v10, v30, (64 - 3));
-
- __ bcax(v20, __ T16B, v31, v22, v8);
- __ bcax(v21, __ T16B, v8, v23, v22);
- __ bcax(v22, __ T16B, v22, v24, v23);
- __ bcax(v23, __ T16B, v23, v31, v24);
- __ bcax(v24, __ T16B, v24, v8, v31);
-
- __ ld1r(v31, __ T2D, __ post(rscratch1, 8));
-
- __ bcax(v17, __ T16B, v25, v19, v3);
- __ bcax(v18, __ T16B, v3, v15, v19);
- __ bcax(v19, __ T16B, v19, v16, v15);
- __ bcax(v15, __ T16B, v15, v25, v16);
- __ bcax(v16, __ T16B, v16, v3, v25);
-
- __ bcax(v10, __ T16B, v29, v12, v26);
- __ bcax(v11, __ T16B, v26, v13, v12);
- __ bcax(v12, __ T16B, v12, v14, v13);
- __ bcax(v13, __ T16B, v13, v29, v14);
- __ bcax(v14, __ T16B, v14, v26, v29);
-
- __ bcax(v7, __ T16B, v30, v9, v4);
- __ bcax(v8, __ T16B, v4, v5, v9);
- __ bcax(v9, __ T16B, v9, v6, v5);
- __ bcax(v5, __ T16B, v5, v30, v6);
- __ bcax(v6, __ T16B, v6, v4, v30);
-
- __ bcax(v3, __ T16B, v27, v0, v28);
- __ bcax(v4, __ T16B, v28, v1, v0);
- __ bcax(v0, __ T16B, v0, v2, v1);
- __ bcax(v1, __ T16B, v1, v27, v2);
- __ bcax(v2, __ T16B, v2, v28, v27);
-
- __ eor(v0, __ T16B, v0, v31);
+ VSeq<8> vs1(0), vs2(16), vs3(24); // 3 sets of 8x4s inputs/outputs
+ VSeq<4> vtmp = vs_front(vs3); // n.b. tmp registers overlap vs3
+ VSeq<2> vq(30); // n.b. constants overlap vs3
+ VSeq<8> vconst(29, 0); // for montmul by constant
- __ cbnzw(rscratch2, rounds24_loop);
+ // results track inputs
+ __ add(result, coeffs, 0);
+ __ lea(dilithiumConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_dilithiumConsts));
- if (multi_block) {
- __ add(ofs, ofs, block_size);
- __ cmp(ofs, limit);
- __ br(Assembler::LE, sha3_loop);
- __ mov(c_rarg0, ofs); // return ofs
- }
+ // load constants q, qinv -- they do not get clobbered by first two loops
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // copy caller supplied constant across vconst
+ __ dup(vconst[0], __ T4S, constant);
+ __ mov(len, zr);
+ __ add(len, len, 1024);
- __ st1(v0, v1, v2, v3, __ T1D, __ post(state, 32));
- __ st1(v4, v5, v6, v7, __ T1D, __ post(state, 32));
- __ st1(v8, v9, v10, v11, __ T1D, __ post(state, 32));
- __ st1(v12, v13, v14, v15, __ T1D, __ post(state, 32));
- __ st1(v16, v17, v18, v19, __ T1D, __ post(state, 32));
- __ st1(v20, v21, v22, v23, __ T1D, __ post(state, 32));
- __ st1(v24, __ T1D, state);
+ __ BIND(L_loop);
+
+ // load next 32 inputs
+ vs_ldpq_post(vs2, coeffs);
+ // mont mul by constant
+ dilithium_montmul32(vs2, vconst, vs2, vtmp, vq);
+ // write next 32 results
+ vs_stpq_post(vs2, result);
+
+ __ sub(len, len, 128);
+ __ cmp(len, (u1)128);
+ __ br(Assembler::GE, L_loop);
+
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
+ __ ret(lr);
+
+ return start;
+ }
+
+ // Dilithium decompose poly.
+ // Implements the method
+ // static int implDilithiumDecomposePoly(int[] coeffs, int constant) {}
+ // of the sun.security.provider.ML_DSA class
+ //
+ // input (int[256]) = c_rarg0
+ // lowPart (int[256]) = c_rarg1
+ // highPart (int[256]) = c_rarg2
+ // twoGamma2 (int) = c_rarg3
+ // multiplier (int) = c_rarg4
+ address generate_dilithiumDecomposePoly() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::dilithiumDecomposePoly_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ Label L_loop;
+
+ const Register input = c_rarg0;
+ const Register lowPart = c_rarg1;
+ const Register highPart = c_rarg2;
+ const Register twoGamma2 = c_rarg3;
+ const Register multiplier = c_rarg4;
+
+ const Register len = r9;
+ const Register dilithiumConsts = r10;
+ const Register tmp = r11;
+
+ // 6 independent sets of 4x4s values
+ VSeq<4> vs1(0), vs2(4), vs3(8);
+ VSeq<4> vs4(12), vs5(16), vtmp(20);
+
+ // 7 constants for cross-multiplying
+ VSeq<4> one(25, 0);
+ VSeq<4> qminus1(26, 0);
+ VSeq<4> g2(27, 0);
+ VSeq<4> twog2(28, 0);
+ VSeq<4> mult(29, 0);
+ VSeq<4> q(30, 0);
+ VSeq<4> qadd(31, 0);
+
+ __ enter();
+
+ __ lea(dilithiumConsts,
+ ExternalAddress((address) StubRoutines::aarch64::_dilithiumConsts));
+
+ // save callee-saved registers
+ __ stpd(v8, v9, __ pre(sp, -64));
+ __ stpd(v10, v11, Address(sp, 16));
+ __ stpd(v12, v13, Address(sp, 32));
+ __ stpd(v14, v15, Address(sp, 48));
+ // populate constant registers
+ __ mov(tmp, zr);
+ __ add(tmp, tmp, 1);
+ __ dup(one[0], __ T4S, tmp); // 1
+ __ ldr(q[0], __ Q, Address(dilithiumConsts, 16)); // q
+ __ ldr(qadd[0], __ Q, Address(dilithiumConsts, 64)); // addend for mod q reduce
+ __ dup(twog2[0], __ T4S, twoGamma2); // 2 * gamma2
+ __ dup(mult[0], __ T4S, multiplier); // multiplier for mod 2 * gamma reduce
+ __ subv(qminus1[0], __ T4S, v30, v25); // q - 1
+ __ sshr(g2[0], __ T4S, v28, 1); // gamma2
+
+ __ mov(len, zr);
+ __ add(len, len, 1024);
+
+ __ BIND(L_loop);
+
+ // load next 4x4S inputs interleaved: rplus --> vs1
+ __ ld4(vs1[0], vs1[1], vs1[2], vs1[3], __ T4S, __ post(input, 64));
+
+ // rplus = rplus - ((rplus + qadd) >> 23) * q
+ vs_addv(vtmp, __ T4S, vs1, qadd);
+ vs_sshr(vtmp, __ T4S, vtmp, 23);
+ vs_mulv(vtmp, __ T4S, vtmp, q);
+ vs_subv(vs1, __ T4S, vs1, vtmp);
+
+ // rplus = rplus + ((rplus >> 31) & dilithium_q);
+ vs_sshr(vtmp, __ T4S, vs1, 31);
+ vs_andr(vtmp, vtmp, q);
+ vs_addv(vs1, __ T4S, vs1, vtmp);
+
+ // quotient --> vs2
+ // int quotient = (rplus * multiplier) >> 22;
+ vs_mulv(vtmp, __ T4S, vs1, mult);
+ vs_sshr(vs2, __ T4S, vtmp, 22);
+
+ // r0 --> vs3
+ // int r0 = rplus - quotient * twoGamma2;
+ vs_mulv(vtmp, __ T4S, vs2, twog2);
+ vs_subv(vs3, __ T4S, vs1, vtmp);
+
+ // mask --> vs4
+ // int mask = (twoGamma2 - r0) >> 22;
+ vs_subv(vtmp, __ T4S, twog2, vs3);
+ vs_sshr(vs4, __ T4S, vtmp, 22);
+
+ // r0 -= (mask & twoGamma2);
+ vs_andr(vtmp, vs4, twog2);
+ vs_subv(vs3, __ T4S, vs3, vtmp);
+
+ // quotient += (mask & 1);
+ vs_andr(vtmp, vs4, one);
+ vs_addv(vs2, __ T4S, vs2, vtmp);
+
+ // mask = (twoGamma2 / 2 - r0) >> 31;
+ vs_subv(vtmp, __ T4S, g2, vs3);
+ vs_sshr(vs4, __ T4S, vtmp, 31);
+
+ // r0 -= (mask & twoGamma2);
+ vs_andr(vtmp, vs4, twog2);
+ vs_subv(vs3, __ T4S, vs3, vtmp);
+
+ // quotient += (mask & 1);
+ vs_andr(vtmp, vs4, one);
+ vs_addv(vs2, __ T4S, vs2, vtmp);
+
+ // r1 --> vs5
+ // int r1 = rplus - r0 - (dilithium_q - 1);
+ vs_subv(vtmp, __ T4S, vs1, vs3);
+ vs_subv(vs5, __ T4S, vtmp, qminus1);
+
+ // r1 --> vs1 (overwriting rplus)
+ // r1 = (r1 | (-r1)) >> 31; // 0 if rplus - r0 == (dilithium_q - 1), -1 otherwise
+ vs_negr(vtmp, __ T4S, vs5);
+ vs_orr(vtmp, vs5, vtmp);
+ vs_sshr(vs1, __ T4S, vtmp, 31);
+
+ // r0 += ~r1;
+ vs_notr(vtmp, vs1);
+ vs_addv(vs3, __ T4S, vs3, vtmp);
+
+ // r1 = r1 & quotient;
+ vs_andr(vs1, vs2, vs1);
+
+ // store results inteleaved
+ // lowPart[m] = r0;
+ // highPart[m] = r1;
+ __ st4(vs3[0], vs3[1], vs3[2], vs3[3], __ T4S, __ post(lowPart, 64));
+ __ st4(vs1[0], vs1[1], vs1[2], vs1[3], __ T4S, __ post(highPart, 64));
+
+ __ sub(len, len, 64);
+ __ cmp(len, (u1)64);
+ __ br(Assembler::GE, L_loop);
+
+ // restore callee-saved vector registers
__ ldpd(v14, v15, Address(sp, 48));
__ ldpd(v12, v13, Address(sp, 32));
__ ldpd(v10, v11, Address(sp, 16));
__ ldpd(v8, v9, __ post(sp, 64));
+ __ leave(); // required for proper stackwalking of RuntimeStub frame
+ __ mov(r0, zr); // return 0
__ ret(lr);
return start;
@@ -4341,203 +7002,6 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
- // ChaCha20 block function. This version parallelizes 4 quarter
- // round operations at a time. It uses 16 SIMD registers to
- // produce 4 blocks of key stream.
- //
- // state (int[16]) = c_rarg0
- // keystream (byte[256]) = c_rarg1
- // return - number of bytes of keystream (always 256)
- //
- // In this approach, we load the 512-bit start state sequentially into
- // 4 128-bit vectors. We then make 4 4-vector copies of that starting
- // state, with each successive set of 4 vectors having a +1 added into
- // the first 32-bit lane of the 4th vector in that group (the counter).
- // By doing this, we can perform the block function on 4 512-bit blocks
- // within one run of this intrinsic.
- // The alignment of the data across the 4-vector group is such that at
- // the start it is already aligned for the first round of each two-round
- // loop iteration. In other words, the corresponding lanes of each vector
- // will contain the values needed for that quarter round operation (e.g.
- // elements 0/4/8/12, 1/5/9/13, 2/6/10/14, etc.).
- // In between each full round, a lane shift must occur. Within a loop
- // iteration, between the first and second rounds, the 2nd, 3rd, and 4th
- // vectors are rotated left 32, 64 and 96 bits, respectively. The result
- // is effectively a diagonal orientation in columnar form. After the
- // second full round, those registers are left-rotated again, this time
- // 96, 64, and 32 bits - returning the vectors to their columnar organization.
- // After all 10 iterations, the original state is added to each 4-vector
- // working state along with the add mask, and the 4 vector groups are
- // sequentially written to the memory dedicated for the output key stream.
- //
- // For a more detailed explanation, see Goll and Gueron, "Vectorization of
- // ChaCha Stream Cipher", 2014 11th Int. Conf. on Information Technology:
- // New Generations, Las Vegas, NV, USA, April 2014, DOI: 10.1109/ITNG.2014.33
- address generate_chacha20Block_qrpar() {
- Label L_Q_twoRounds, L_Q_cc20_const;
- // The constant data is broken into two 128-bit segments to be loaded
- // onto SIMD registers. The first 128 bits are a counter add overlay
- // that adds +1/+0/+0/+0 to the vectors holding replicated state[12].
- // The second 128-bits is a table constant used for 8-bit left rotations.
- // on 32-bit lanes within a SIMD register.
- __ BIND(L_Q_cc20_const);
- __ emit_int64(0x0000000000000001UL);
- __ emit_int64(0x0000000000000000UL);
- __ emit_int64(0x0605040702010003UL);
- __ emit_int64(0x0E0D0C0F0A09080BUL);
-
- __ align(CodeEntryAlignment);
- StubGenStubId stub_id = StubGenStubId::chacha20Block_id;
- StubCodeMark mark(this, stub_id);
- address start = __ pc();
- __ enter();
-
- const Register state = c_rarg0;
- const Register keystream = c_rarg1;
- const Register loopCtr = r10;
- const Register tmpAddr = r11;
-
- const FloatRegister aState = v0;
- const FloatRegister bState = v1;
- const FloatRegister cState = v2;
- const FloatRegister dState = v3;
- const FloatRegister a1Vec = v4;
- const FloatRegister b1Vec = v5;
- const FloatRegister c1Vec = v6;
- const FloatRegister d1Vec = v7;
- // Skip the callee-saved registers v8 - v15
- const FloatRegister a2Vec = v16;
- const FloatRegister b2Vec = v17;
- const FloatRegister c2Vec = v18;
- const FloatRegister d2Vec = v19;
- const FloatRegister a3Vec = v20;
- const FloatRegister b3Vec = v21;
- const FloatRegister c3Vec = v22;
- const FloatRegister d3Vec = v23;
- const FloatRegister a4Vec = v24;
- const FloatRegister b4Vec = v25;
- const FloatRegister c4Vec = v26;
- const FloatRegister d4Vec = v27;
- const FloatRegister scratch = v28;
- const FloatRegister addMask = v29;
- const FloatRegister lrot8Tbl = v30;
-
- // Load the initial state in the first 4 quadword registers,
- // then copy the initial state into the next 4 quadword registers
- // that will be used for the working state.
- __ ld1(aState, bState, cState, dState, __ T16B, Address(state));
-
- // Load the index register for 2 constant 128-bit data fields.
- // The first represents the +1/+0/+0/+0 add mask. The second is
- // the 8-bit left rotation.
- __ adr(tmpAddr, L_Q_cc20_const);
- __ ldpq(addMask, lrot8Tbl, Address(tmpAddr));
-
- __ mov(a1Vec, __ T16B, aState);
- __ mov(b1Vec, __ T16B, bState);
- __ mov(c1Vec, __ T16B, cState);
- __ mov(d1Vec, __ T16B, dState);
-
- __ mov(a2Vec, __ T16B, aState);
- __ mov(b2Vec, __ T16B, bState);
- __ mov(c2Vec, __ T16B, cState);
- __ addv(d2Vec, __ T4S, d1Vec, addMask);
-
- __ mov(a3Vec, __ T16B, aState);
- __ mov(b3Vec, __ T16B, bState);
- __ mov(c3Vec, __ T16B, cState);
- __ addv(d3Vec, __ T4S, d2Vec, addMask);
-
- __ mov(a4Vec, __ T16B, aState);
- __ mov(b4Vec, __ T16B, bState);
- __ mov(c4Vec, __ T16B, cState);
- __ addv(d4Vec, __ T4S, d3Vec, addMask);
-
- // Set up the 10 iteration loop
- __ mov(loopCtr, 10);
- __ BIND(L_Q_twoRounds);
-
- // The first set of operations on the vectors covers the first 4 quarter
- // round operations:
- // Qround(state, 0, 4, 8,12)
- // Qround(state, 1, 5, 9,13)
- // Qround(state, 2, 6,10,14)
- // Qround(state, 3, 7,11,15)
- __ cc20_quarter_round(a1Vec, b1Vec, c1Vec, d1Vec, scratch, lrot8Tbl);
- __ cc20_quarter_round(a2Vec, b2Vec, c2Vec, d2Vec, scratch, lrot8Tbl);
- __ cc20_quarter_round(a3Vec, b3Vec, c3Vec, d3Vec, scratch, lrot8Tbl);
- __ cc20_quarter_round(a4Vec, b4Vec, c4Vec, d4Vec, scratch, lrot8Tbl);
-
- // Shuffle the b1Vec/c1Vec/d1Vec to reorganize the state vectors to
- // diagonals. The a1Vec does not need to change orientation.
- __ cc20_shift_lane_org(b1Vec, c1Vec, d1Vec, true);
- __ cc20_shift_lane_org(b2Vec, c2Vec, d2Vec, true);
- __ cc20_shift_lane_org(b3Vec, c3Vec, d3Vec, true);
- __ cc20_shift_lane_org(b4Vec, c4Vec, d4Vec, true);
-
- // The second set of operations on the vectors covers the second 4 quarter
- // round operations, now acting on the diagonals:
- // Qround(state, 0, 5,10,15)
- // Qround(state, 1, 6,11,12)
- // Qround(state, 2, 7, 8,13)
- // Qround(state, 3, 4, 9,14)
- __ cc20_quarter_round(a1Vec, b1Vec, c1Vec, d1Vec, scratch, lrot8Tbl);
- __ cc20_quarter_round(a2Vec, b2Vec, c2Vec, d2Vec, scratch, lrot8Tbl);
- __ cc20_quarter_round(a3Vec, b3Vec, c3Vec, d3Vec, scratch, lrot8Tbl);
- __ cc20_quarter_round(a4Vec, b4Vec, c4Vec, d4Vec, scratch, lrot8Tbl);
-
- // Before we start the next iteration, we need to perform shuffles
- // on the b/c/d vectors to move them back to columnar organizations
- // from their current diagonal orientation.
- __ cc20_shift_lane_org(b1Vec, c1Vec, d1Vec, false);
- __ cc20_shift_lane_org(b2Vec, c2Vec, d2Vec, false);
- __ cc20_shift_lane_org(b3Vec, c3Vec, d3Vec, false);
- __ cc20_shift_lane_org(b4Vec, c4Vec, d4Vec, false);
-
- // Decrement and iterate
- __ sub(loopCtr, loopCtr, 1);
- __ cbnz(loopCtr, L_Q_twoRounds);
-
- // Once the counter reaches zero, we fall out of the loop
- // and need to add the initial state back into the working state
- // represented by the a/b/c/d1Vec registers. This is destructive
- // on the dState register but we no longer will need it.
- __ addv(a1Vec, __ T4S, a1Vec, aState);
- __ addv(b1Vec, __ T4S, b1Vec, bState);
- __ addv(c1Vec, __ T4S, c1Vec, cState);
- __ addv(d1Vec, __ T4S, d1Vec, dState);
-
- __ addv(a2Vec, __ T4S, a2Vec, aState);
- __ addv(b2Vec, __ T4S, b2Vec, bState);
- __ addv(c2Vec, __ T4S, c2Vec, cState);
- __ addv(dState, __ T4S, dState, addMask);
- __ addv(d2Vec, __ T4S, d2Vec, dState);
-
- __ addv(a3Vec, __ T4S, a3Vec, aState);
- __ addv(b3Vec, __ T4S, b3Vec, bState);
- __ addv(c3Vec, __ T4S, c3Vec, cState);
- __ addv(dState, __ T4S, dState, addMask);
- __ addv(d3Vec, __ T4S, d3Vec, dState);
-
- __ addv(a4Vec, __ T4S, a4Vec, aState);
- __ addv(b4Vec, __ T4S, b4Vec, bState);
- __ addv(c4Vec, __ T4S, c4Vec, cState);
- __ addv(dState, __ T4S, dState, addMask);
- __ addv(d4Vec, __ T4S, d4Vec, dState);
-
- // Write the final state back to the result buffer
- __ st1(a1Vec, b1Vec, c1Vec, d1Vec, __ T16B, __ post(keystream, 64));
- __ st1(a2Vec, b2Vec, c2Vec, d2Vec, __ T16B, __ post(keystream, 64));
- __ st1(a3Vec, b3Vec, c3Vec, d3Vec, __ T16B, __ post(keystream, 64));
- __ st1(a4Vec, b4Vec, c4Vec, d4Vec, __ T16B, __ post(keystream, 64));
-
- __ mov(r0, 256); // Return length of output keystream
- __ leave();
- __ ret(lr);
-
- return start;
- }
-
/**
* Arguments:
*
@@ -8702,79 +11166,6 @@ class StubGenerator: public StubCodeGenerator {
// }
};
- void generate_vector_math_stubs() {
- // Get native vector math stub routine addresses
- void* libsleef = nullptr;
- char ebuf[1024];
- char dll_name[JVM_MAXPATHLEN];
- if (os::dll_locate_lib(dll_name, sizeof(dll_name), Arguments::get_dll_dir(), "sleef")) {
- libsleef = os::dll_load(dll_name, ebuf, sizeof ebuf);
- }
- if (libsleef == nullptr) {
- log_info(library)("Failed to load native vector math library, %s!", ebuf);
- return;
- }
- // Method naming convention
- // All the methods are named as _
- // Where:
- // is the operation name, e.g. sin
- // is optional to indicate float/double
- // "f/d" for vector float/double operation
- // is the number of elements in the vector
- // "2/4" for neon, and "x" for sve
- // is the precision level
- // "u10/u05" represents 1.0/0.5 ULP error bounds
- // We use "u10" for all operations by default
- // But for those functions do not have u10 support, we use "u05" instead
- // indicates neon/sve
- // "sve/advsimd" for sve/neon implementations
- // e.g. sinfx_u10sve is the method for computing vector float sin using SVE instructions
- // cosd2_u10advsimd is the method for computing 2 elements vector double cos using NEON instructions
- //
- log_info(library)("Loaded library %s, handle " INTPTR_FORMAT, JNI_LIB_PREFIX "sleef" JNI_LIB_SUFFIX, p2i(libsleef));
-
- // Math vector stubs implemented with SVE for scalable vector size.
- if (UseSVE > 0) {
- for (int op = 0; op < VectorSupport::NUM_VECTOR_OP_MATH; op++) {
- int vop = VectorSupport::VECTOR_OP_MATH_START + op;
- // Skip "tanh" because there is performance regression
- if (vop == VectorSupport::VECTOR_OP_TANH) {
- continue;
- }
-
- // The native library does not support u10 level of "hypot".
- const char* ulf = (vop == VectorSupport::VECTOR_OP_HYPOT) ? "u05" : "u10";
-
- snprintf(ebuf, sizeof(ebuf), "%sfx_%ssve", VectorSupport::mathname[op], ulf);
- StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_SCALABLE][op] = (address)os::dll_lookup(libsleef, ebuf);
-
- snprintf(ebuf, sizeof(ebuf), "%sdx_%ssve", VectorSupport::mathname[op], ulf);
- StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_SCALABLE][op] = (address)os::dll_lookup(libsleef, ebuf);
- }
- }
-
- // Math vector stubs implemented with NEON for 64/128 bits vector size.
- for (int op = 0; op < VectorSupport::NUM_VECTOR_OP_MATH; op++) {
- int vop = VectorSupport::VECTOR_OP_MATH_START + op;
- // Skip "tanh" because there is performance regression
- if (vop == VectorSupport::VECTOR_OP_TANH) {
- continue;
- }
-
- // The native library does not support u10 level of "hypot".
- const char* ulf = (vop == VectorSupport::VECTOR_OP_HYPOT) ? "u05" : "u10";
-
- snprintf(ebuf, sizeof(ebuf), "%sf4_%sadvsimd", VectorSupport::mathname[op], ulf);
- StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_64][op] = (address)os::dll_lookup(libsleef, ebuf);
-
- snprintf(ebuf, sizeof(ebuf), "%sf4_%sadvsimd", VectorSupport::mathname[op], ulf);
- StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_128][op] = (address)os::dll_lookup(libsleef, ebuf);
-
- snprintf(ebuf, sizeof(ebuf), "%sd2_%sadvsimd", VectorSupport::mathname[op], ulf);
- StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_128][op] = (address)os::dll_lookup(libsleef, ebuf);
- }
- }
-
// Initialization
void generate_initial_stubs() {
// Generate initial stubs and initializes the entry points
@@ -8840,10 +11231,7 @@ class StubGenerator: public StubCodeGenerator {
// arraycopy stubs used by compilers
generate_arraycopy_stubs();
- BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
- if (bs_nm != nullptr) {
- StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
- }
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
StubRoutines::aarch64::_spin_wait = generate_spin_wait();
@@ -8931,12 +11319,28 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_montgomerySquare = g.generate_multiply();
}
- generate_vector_math_stubs();
-
#endif // COMPILER2
if (UseChaCha20Intrinsics) {
- StubRoutines::_chacha20Block = generate_chacha20Block_qrpar();
+ StubRoutines::_chacha20Block = generate_chacha20Block_blockpar();
+ }
+
+ if (UseKyberIntrinsics) {
+ StubRoutines::_kyberNtt = generate_kyberNtt();
+ StubRoutines::_kyberInverseNtt = generate_kyberInverseNtt();
+ StubRoutines::_kyberNttMult = generate_kyberNttMult();
+ StubRoutines::_kyberAddPoly_2 = generate_kyberAddPoly_2();
+ StubRoutines::_kyberAddPoly_3 = generate_kyberAddPoly_3();
+ StubRoutines::_kyber12To16 = generate_kyber12To16();
+ StubRoutines::_kyberBarrettReduce = generate_kyberBarrettReduce();
+ }
+
+ if (UseDilithiumIntrinsics) {
+ StubRoutines::_dilithiumAlmostNtt = generate_dilithiumAlmostNtt();
+ StubRoutines::_dilithiumAlmostInverseNtt = generate_dilithiumAlmostInverseNtt();
+ StubRoutines::_dilithiumNttMult = generate_dilithiumNttMult();
+ StubRoutines::_dilithiumMontMulByConstant = generate_dilithiumMontMulByConstant();
+ StubRoutines::_dilithiumDecomposePoly = generate_dilithiumDecomposePoly();
}
if (UseBASE64Intrinsics) {
@@ -8981,6 +11385,7 @@ class StubGenerator: public StubCodeGenerator {
}
if (UseSHA3Intrinsics) {
StubRoutines::_sha3_implCompress = generate_sha3_implCompress(StubGenStubId::sha3_implCompress_id);
+ StubRoutines::_double_keccak = generate_double_keccak();
StubRoutines::_sha3_implCompressMB = generate_sha3_implCompress(StubGenStubId::sha3_implCompressMB_id);
}
diff --git a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
index 3fa1616bf6586..fab76c41303c7 100644
--- a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
@@ -48,6 +48,26 @@ STUBGEN_ARCH_ENTRIES_DO(DEFINE_ARCH_ENTRY, DEFINE_ARCH_ENTRY_INIT)
bool StubRoutines::aarch64::_completed = false;
+ATTRIBUTE_ALIGNED(64) uint16_t StubRoutines::aarch64::_kyberConsts[] =
+{
+ // Because we sometimes load these in pairs, montQInvModR, kyber_q
+ // and kyberBarrettMultiplier should stay together and in this order.
+ 0xF301, 0xF301, 0xF301, 0xF301, 0xF301, 0xF301, 0xF301, 0xF301, // montQInvModR
+ 0x0D01, 0x0D01, 0x0D01, 0x0D01, 0x0D01, 0x0D01, 0x0D01, 0x0D01, // kyber_q
+ 0x4EBF, 0x4EBF, 0x4EBF, 0x4EBF, 0x4EBF, 0x4EBF, 0x4EBF, 0x4EBF, // kyberBarrettMultiplier
+ 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, // toMont((kyber_n / 2)^-1 (mod kyber_q))
+ 0x0549, 0x0549, 0x0549, 0x0549, 0x0549, 0x0549, 0x0549, 0x0549 // montRSquareModQ
+};
+
+ATTRIBUTE_ALIGNED(64) uint32_t StubRoutines::aarch64::_dilithiumConsts[] =
+{
+ 58728449, 58728449, 58728449, 58728449, // montQInvModR
+ 8380417, 8380417, 8380417, 8380417, // dilithium_q
+ 16382, 16382, 16382, 16382, // toMont((dilithium_n)^-1 (mod dilithium_q))
+ 2365951, 2365951, 2365951, 2365951, // montRSquareModQ
+ 5373807, 5373807, 5373807, 5373807 // addend for modular reduce
+};
+
/**
* crc_table[] from jdk/src/share/native/java/util/zip/zlib-1.2.5/crc32.h
*/
diff --git a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp
index a5ed87cdca454..4c942b9f8d81d 100644
--- a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -110,6 +110,8 @@ class aarch64 {
}
private:
+ static uint16_t _kyberConsts[];
+ static uint32_t _dilithiumConsts[];
static juint _crc_table[];
static jubyte _adler_table[];
// begin trigonometric tables block. See comments in .cpp file
diff --git a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
index fbe06a6d78138..2db3b435abbc9 100644
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
@@ -1800,12 +1800,6 @@ address TemplateInterpreterGenerator::generate_currentThread() {
return entry_point;
}
-// Not supported
-address TemplateInterpreterGenerator::generate_Float_intBitsToFloat_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Float_floatToRawIntBits_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Double_longBitsToDouble_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Double_doubleToRawLongBits_entry() { return nullptr; }
-
//-----------------------------------------------------------------------------
// Exceptions
@@ -1984,11 +1978,11 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
// preserve exception over this code sequence
__ pop_ptr(r0);
- __ str(r0, Address(rthread, JavaThread::vm_result_offset()));
+ __ str(r0, Address(rthread, JavaThread::vm_result_oop_offset()));
// remove the activation (without doing throws on illegalMonitorExceptions)
__ remove_activation(vtos, false, true, false);
// restore exception
- __ get_vm_result(r0, rthread);
+ __ get_vm_result_oop(r0, rthread);
// In between activations - previous activation type unknown yet
// compute continuation point - the continuation point expects the
@@ -2102,7 +2096,7 @@ address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
void TemplateInterpreterGenerator::count_bytecode() {
__ mov(r10, (address) &BytecodeCounter::_counter_value);
- __ atomic_addw(noreg, 1, r10);
+ __ atomic_add(noreg, 1, r10);
}
void TemplateInterpreterGenerator::histogram_bytecode(Template* t) {
@@ -2150,7 +2144,7 @@ void TemplateInterpreterGenerator::stop_interpreter_at() {
__ mov(rscratch1, (address) &BytecodeCounter::_counter_value);
__ ldr(rscratch1, Address(rscratch1));
__ mov(rscratch2, StopInterpreterAt);
- __ cmpw(rscratch1, rscratch2);
+ __ cmp(rscratch1, rscratch2);
__ br(Assembler::NE, L);
__ brk(0);
__ bind(L);
diff --git a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
index e50810486c80d..2cc9b39983ac1 100644
--- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
@@ -484,7 +484,7 @@ void TemplateTable::condy_helper(Label& Done)
__ mov(rarg, (int) bytecode());
__ call_VM(obj, entry, rarg);
- __ get_vm_result_2(flags, rthread);
+ __ get_vm_result_metadata(flags, rthread);
// VMr = obj = base address to find primitive value to push
// VMr2 = flags = (tos, off) using format of CPCE::_flags
@@ -3723,8 +3723,7 @@ void TemplateTable::checkcast()
__ push(atos); // save receiver for result, and for GC
call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
- // vm_result_2 has metadata result
- __ get_vm_result_2(r0, rthread);
+ __ get_vm_result_metadata(r0, rthread);
__ pop(r3); // restore receiver
__ b(resolved);
@@ -3777,8 +3776,7 @@ void TemplateTable::instanceof() {
__ push(atos); // save receiver for result, and for GC
call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
- // vm_result_2 has metadata result
- __ get_vm_result_2(r0, rthread);
+ __ get_vm_result_metadata(r0, rthread);
__ pop(r3); // restore receiver
__ verify_oop(r3);
__ load_klass(r3, r3);
diff --git a/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp b/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp
index ac597bea07d5c..7a0e5aaf3b4e9 100644
--- a/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp
@@ -172,7 +172,6 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Symbol* signature,
#ifndef PRODUCT
LogTarget(Trace, foreign, upcall) lt;
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
arg_shuffle.print_on(&ls);
}
@@ -334,7 +333,6 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Symbol* signature,
#ifndef PRODUCT
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
blob->print_on(&ls);
}
diff --git a/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp b/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp
index ceb40dce92168..2ec901f6a2ed9 100644
--- a/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -30,17 +30,16 @@
// constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp.
-#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
+#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \
volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) \
static_field(VM_Version, _rop_protection, bool) \
static_field(VM_Version, _pac_mask, uintptr_t)
-#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \
- declare_toplevel_type(VM_Version)
+#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type)
-#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant)
-#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant)
#define DECLARE_INT_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_INT_CONSTANT_ENTRY(VM_Version::CPU_##id)
#define VM_INT_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_INT_CPU_FEATURE_CONSTANT)
diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
index 874f8a380ae48..6ed7a6be58552 100644
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
@@ -161,6 +161,9 @@ void VM_Version::initialize() {
(_model == CPU_MODEL_AMPERE_1A || _model == CPU_MODEL_AMPERE_1B)) {
FLAG_SET_DEFAULT(CodeEntryAlignment, 32);
}
+ if (FLAG_IS_DEFAULT(AlwaysMergeDMB)) {
+ FLAG_SET_DEFAULT(AlwaysMergeDMB, false);
+ }
}
// ThunderX
@@ -240,7 +243,7 @@ void VM_Version::initialize() {
}
}
- if (_cpu == CPU_ARM) {
+ if (_features & (CPU_FP | CPU_ASIMD)) {
if (FLAG_IS_DEFAULT(UseSignumIntrinsic)) {
FLAG_SET_DEFAULT(UseSignumIntrinsic, true);
}
@@ -414,6 +417,28 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseChaCha20Intrinsics, false);
}
+ if (_features & CPU_ASIMD) {
+ if (FLAG_IS_DEFAULT(UseKyberIntrinsics)) {
+ UseKyberIntrinsics = true;
+ }
+ } else if (UseKyberIntrinsics) {
+ if (!FLAG_IS_DEFAULT(UseKyberIntrinsics)) {
+ warning("Kyber intrinsics require ASIMD instructions");
+ }
+ FLAG_SET_DEFAULT(UseKyberIntrinsics, false);
+ }
+
+ if (_features & CPU_ASIMD) {
+ if (FLAG_IS_DEFAULT(UseDilithiumIntrinsics)) {
+ UseDilithiumIntrinsics = true;
+ }
+ } else if (UseDilithiumIntrinsics) {
+ if (!FLAG_IS_DEFAULT(UseDilithiumIntrinsics)) {
+ warning("Dilithium intrinsics require ASIMD instructions");
+ }
+ FLAG_SET_DEFAULT(UseDilithiumIntrinsics, false);
+ }
+
if (FLAG_IS_DEFAULT(UseBASE64Intrinsics)) {
UseBASE64Intrinsics = true;
}
@@ -617,6 +642,7 @@ void VM_Version::initialize() {
if (_model2) {
os::snprintf_checked(buf + buf_used_len, sizeof(buf) - buf_used_len, "(0x%03x)", _model2);
}
+ size_t features_offset = strnlen(buf, sizeof(buf));
#define ADD_FEATURE_IF_SUPPORTED(id, name, bit) \
do { \
if (VM_Version::supports_##name()) strcat(buf, ", " #name); \
@@ -624,7 +650,11 @@ void VM_Version::initialize() {
CPU_FEATURE_FLAGS(ADD_FEATURE_IF_SUPPORTED)
#undef ADD_FEATURE_IF_SUPPORTED
- _features_string = os::strdup(buf);
+ _cpu_info_string = os::strdup(buf);
+
+ _features_string = extract_features_string(_cpu_info_string,
+ strnlen(_cpu_info_string, sizeof(buf)),
+ features_offset);
}
#if defined(LINUX)
@@ -691,7 +721,7 @@ void VM_Version::initialize_cpu_information(void) {
int desc_len = snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "AArch64 ");
get_compatible_board(_cpu_desc + desc_len, CPU_DETAILED_DESC_BUF_SIZE - desc_len);
desc_len = (int)strlen(_cpu_desc);
- snprintf(_cpu_desc + desc_len, CPU_DETAILED_DESC_BUF_SIZE - desc_len, " %s", _features_string);
+ snprintf(_cpu_desc + desc_len, CPU_DETAILED_DESC_BUF_SIZE - desc_len, " %s", _cpu_info_string);
_initialized = true;
}
diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
index 04cf9c9c2a07c..373f8da540589 100644
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -125,6 +125,8 @@ enum Ampere_CPU_Model {
decl(SHA2, sha256, 6) \
decl(CRC32, crc32, 7) \
decl(LSE, lse, 8) \
+ decl(FPHP, fphp, 9) \
+ decl(ASIMDHP, asimdhp, 10) \
decl(DCPOP, dcpop, 16) \
decl(SHA3, sha3, 17) \
decl(SHA512, sha512, 21) \
diff --git a/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp b/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp
index 075db4736f132..978011491a0a7 100644
--- a/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp
+++ b/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp
@@ -131,6 +131,15 @@ void AbstractInterpreter::layout_activation(Method* method,
intptr_t* locals = interpreter_frame->sender_sp() + max_locals - 1;
+#ifdef ASSERT
+ if (caller->is_interpreted_frame()) {
+ // Test exact placement on top of caller args
+ intptr_t* l2 = caller->interpreter_frame_last_sp() + caller_actual_parameters - 1;
+ assert(l2 <= caller->interpreter_frame_expression_stack(), "bad placement");
+ assert(l2 >= locals, "bad placement");
+ }
+#endif
+
interpreter_frame->interpreter_frame_set_locals(locals);
BasicObjectLock* montop = interpreter_frame->interpreter_frame_monitor_begin();
BasicObjectLock* monbot = montop - moncount;
diff --git a/src/hotspot/cpu/arm/arm.ad b/src/hotspot/cpu/arm/arm.ad
index 617745dee20ab..4a0b557968caa 100644
--- a/src/hotspot/cpu/arm/arm.ad
+++ b/src/hotspot/cpu/arm/arm.ad
@@ -286,7 +286,7 @@ void MachPrologNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
st->print ("SUB R_SP, R_SP, %zu", framesize);
}
- if (C->stub_function() == nullptr && BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
+ if (C->stub_function() == nullptr) {
st->print("ldr t0, [guard]\n\t");
st->print("ldr t1, [Rthread, #thread_disarmed_guard_value_offset]\n\t");
st->print("cmp t0, t1\n\t");
@@ -1238,11 +1238,11 @@ encode %{
enc_class save_last_PC %{
// preserve mark
address mark = __ inst_mark();
- debug_only(int off0 = __ offset());
+ DEBUG_ONLY(int off0 = __ offset());
int ret_addr_offset = as_MachCall()->ret_addr_offset();
__ adr(LR, mark + ret_addr_offset);
__ str(LR, Address(Rthread, JavaThread::last_Java_pc_offset()));
- debug_only(int off1 = __ offset());
+ DEBUG_ONLY(int off1 = __ offset());
assert(off1 - off0 == 2 * Assembler::InstructionSize, "correct size prediction");
// restore mark
__ set_inst_mark(mark);
@@ -1251,11 +1251,11 @@ encode %{
enc_class preserve_SP %{
// preserve mark
address mark = __ inst_mark();
- debug_only(int off0 = __ offset());
+ DEBUG_ONLY(int off0 = __ offset());
// FP is preserved across all calls, even compiled calls.
// Use it to preserve SP in places where the callee might change the SP.
__ mov(Rmh_SP_save, SP);
- debug_only(int off1 = __ offset());
+ DEBUG_ONLY(int off1 = __ offset());
assert(off1 - off0 == 4, "correct size prediction");
// restore mark
__ set_inst_mark(mark);
@@ -4510,18 +4510,6 @@ instruct unnecessary_membar_volatile() %{
%}
//----------Register Move Instructions-----------------------------------------
-// instruct roundDouble_nop(regD dst) %{
-// match(Set dst (RoundDouble dst));
-// ins_pipe(empty);
-// %}
-
-
-// instruct roundFloat_nop(regF dst) %{
-// match(Set dst (RoundFloat dst));
-// ins_pipe(empty);
-// %}
-
-
// Cast Index to Pointer for unsafe natives
instruct castX2P(iRegX src, iRegP dst) %{
@@ -9004,7 +8992,8 @@ instruct ShouldNotReachHere( )
format %{ "ShouldNotReachHere" %}
ins_encode %{
if (is_reachable()) {
- __ stop(_halt_reason);
+ const char* str = __ code_string(_halt_reason);
+ __ stop(str);
}
%}
ins_pipe(tail_call);
diff --git a/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp b/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
index bca6c7ca30cb8..5683bc59d5c07 100644
--- a/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
@@ -59,7 +59,7 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
__ call(Runtime1::entry_for(C1StubId::predicate_failed_trap_id), relocInfo::runtime_call_type);
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ should_not_reach_here());
+ DEBUG_ONLY(__ should_not_reach_here());
return;
}
// Pass the array index on stack because all registers must be preserved
@@ -91,7 +91,7 @@ void PredicateFailedStub::emit_code(LIR_Assembler* ce) {
__ call(Runtime1::entry_for(C1StubId::predicate_failed_trap_id), relocInfo::runtime_call_type);
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ should_not_reach_here());
+ DEBUG_ONLY(__ should_not_reach_here());
}
void DivByZeroStub::emit_code(LIR_Assembler* ce) {
diff --git a/src/hotspot/cpu/arm/c1_Defs_arm.hpp b/src/hotspot/cpu/arm/c1_Defs_arm.hpp
index 32e0b02964879..5145efd011a8d 100644
--- a/src/hotspot/cpu/arm/c1_Defs_arm.hpp
+++ b/src/hotspot/cpu/arm/c1_Defs_arm.hpp
@@ -31,11 +31,6 @@ enum {
pd_hi_word_offset_in_bytes = BytesPerWord
};
-// explicit rounding operations are required to implement the strictFP mode
-enum {
- pd_strict_fp_requires_explicit_rounding = false
-};
-
#ifdef __SOFTFP__
#define SOFT(n) n
#define VFP(n)
diff --git a/src/hotspot/cpu/arm/c1_FpuStackSim_arm.cpp b/src/hotspot/cpu/arm/c1_FpuStackSim_arm.cpp
deleted file mode 100644
index 287f4e412d74b..0000000000000
--- a/src/hotspot/cpu/arm/c1_FpuStackSim_arm.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2008, 2017, 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.
- *
- */
-
-// Nothing needed here
diff --git a/src/hotspot/cpu/arm/c1_FpuStackSim_arm.hpp b/src/hotspot/cpu/arm/c1_FpuStackSim_arm.hpp
deleted file mode 100644
index 74e5ebc81b70b..0000000000000
--- a/src/hotspot/cpu/arm/c1_FpuStackSim_arm.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2008, 2019, 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.
- *
- */
-
-#ifndef CPU_ARM_C1_FPUSTACKSIM_ARM_HPP
-#define CPU_ARM_C1_FPUSTACKSIM_ARM_HPP
-
-// Nothing needed here
-
-#endif // CPU_ARM_C1_FPUSTACKSIM_ARM_HPP
diff --git a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
index 14a51bf4b1352..66c7b916f1ffa 100644
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
@@ -454,7 +454,7 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
}
}
-void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool pop_fpu_stack) {
+void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
assert(src->is_register(), "should not call otherwise");
assert(dest->is_stack(), "should not call otherwise");
@@ -493,7 +493,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type,
LIR_PatchCode patch_code, CodeEmitInfo* info,
- bool pop_fpu_stack, bool wide) {
+ bool wide) {
LIR_Address* to_addr = dest->as_address_ptr();
Register base_reg = to_addr->base()->as_pointer_register();
const bool needs_patching = (patch_code != lir_patch_none);
@@ -1512,7 +1512,7 @@ static int reg_size(LIR_Opr op) {
}
#endif
-void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest, CodeEmitInfo* info, bool pop_fpu_stack) {
+void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest, CodeEmitInfo* info) {
assert(info == nullptr, "unused on this code path");
assert(dest->is_register(), "wrong items state");
diff --git a/src/hotspot/cpu/arm/c1_LinearScan_arm.cpp b/src/hotspot/cpu/arm/c1_LinearScan_arm.cpp
deleted file mode 100644
index f1d6c6a0ff94f..0000000000000
--- a/src/hotspot/cpu/arm/c1_LinearScan_arm.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2008, 2025, 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.
- *
- */
-
-#include "c1/c1_Instruction.hpp"
-#include "c1/c1_LinearScan.hpp"
-#include "utilities/bitMap.inline.hpp"
-
-void LinearScan::allocate_fpu_stack() {
- // No FPU stack on ARM
-}
diff --git a/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp b/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp
index 949e985ab1eea..021b47148fa8c 100644
--- a/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp
@@ -70,11 +70,11 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, addre
if (oop_result1->is_valid()) {
assert_different_registers(oop_result1, R3, Rtemp);
- get_vm_result(oop_result1, Rtemp);
+ get_vm_result_oop(oop_result1, Rtemp);
}
if (metadata_result->is_valid()) {
assert_different_registers(metadata_result, R3, Rtemp);
- get_vm_result_2(metadata_result, Rtemp);
+ get_vm_result_metadata(metadata_result, Rtemp);
}
// Check for pending exception
diff --git a/src/hotspot/cpu/arm/frame_arm.inline.hpp b/src/hotspot/cpu/arm/frame_arm.inline.hpp
index 801b2f6177c3b..92a48f22f8cec 100644
--- a/src/hotspot/cpu/arm/frame_arm.inline.hpp
+++ b/src/hotspot/cpu/arm/frame_arm.inline.hpp
@@ -62,7 +62,7 @@ inline void frame::init(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, add
if (original_pc != nullptr) {
_pc = original_pc;
assert(_cb->as_nmethod()->insts_contains_inclusive(_pc),
- "original PC must be in the main code section of the the compiled method (or must be immediately following it)");
+ "original PC must be in the main code section of the compiled method (or must be immediately following it)");
_deopt_state = is_deoptimized;
} else {
_deopt_state = not_deoptimized;
diff --git a/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp b/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp
index 466dcc8fe66c1..049477cda7658 100644
--- a/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp
@@ -26,7 +26,6 @@
#include "gc/g1/g1BarrierSet.hpp"
#include "gc/g1/g1BarrierSetAssembler.hpp"
#include "gc/g1/g1BarrierSetRuntime.hpp"
-#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/g1CardTable.hpp"
#include "gc/g1/g1HeapRegion.hpp"
#include "gc/g1/g1ThreadLocalData.hpp"
diff --git a/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp b/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
index 704ca71ce990d..4492c9da33e1f 100644
--- a/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
@@ -169,10 +169,6 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
Register tmp0 = Rtemp;
Register tmp1 = R5; // must be callee-save register
- if (bs_nm == nullptr) {
- return;
- }
-
// The are no GCs that require memory barrier on arm32 now
#ifdef ASSERT
NMethodPatchingType patching_type = nmethod_patching_type();
diff --git a/src/hotspot/cpu/arm/gc/shared/barrierSetNMethod_arm.cpp b/src/hotspot/cpu/arm/gc/shared/barrierSetNMethod_arm.cpp
index 224a499ff5420..52d71ca65c29d 100644
--- a/src/hotspot/cpu/arm/gc/shared/barrierSetNMethod_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/shared/barrierSetNMethod_arm.cpp
@@ -29,8 +29,8 @@
#include "memory/resourceArea.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/javaThread.hpp"
-#include "runtime/sharedRuntime.hpp"
#include "runtime/registerMap.hpp"
+#include "runtime/sharedRuntime.hpp"
#include "utilities/align.hpp"
#include "utilities/debug.hpp"
@@ -72,7 +72,7 @@ void NativeNMethodBarrier::verify() const {
static NativeNMethodBarrier* native_nmethod_barrier(nmethod* nm) {
address barrier_address = nm->code_begin() + nm->frame_complete_offset() - entry_barrier_bytes;
NativeNMethodBarrier* barrier = reinterpret_cast(barrier_address);
- debug_only(barrier->verify());
+ DEBUG_ONLY(barrier->verify());
return barrier;
}
diff --git a/src/hotspot/cpu/arm/interp_masm_arm.hpp b/src/hotspot/cpu/arm/interp_masm_arm.hpp
index 58eeda6fbbbf2..578e191719e18 100644
--- a/src/hotspot/cpu/arm/interp_masm_arm.hpp
+++ b/src/hotspot/cpu/arm/interp_masm_arm.hpp
@@ -198,10 +198,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
// Debugging
void interp_verify_oop(Register reg, TosState state, const char* file, int line); // only if +VerifyOops && state == atos
- void verify_FPU(int stack_depth, TosState state = ftos) {
- // No VFP state verification is required for ARM
- }
-
// Object locking
void lock_object (Register lock_reg);
void unlock_object(Register lock_reg);
diff --git a/src/hotspot/cpu/arm/macroAssembler_arm.cpp b/src/hotspot/cpu/arm/macroAssembler_arm.cpp
index 638b3a5404c25..3dcde7d898d08 100644
--- a/src/hotspot/cpu/arm/macroAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/macroAssembler_arm.cpp
@@ -424,7 +424,7 @@ void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, in
// get oop result if there is one and reset the value in the thread
if (oop_result->is_valid()) {
- get_vm_result(oop_result, tmp);
+ get_vm_result_oop(oop_result, tmp);
}
}
@@ -528,17 +528,17 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_1, Register
call_VM_leaf_helper(entry_point, 4);
}
-void MacroAssembler::get_vm_result(Register oop_result, Register tmp) {
+void MacroAssembler::get_vm_result_oop(Register oop_result, Register tmp) {
assert_different_registers(oop_result, tmp);
- ldr(oop_result, Address(Rthread, JavaThread::vm_result_offset()));
- str(zero_register(tmp), Address(Rthread, JavaThread::vm_result_offset()));
+ ldr(oop_result, Address(Rthread, JavaThread::vm_result_oop_offset()));
+ str(zero_register(tmp), Address(Rthread, JavaThread::vm_result_oop_offset()));
verify_oop(oop_result);
}
-void MacroAssembler::get_vm_result_2(Register metadata_result, Register tmp) {
+void MacroAssembler::get_vm_result_metadata(Register metadata_result, Register tmp) {
assert_different_registers(metadata_result, tmp);
- ldr(metadata_result, Address(Rthread, JavaThread::vm_result_2_offset()));
- str(zero_register(tmp), Address(Rthread, JavaThread::vm_result_2_offset()));
+ ldr(metadata_result, Address(Rthread, JavaThread::vm_result_metadata_offset()));
+ str(zero_register(tmp), Address(Rthread, JavaThread::vm_result_metadata_offset()));
}
void MacroAssembler::add_rc(Register dst, Register arg1, RegisterOrConstant arg2) {
diff --git a/src/hotspot/cpu/arm/macroAssembler_arm.hpp b/src/hotspot/cpu/arm/macroAssembler_arm.hpp
index 621f0101432e7..d60b38e42dbea 100644
--- a/src/hotspot/cpu/arm/macroAssembler_arm.hpp
+++ b/src/hotspot/cpu/arm/macroAssembler_arm.hpp
@@ -257,8 +257,8 @@ class MacroAssembler: public Assembler {
void call_VM_leaf(address entry_point, Register arg_1, Register arg_2, Register arg_3);
void call_VM_leaf(address entry_point, Register arg_1, Register arg_2, Register arg_3, Register arg_4);
- void get_vm_result(Register oop_result, Register tmp);
- void get_vm_result_2(Register metadata_result, Register tmp);
+ void get_vm_result_oop(Register oop_result, Register tmp);
+ void get_vm_result_metadata(Register metadata_result, Register tmp);
// Always sets/resets sp, which default to SP if (last_sp == noreg)
// Optionally sets/resets fp (use noreg to avoid setting it)
diff --git a/src/hotspot/cpu/arm/matcher_arm.hpp b/src/hotspot/cpu/arm/matcher_arm.hpp
index a4436b7eab410..66fe8ac330eb5 100644
--- a/src/hotspot/cpu/arm/matcher_arm.hpp
+++ b/src/hotspot/cpu/arm/matcher_arm.hpp
@@ -101,9 +101,6 @@
// Java calling convention forces doubles to be aligned.
static const bool misaligned_doubles_ok = false;
- // Advertise here if the CPU requires explicit rounding operations to implement strictfp mode.
- static const bool strict_fp_requires_explicit_rounding = false;
-
// Are floats converted to double when stored to stack during deoptimization?
// ARM does not handle callee-save floats.
static constexpr bool float_in_double() {
diff --git a/src/hotspot/cpu/arm/runtime_arm.cpp b/src/hotspot/cpu/arm/runtime_arm.cpp
index cf4b398cf1fb9..615a63eac19af 100644
--- a/src/hotspot/cpu/arm/runtime_arm.cpp
+++ b/src/hotspot/cpu/arm/runtime_arm.cpp
@@ -42,17 +42,21 @@
//------------------------------generate_uncommon_trap_blob--------------------
// Ought to generate an ideal graph & compile, but here's some ASM
// instead.
-void OptoRuntime::generate_uncommon_trap_blob() {
+UncommonTrapBlob* OptoRuntime::generate_uncommon_trap_blob() {
// allocate space for the code
ResourceMark rm;
// setup code generation tools
+ const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
#ifdef _LP64
- CodeBuffer buffer("uncommon_trap_blob", 2700, 512);
+ CodeBuffer buffer(name, 2700, 512);
#else
// Measured 8/7/03 at 660 in 32bit debug build
- CodeBuffer buffer("uncommon_trap_blob", 2000, 512);
+ CodeBuffer buffer(name, 2000, 512);
#endif
+ if (buffer.blob() == nullptr) {
+ return nullptr;
+ }
// bypassed when code generation useless
MacroAssembler* masm = new MacroAssembler(&buffer);
const Register Rublock = R6;
@@ -173,7 +177,7 @@ void OptoRuntime::generate_uncommon_trap_blob() {
__ pop(RegisterSet(FP) | RegisterSet(PC));
masm->flush();
- _uncommon_trap_blob = UncommonTrapBlob::create(&buffer, nullptr, 2 /* LR+FP */);
+ return UncommonTrapBlob::create(&buffer, nullptr, 2 /* LR+FP */);
}
//------------------------------ generate_exception_blob ---------------------------
@@ -200,13 +204,17 @@ void OptoRuntime::generate_uncommon_trap_blob() {
//
// Note: the exception pc MUST be at a call (precise debug information)
//
-void OptoRuntime::generate_exception_blob() {
+ExceptionBlob* OptoRuntime::generate_exception_blob() {
// allocate space for code
ResourceMark rm;
// setup code generation tools
// Measured 8/7/03 at 256 in 32bit debug build
- CodeBuffer buffer("exception_blob", 600, 512);
+ const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
+ CodeBuffer buffer(name, 600, 512);
+ if (buffer.blob() == nullptr) {
+ return nullptr;
+ }
MacroAssembler* masm = new MacroAssembler(&buffer);
int framesize_in_words = 2; // FP + LR
@@ -281,7 +289,7 @@ void OptoRuntime::generate_exception_blob() {
// make sure all code is generated
masm->flush();
- _exception_blob = ExceptionBlob::create(&buffer, oop_maps, framesize_in_words);
+ return ExceptionBlob::create(&buffer, oop_maps, framesize_in_words);
}
#endif // COMPILER2
diff --git a/src/hotspot/cpu/arm/sharedRuntime_arm.cpp b/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
index c63d72920a5b6..8ba847e7e3288 100644
--- a/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
+++ b/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
@@ -612,12 +612,12 @@ static void gen_c2i_adapter(MacroAssembler *masm,
}
-AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
- int total_args_passed,
- int comp_args_on_stack,
- const BasicType *sig_bt,
- const VMRegPair *regs,
- AdapterFingerPrint* fingerprint) {
+void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
+ int total_args_passed,
+ int comp_args_on_stack,
+ const BasicType *sig_bt,
+ const VMRegPair *regs,
+ AdapterHandlerEntry* handler) {
address i2c_entry = __ pc();
gen_i2c_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs);
@@ -637,7 +637,8 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
address c2i_entry = __ pc();
gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup);
- return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry);
+ handler->set_entry_points(i2c_entry, c2i_entry, c2i_unverified_entry, nullptr);
+ return;
}
@@ -1717,7 +1718,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
// Overwrite saved register values
// Place metadata result of VM call into Rmethod
- __ get_vm_result_2(R1, Rtemp);
+ __ get_vm_result_metadata(R1, Rtemp);
__ str(R1, Address(SP, RegisterSaver::Rmethod_offset * wordSize));
// Place target address (VM call result) into Rtemp
@@ -1730,7 +1731,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
RegisterSaver::restore_live_registers(masm);
const Register Rzero = __ zero_register(Rtemp);
- __ str(Rzero, Address(Rthread, JavaThread::vm_result_2_offset()));
+ __ str(Rzero, Address(Rthread, JavaThread::vm_result_metadata_offset()));
__ mov(Rexception_pc, LR);
__ jump(StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type, Rtemp);
diff --git a/src/hotspot/cpu/arm/stubGenerator_arm.cpp b/src/hotspot/cpu/arm/stubGenerator_arm.cpp
index aad81e7891d46..fc5bcb4e0e6df 100644
--- a/src/hotspot/cpu/arm/stubGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/stubGenerator_arm.cpp
@@ -3176,11 +3176,7 @@ class StubGenerator: public StubCodeGenerator {
// arraycopy stubs used by compilers
generate_arraycopy_stubs();
- BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
- if (bs_nm != nullptr) {
- StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
- }
-
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
void generate_compiler_stubs() {
diff --git a/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp b/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
index 3f1cd1e23de8c..30d88a4db91fd 100644
--- a/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
@@ -794,10 +794,6 @@ address TemplateInterpreterGenerator::generate_currentThread() { return nullptr;
address TemplateInterpreterGenerator::generate_CRC32_update_entry() { return nullptr; }
address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) { return nullptr; }
address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) { return nullptr; }
-address TemplateInterpreterGenerator::generate_Float_intBitsToFloat_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Float_floatToRawIntBits_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Double_longBitsToDouble_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Double_doubleToRawLongBits_entry() { return nullptr; }
address TemplateInterpreterGenerator::generate_Float_float16ToFloat_entry() { return nullptr; }
address TemplateInterpreterGenerator::generate_Float_floatToFloat16_entry() { return nullptr; }
@@ -1471,11 +1467,11 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
// preserve exception over this code sequence
__ pop_ptr(R0_tos);
- __ str(R0_tos, Address(Rthread, JavaThread::vm_result_offset()));
+ __ str(R0_tos, Address(Rthread, JavaThread::vm_result_oop_offset()));
// remove the activation (without doing throws on illegalMonitorExceptions)
__ remove_activation(vtos, Rexception_pc, false, true, false);
// restore exception
- __ get_vm_result(Rexception_obj, Rtemp);
+ __ get_vm_result_oop(Rexception_obj, Rtemp);
// In between activations - previous activation type unknown yet
// compute continuation point - the continuation point expects
diff --git a/src/hotspot/cpu/arm/templateTable_arm.cpp b/src/hotspot/cpu/arm/templateTable_arm.cpp
index bbe5713090af5..50e3761dcb917 100644
--- a/src/hotspot/cpu/arm/templateTable_arm.cpp
+++ b/src/hotspot/cpu/arm/templateTable_arm.cpp
@@ -538,7 +538,7 @@ void TemplateTable::condy_helper(Label& Done)
__ mov(rtmp, (int) bytecode());
__ call_VM(obj, CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc), rtmp);
- __ get_vm_result_2(flags, rtmp);
+ __ get_vm_result_metadata(flags, rtmp);
// VMr = obj = base address to find primitive value to push
// VMr2 = flags = (tos, off) using format of CPCE::_flags
@@ -4143,8 +4143,7 @@ void TemplateTable::checkcast() {
__ push(atos);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
- // vm_result_2 has metadata result
- __ get_vm_result_2(Rsuper, Robj);
+ __ get_vm_result_metadata(Rsuper, Robj);
__ pop_ptr(Robj);
__ b(resolved);
@@ -4214,8 +4213,7 @@ void TemplateTable::instanceof() {
__ push(atos);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
- // vm_result_2 has metadata result
- __ get_vm_result_2(Rsuper, Robj);
+ __ get_vm_result_metadata(Rsuper, Robj);
__ pop_ptr(Robj);
__ b(resolved);
diff --git a/src/hotspot/cpu/arm/vmStructs_arm.hpp b/src/hotspot/cpu/arm/vmStructs_arm.hpp
index 4ce78d517e8ab..453938a824e8b 100644
--- a/src/hotspot/cpu/arm/vmStructs_arm.hpp
+++ b/src/hotspot/cpu/arm/vmStructs_arm.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2025, 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
@@ -29,7 +29,7 @@
// constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp.
-#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
+#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \
\
/******************************/ \
/* JavaCallWrapper */ \
@@ -39,10 +39,10 @@
/******************************/ \
volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*)
-#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
+#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type)
-#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant)
-#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant)
#endif // CPU_ARM_VMSTRUCTS_ARM_HPP
diff --git a/src/hotspot/cpu/arm/vm_version_arm_32.cpp b/src/hotspot/cpu/arm/vm_version_arm_32.cpp
index 148786a55da41..d094193603567 100644
--- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp
+++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp
@@ -295,7 +295,7 @@ void VM_Version::initialize() {
(has_multiprocessing_extensions() ? ", mp_ext" : ""));
// buf is started with ", " or is empty
- _features_string = os::strdup(buf);
+ _cpu_info_string = os::strdup(buf);
if (has_simd()) {
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
@@ -363,6 +363,6 @@ void VM_Version::initialize_cpu_information(void) {
_no_of_threads = _no_of_cores;
_no_of_sockets = _no_of_cores;
snprintf(_cpu_name, CPU_TYPE_DESC_BUF_SIZE - 1, "ARM%d", _arm_arch);
- snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "%s", _features_string);
+ snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "%s", _cpu_info_string);
_initialized = true;
}
diff --git a/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp b/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp
index cc094ad4f995b..beadce336379e 100644
--- a/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp
+++ b/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp
@@ -128,6 +128,15 @@ void AbstractInterpreter::layout_activation(Method* method,
caller->interpreter_frame_esp() + caller_actual_parameters :
caller->sp() + method->max_locals() - 1 + (frame::java_abi_size / Interpreter::stackElementSize);
+#ifdef ASSERT
+ if (caller->is_interpreted_frame()) {
+ assert(locals_base <= caller->interpreter_frame_expression_stack(), "bad placement");
+ const int caller_abi_bytesize = (is_bottom_frame ? frame::top_ijava_frame_abi_size : frame::parent_ijava_frame_abi_size);
+ intptr_t* l2 = caller->sp() + method->max_locals() - 1 + (caller_abi_bytesize / Interpreter::stackElementSize);
+ assert(locals_base >= l2, "bad placement");
+ }
+#endif
+
intptr_t* monitor_base = caller->sp() - frame::ijava_state_size / Interpreter::stackElementSize;
intptr_t* monitor = monitor_base - (moncount * frame::interpreter_frame_monitor_size());
intptr_t* esp_base = monitor - 1;
diff --git a/src/hotspot/cpu/ppc/assembler_ppc.hpp b/src/hotspot/cpu/ppc/assembler_ppc.hpp
index 11532edaad9ce..b38c4ac5bae66 100644
--- a/src/hotspot/cpu/ppc/assembler_ppc.hpp
+++ b/src/hotspot/cpu/ppc/assembler_ppc.hpp
@@ -544,6 +544,7 @@ class Assembler : public AbstractAssembler {
MTVSRDD_OPCODE = (31u << OPCODE_SHIFT | 435u << 1),
MTVSRWZ_OPCODE = (31u << OPCODE_SHIFT | 243u << 1),
MFVSRD_OPCODE = (31u << OPCODE_SHIFT | 51u << 1),
+ MFVSRLD_OPCODE = (31u << OPCODE_SHIFT | 307u << 1),
MTVSRWA_OPCODE = (31u << OPCODE_SHIFT | 211u << 1),
MFVSRWZ_OPCODE = (31u << OPCODE_SHIFT | 115u << 1),
XXPERMDI_OPCODE= (60u << OPCODE_SHIFT | 10u << 3),
@@ -736,6 +737,14 @@ class Assembler : public AbstractAssembler {
VPOPCNTH_OPCODE= (4u << OPCODE_SHIFT | 1859u ),
VPOPCNTW_OPCODE= (4u << OPCODE_SHIFT | 1923u ),
VPOPCNTD_OPCODE= (4u << OPCODE_SHIFT | 1987u ),
+ VCLZB_OPCODE = (4u << OPCODE_SHIFT | 1794u ),
+ VCLZH_OPCODE = (4u << OPCODE_SHIFT | 1858u ),
+ VCLZW_OPCODE = (4u << OPCODE_SHIFT | 1922u ),
+ VCLZD_OPCODE = (4u << OPCODE_SHIFT | 1986u ),
+ VCTZB_OPCODE = (4u << OPCODE_SHIFT | 28u << 16 | 1538u),
+ VCTZH_OPCODE = (4u << OPCODE_SHIFT | 29u << 16 | 1538u),
+ VCTZW_OPCODE = (4u << OPCODE_SHIFT | 30u << 16 | 1538u),
+ VCTZD_OPCODE = (4u << OPCODE_SHIFT | 31u << 16 | 1538u),
// Vector Floating-Point
// not implemented yet
@@ -2334,6 +2343,14 @@ class Assembler : public AbstractAssembler {
inline void vpopcnth( VectorRegister d, VectorRegister b);
inline void vpopcntw( VectorRegister d, VectorRegister b);
inline void vpopcntd( VectorRegister d, VectorRegister b);
+ inline void vclzb( VectorRegister d, VectorRegister b);
+ inline void vclzh( VectorRegister d, VectorRegister b);
+ inline void vclzw( VectorRegister d, VectorRegister b);
+ inline void vclzd( VectorRegister d, VectorRegister b);
+ inline void vctzb( VectorRegister d, VectorRegister b);
+ inline void vctzh( VectorRegister d, VectorRegister b);
+ inline void vctzw( VectorRegister d, VectorRegister b);
+ inline void vctzd( VectorRegister d, VectorRegister b);
// Vector Floating-Point not implemented yet
inline void mtvscr( VectorRegister b);
inline void mfvscr( VectorRegister d);
@@ -2358,6 +2375,7 @@ class Assembler : public AbstractAssembler {
inline void xxmrglw( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void mtvsrd( VectorSRegister d, Register a);
inline void mfvsrd( Register d, VectorSRegister a);
+ inline void mfvsrld( Register d, VectorSRegister a); // Requires Power9.
inline void mtvsrdd( VectorSRegister d, Register a, Register b);
inline void mtvsrwz( VectorSRegister d, Register a);
inline void mfvsrwz( Register d, VectorSRegister a);
diff --git a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
index ab026d356628b..4fb8c5c41986b 100644
--- a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
+++ b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
@@ -873,6 +873,7 @@ inline void Assembler::stxvd2x( VectorSRegister d, Register s1, Register s2) { e
inline void Assembler::mtvsrd( VectorSRegister d, Register a) { emit_int32( MTVSRD_OPCODE | vsrt(d) | ra(a)); }
inline void Assembler::mtvsrdd( VectorSRegister d, Register a, Register b) { emit_int32( MTVSRDD_OPCODE | vsrt(d) | ra(a) | rb(b)); }
inline void Assembler::mfvsrd( Register d, VectorSRegister a) { emit_int32( MFVSRD_OPCODE | vsrs(a) | ra(d)); }
+inline void Assembler::mfvsrld( Register d, VectorSRegister a) { emit_int32( MFVSRLD_OPCODE | vsrs(a) | ra(d)); }
inline void Assembler::mtvsrwz( VectorSRegister d, Register a) { emit_int32( MTVSRWZ_OPCODE | vsrt(d) | ra(a)); }
inline void Assembler::mfvsrwz( Register d, VectorSRegister a) { emit_int32( MFVSRWZ_OPCODE | vsrs(a) | ra(d)); }
inline void Assembler::xxspltib(VectorSRegister d, int ui8) { emit_int32( XXSPLTIB_OPCODE | vsrt(d) | imm8(ui8)); }
@@ -1076,6 +1077,14 @@ inline void Assembler::vpopcntb(VectorRegister d, VectorRegister b)
inline void Assembler::vpopcnth(VectorRegister d, VectorRegister b) { emit_int32( VPOPCNTH_OPCODE | vrt(d) | vrb(b)); }
inline void Assembler::vpopcntw(VectorRegister d, VectorRegister b) { emit_int32( VPOPCNTW_OPCODE | vrt(d) | vrb(b)); }
inline void Assembler::vpopcntd(VectorRegister d, VectorRegister b) { emit_int32( VPOPCNTD_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vclzb( VectorRegister d, VectorRegister b) { emit_int32( VCLZB_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vclzh( VectorRegister d, VectorRegister b) { emit_int32( VCLZH_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vclzw( VectorRegister d, VectorRegister b) { emit_int32( VCLZW_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vclzd( VectorRegister d, VectorRegister b) { emit_int32( VCLZD_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vctzb( VectorRegister d, VectorRegister b) { emit_int32( VCTZB_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vctzh( VectorRegister d, VectorRegister b) { emit_int32( VCTZH_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vctzw( VectorRegister d, VectorRegister b) { emit_int32( VCTZW_OPCODE | vrt(d) | vrb(b)); }
+inline void Assembler::vctzd( VectorRegister d, VectorRegister b) { emit_int32( VCTZD_OPCODE | vrt(d) | vrb(b)); }
inline void Assembler::mtvscr( VectorRegister b) { emit_int32( MTVSCR_OPCODE | vrb(b)); }
inline void Assembler::mfvscr( VectorRegister d) { emit_int32( MFVSCR_OPCODE | vrt(d)); }
diff --git a/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp b/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp
index d4f5faa29a869..a390a6eeed410 100644
--- a/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp
@@ -74,7 +74,7 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
__ bctrl();
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ illtrap());
+ DEBUG_ONLY(__ illtrap());
return;
}
@@ -98,7 +98,7 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
__ bctrl();
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ illtrap());
+ DEBUG_ONLY(__ illtrap());
}
@@ -115,7 +115,7 @@ void PredicateFailedStub::emit_code(LIR_Assembler* ce) {
__ bctrl();
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ illtrap());
+ DEBUG_ONLY(__ illtrap());
}
@@ -156,7 +156,7 @@ void DivByZeroStub::emit_code(LIR_Assembler* ce) {
__ bctrl();
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ illtrap());
+ DEBUG_ONLY(__ illtrap());
}
@@ -179,7 +179,7 @@ void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) {
__ bctrl();
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
- debug_only(__ illtrap());
+ DEBUG_ONLY(__ illtrap());
}
@@ -193,7 +193,7 @@ void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
__ mtctr(R0);
__ bctrl();
ce->add_call_info_here(_info);
- debug_only( __ illtrap(); )
+ DEBUG_ONLY( __ illtrap(); )
}
@@ -441,7 +441,7 @@ void DeoptimizeStub::emit_code(LIR_Assembler* ce) {
__ load_const_optimized(R0, _trap_request); // Pass trap request in R0.
__ bctrl();
ce->add_call_info_here(_info);
- debug_only(__ illtrap());
+ DEBUG_ONLY(__ illtrap());
}
diff --git a/src/hotspot/cpu/ppc/c1_Defs_ppc.hpp b/src/hotspot/cpu/ppc/c1_Defs_ppc.hpp
index 9044b9edd2653..f322e548e2161 100644
--- a/src/hotspot/cpu/ppc/c1_Defs_ppc.hpp
+++ b/src/hotspot/cpu/ppc/c1_Defs_ppc.hpp
@@ -38,12 +38,6 @@ enum {
};
-// Explicit rounding operations are not required to implement the strictFP mode.
-enum {
- pd_strict_fp_requires_explicit_rounding = false
-};
-
-
// registers
enum {
pd_nof_cpu_regs_frame_map = 32, // Number of registers used during code emission.
diff --git a/src/hotspot/cpu/ppc/c1_FpuStackSim_ppc.hpp b/src/hotspot/cpu/ppc/c1_FpuStackSim_ppc.hpp
deleted file mode 100644
index 84d180a9b0380..0000000000000
--- a/src/hotspot/cpu/ppc/c1_FpuStackSim_ppc.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 SAP SE. 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.
- *
- */
-
-#ifndef CPU_PPC_C1_FPUSTACKSIM_PPC_HPP
-#define CPU_PPC_C1_FPUSTACKSIM_PPC_HPP
-
-// No FPU stack on PPC.
-class FpuStackSim;
-
-#endif // CPU_PPC_C1_FPUSTACKSIM_PPC_HPP
diff --git a/src/hotspot/cpu/ppc/c1_FrameMap_ppc.cpp b/src/hotspot/cpu/ppc/c1_FrameMap_ppc.cpp
index e4684613e2589..8ce324a570bd9 100644
--- a/src/hotspot/cpu/ppc/c1_FrameMap_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_FrameMap_ppc.cpp
@@ -189,7 +189,7 @@ LIR_Opr FrameMap::_caller_save_fpu_regs[] = {};
FloatRegister FrameMap::nr2floatreg (int rnr) {
assert(_init_done, "tables not initialized");
- debug_only(fpu_range_check(rnr);)
+ DEBUG_ONLY(fpu_range_check(rnr);)
return _fpu_regs[rnr];
}
diff --git a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
index 67a4a65b871f8..c678f409c4998 100644
--- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
@@ -1203,7 +1203,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
}
-void LIR_Assembler::reg2stack(LIR_Opr from_reg, LIR_Opr dest, BasicType type, bool pop_fpu_stack) {
+void LIR_Assembler::reg2stack(LIR_Opr from_reg, LIR_Opr dest, BasicType type) {
Address addr;
if (dest->is_single_word()) {
addr = frame_map()->address_for_slot(dest->single_stack_ix());
@@ -1246,7 +1246,7 @@ void LIR_Assembler::reg2reg(LIR_Opr from_reg, LIR_Opr to_reg) {
void LIR_Assembler::reg2mem(LIR_Opr from_reg, LIR_Opr dest, BasicType type,
- LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack,
+ LIR_PatchCode patch_code, CodeEmitInfo* info,
bool wide) {
assert(type != T_METADATA, "store of metadata ptr not supported");
LIR_Address* addr = dest->as_address_ptr();
@@ -1617,7 +1617,7 @@ void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, L
void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest,
- CodeEmitInfo* info, bool pop_fpu_stack) {
+ CodeEmitInfo* info) {
assert(info == nullptr, "unused on this code path");
assert(left->is_register(), "wrong items state");
assert(dest->is_register(), "wrong items state");
@@ -2839,25 +2839,28 @@ void LIR_Assembler::negate(LIR_Opr left, LIR_Opr dest, LIR_Opr tmp) {
void LIR_Assembler::rt_call(LIR_Opr result, address dest,
const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info) {
- // Stubs: Called via rt_call, but dest is a stub address (no function descriptor).
+ // Stubs: Called via rt_call, but dest is a stub address (no FunctionDescriptor).
if (dest == Runtime1::entry_for(C1StubId::register_finalizer_id) ||
- dest == Runtime1::entry_for(C1StubId::new_multi_array_id )) {
+ dest == Runtime1::entry_for(C1StubId::new_multi_array_id ) ||
+ dest == Runtime1::entry_for(C1StubId::is_instance_of_id )) {
+ assert(CodeCache::contains(dest), "simplified call is only for special C1 stubs");
//__ load_const_optimized(R0, dest);
__ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(dest));
__ mtctr(R0);
__ bctrl();
- assert(info != nullptr, "sanity");
- add_call_info_here(info);
- __ post_call_nop();
+ if (info != nullptr) {
+ add_call_info_here(info);
+ __ post_call_nop();
+ }
return;
}
__ call_c(dest, relocInfo::runtime_call_type);
+ assert(__ last_calls_return_pc() == __ pc(), "pcn not at return pc");
if (info != nullptr) {
add_call_info_here(info);
+ __ post_call_nop();
}
- assert(__ last_calls_return_pc() == __ pc(), "pcn not at return pc");
- __ post_call_nop();
}
diff --git a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
index d9ccf63bed325..b9c8ced8ef192 100644
--- a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
@@ -1128,9 +1128,10 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
x->profiled_method(), x->profiled_bci());
}
+
// Intrinsic for Class::isInstance
address LIRGenerator::isInstance_entry() {
- return CAST_FROM_FN_PTR(address, Runtime1::is_instance_of);
+ return Runtime1::entry_for(C1StubId::is_instance_of_id);
}
diff --git a/src/hotspot/cpu/ppc/c1_LinearScan_ppc.cpp b/src/hotspot/cpu/ppc/c1_LinearScan_ppc.cpp
deleted file mode 100644
index d6ceab8b27b1b..0000000000000
--- a/src/hotspot/cpu/ppc/c1_LinearScan_ppc.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 SAP SE. 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.
- *
- */
-
-#include "c1/c1_Instruction.hpp"
-#include "c1/c1_LinearScan.hpp"
-#include "utilities/bitMap.inline.hpp"
-
-void LinearScan::allocate_fpu_stack() {
- Unimplemented();
- // No FPU stack on PPC
-}
diff --git a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
index ac9c5984de050..77d3653aefdb8 100644
--- a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
@@ -83,16 +83,17 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
// Save object being locked into the BasicObjectLock...
std(Roop, in_bytes(BasicObjectLock::obj_offset()), Rbox);
- if (DiagnoseSyncOnValueBasedClasses != 0) {
- load_klass(Rscratch, Roop);
- lbz(Rscratch, in_bytes(Klass::misc_flags_offset()), Rscratch);
- testbitdi(CR0, R0, Rscratch, exact_log2(KlassFlags::_misc_is_value_based_class));
- bne(CR0, slow_int);
- }
-
if (LockingMode == LM_LIGHTWEIGHT) {
lightweight_lock(Rbox, Roop, Rmark, Rscratch, slow_int);
} else if (LockingMode == LM_LEGACY) {
+
+ if (DiagnoseSyncOnValueBasedClasses != 0) {
+ load_klass(Rscratch, Roop);
+ lbz(Rscratch, in_bytes(Klass::misc_flags_offset()), Rscratch);
+ testbitdi(CR0, R0, Rscratch, exact_log2(KlassFlags::_misc_is_value_based_class));
+ bne(CR0, slow_int);
+ }
+
// ... and mark it unlocked.
ori(Rmark, Rmark, markWord::unlocked_value);
diff --git a/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp b/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp
index b1ee11317d27e..79b129c08ae22 100644
--- a/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp
@@ -82,10 +82,10 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result,
if (oop_result1->is_valid() || metadata_result->is_valid()) {
li(R0, 0);
if (oop_result1->is_valid()) {
- std(R0, in_bytes(JavaThread::vm_result_offset()), R16_thread);
+ std(R0, in_bytes(JavaThread::vm_result_oop_offset()), R16_thread);
}
if (metadata_result->is_valid()) {
- std(R0, in_bytes(JavaThread::vm_result_2_offset()), R16_thread);
+ std(R0, in_bytes(JavaThread::vm_result_metadata_offset()), R16_thread);
}
}
@@ -112,10 +112,10 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result,
// Get oop results if there are any and reset the values in the thread.
if (oop_result1->is_valid()) {
- get_vm_result(oop_result1);
+ get_vm_result_oop(oop_result1);
}
if (metadata_result->is_valid()) {
- get_vm_result_2(metadata_result);
+ get_vm_result_metadata(metadata_result);
}
return (int)(return_pc - code_section()->start());
@@ -609,6 +609,73 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
}
break;
+ case C1StubId::is_instance_of_id:
+ {
+ // Called like a C function, but without FunctionDescriptor (see LIR_Assembler::rt_call).
+
+ // Arguments and return value.
+ Register mirror = R3_ARG1;
+ Register obj = R4_ARG2;
+ Register result = R3_RET;
+
+ // Other argument registers can be used as temp registers.
+ Register klass = R5;
+ Register offset = R6;
+ Register sub_klass = R7;
+
+ Label is_secondary, success;
+
+ // Get the Klass*.
+ __ ld(klass, java_lang_Class::klass_offset(), mirror);
+
+ // Return false if obj or klass is null.
+ mirror = noreg; // killed by next instruction
+ __ li(result, 0); // assume result is false
+ __ cmpdi(CR0, obj, 0);
+ __ cmpdi(CR1, klass, 0);
+ __ cror(CR0, Assembler::equal, CR1, Assembler::equal);
+ __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CR0, Assembler::equal), Assembler::bhintbhBCLRisReturn);
+
+ __ lwz(offset, in_bytes(Klass::super_check_offset_offset()), klass);
+ __ load_klass(sub_klass, obj);
+ __ cmpwi(CR0, offset, in_bytes(Klass::secondary_super_cache_offset()));
+ __ beq(CR0, is_secondary); // Klass is a secondary superclass
+
+ // Klass is a concrete class
+ __ ldx(R0, sub_klass, offset);
+ __ cmpd(CR0, klass, R0);
+ if (VM_Version::has_brw()) {
+ // Power10 can set the result by one instruction. No need for a branch.
+ __ setbc(result, CR0, Assembler::equal);
+ } else {
+ __ beq(CR0, success);
+ }
+ __ blr();
+
+ __ bind(is_secondary);
+
+ // This is necessary because I am never in my own secondary_super list.
+ __ cmpd(CR0, sub_klass, klass);
+ __ beq(CR0, success);
+
+ __ lookup_secondary_supers_table_var(sub_klass, klass,
+ /*temps*/R9, R10, R11, R12,
+ /*result*/R8);
+ __ cmpdi(CR0, R8, 0); // 0 means is subclass
+ if (VM_Version::has_brw()) {
+ // Power10 can set the result by one instruction. No need for a branch.
+ __ setbc(result, CR0, Assembler::equal);
+ } else {
+ __ beq(CR0, success);
+ }
+ __ blr();
+
+ __ bind(success);
+ __ li(result, 1);
+ __ blr();
+ }
+ break;
+
case C1StubId::monitorenter_nofpu_id:
case C1StubId::monitorenter_id:
{
diff --git a/src/hotspot/cpu/ppc/compiledIC_ppc.cpp b/src/hotspot/cpu/ppc/compiledIC_ppc.cpp
index c8cb68e3eb4eb..8a29da664360c 100644
--- a/src/hotspot/cpu/ppc/compiledIC_ppc.cpp
+++ b/src/hotspot/cpu/ppc/compiledIC_ppc.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2025 SAP SE. 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
@@ -29,9 +29,6 @@
#include "memory/resourceArea.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
-#ifdef COMPILER2
-#include "opto/matcher.hpp"
-#endif
// ----------------------------------------------------------------------------
@@ -78,7 +75,6 @@
const int IC_pos_in_java_to_interp_stub = 8;
#define __ masm->
address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address mark/* = nullptr*/) {
-#ifdef COMPILER2
if (mark == nullptr) {
// Get the mark within main instrs section which is set to the address of the call.
mark = __ inst_mark();
@@ -108,7 +104,7 @@ address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address ma
// - call
__ calculate_address_from_global_toc(reg_scratch, __ method_toc());
AddressLiteral ic = __ allocate_metadata_address((Metadata *)nullptr);
- bool success = __ load_const_from_method_toc(as_Register(Matcher::inline_cache_reg_encode()),
+ bool success = __ load_const_from_method_toc(R19_inline_cache_reg,
ic, reg_scratch, /*fixed_size*/ true);
if (!success) {
return nullptr; // CodeCache is full
@@ -134,13 +130,9 @@ address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address ma
assert(!is_NativeCallTrampolineStub_at(__ addr_at(stub_start_offset)),
"must not confuse java_to_interp with trampoline stubs");
- // End the stub.
+ // End the stub.
__ end_a_stub();
return stub;
-#else
- ShouldNotReachHere();
- return nullptr;
-#endif
}
#undef __
diff --git a/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp b/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp
index ad8640453e687..f12d25ac61152 100644
--- a/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp
+++ b/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp
@@ -77,7 +77,6 @@ RuntimeStub* DowncallLinker::make_downcall_stub(BasicType* signature,
#ifndef PRODUCT
LogTarget(Trace, foreign, downcall) lt;
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
stub->print_on(&ls);
}
@@ -174,7 +173,6 @@ void DowncallLinker::StubGenerator::generate() {
#ifndef PRODUCT
LogTarget(Trace, foreign, downcall) lt;
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
arg_shuffle.print_on(&ls);
}
diff --git a/src/hotspot/cpu/ppc/frame_ppc.cpp b/src/hotspot/cpu/ppc/frame_ppc.cpp
index 38c26e5e4970b..6b6a792117d4e 100644
--- a/src/hotspot/cpu/ppc/frame_ppc.cpp
+++ b/src/hotspot/cpu/ppc/frame_ppc.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2025 SAP SE. 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
@@ -195,6 +195,15 @@ bool frame::safe_for_sender(JavaThread *thread) {
return false;
}
+ if (sender_pc() == nullptr) {
+ // Likely the return pc was not yet stored to stack. We rather discard this
+ // sample also because we would hit an assertion in frame::setup(). We can
+ // find any other random value if the return pc was not yet stored to
+ // stack. We rely on consistency checks to handle this (see
+ // e.g. find_initial_Java_frame())
+ return false;
+ }
+
return true;
}
diff --git a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
index fe10114a1954f..acf916c8c7222 100644
--- a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
@@ -181,10 +181,6 @@ void BarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, Re
void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Register tmp) {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
- if (bs_nm == nullptr) {
- return;
- }
-
assert_different_registers(tmp, R0);
__ block_comment("nmethod_entry_barrier (nmethod_entry_barrier) {");
@@ -215,11 +211,6 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Register t
}
void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler *masm, Register tmp1, Register tmp2, Register tmp3) {
- BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
- if (bs_nm == nullptr) {
- return;
- }
-
assert_different_registers(tmp1, tmp2, tmp3);
__ block_comment("c2i_entry_barrier (c2i_entry_barrier) {");
diff --git a/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp
index 19084ed27c7c0..d3bb9cc3c04da 100644
--- a/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp
@@ -23,8 +23,8 @@
*/
#include "code/codeBlob.hpp"
-#include "code/nmethod.hpp"
#include "code/nativeInst.hpp"
+#include "code/nmethod.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "gc/shared/barrierSetNMethod.hpp"
@@ -108,7 +108,7 @@ static NativeNMethodBarrier* get_nmethod_barrier(nmethod* nm) {
}
auto barrier = reinterpret_cast(barrier_address);
- debug_only(barrier->verify());
+ DEBUG_ONLY(barrier->verify());
return barrier;
}
diff --git a/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp b/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp
index 48422bc66212e..5b24259103f53 100644
--- a/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp
@@ -26,9 +26,9 @@
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
+#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
-#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
#define __ masm->masm()->
diff --git a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
index f7e3072f0811a..ec5b98bd4c516 100644
--- a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
@@ -24,8 +24,10 @@
*/
#include "asm/macroAssembler.inline.hpp"
-#include "gc/shared/gcArguments.hpp"
#include "gc/shared/gc_globals.hpp"
+#include "gc/shared/gcArguments.hpp"
+#include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
+#include "gc/shenandoah/mode/shenandoahMode.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
#include "gc/shenandoah/shenandoahForwarding.hpp"
@@ -34,8 +36,6 @@
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahRuntime.hpp"
#include "gc/shenandoah/shenandoahThreadLocalData.hpp"
-#include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
-#include "gc/shenandoah/mode/shenandoahMode.hpp"
#include "interpreter/interpreter.hpp"
#include "macroAssembler_ppc.hpp"
#include "runtime/javaThread.hpp"
@@ -587,9 +587,6 @@ void ShenandoahBarrierSetAssembler::load_at(
void ShenandoahBarrierSetAssembler::store_check(MacroAssembler* masm, Register base, RegisterOrConstant ind_or_offs, Register tmp) {
assert(ShenandoahCardBarrier, "Should have been checked by caller");
-
- ShenandoahBarrierSet* ctbs = ShenandoahBarrierSet::barrier_set();
- CardTable* ct = ctbs->card_table();
assert_different_registers(base, tmp, R0);
if (ind_or_offs.is_constant()) {
@@ -598,7 +595,7 @@ void ShenandoahBarrierSetAssembler::store_check(MacroAssembler* masm, Register b
__ add(base, ind_or_offs.as_register(), base);
}
- __ load_const_optimized(tmp, (address)ct->byte_map_base(), R0);
+ __ ld(tmp, in_bytes(ShenandoahThreadLocalData::card_table_offset()), R16_thread); /* tmp = *[R16_thread + card_table_offset] */
__ srdi(base, base, CardTable::card_shift());
__ li(R0, CardTable::dirty_card_val());
__ stbx(R0, tmp, base);
@@ -797,7 +794,8 @@ void ShenandoahBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssemb
__ srdi(addr, addr, CardTable::card_shift());
__ srdi(count, count, CardTable::card_shift());
__ subf(count, addr, count);
- __ add_const_optimized(addr, addr, (address)ct->byte_map_base(), R0);
+ __ ld(R0, in_bytes(ShenandoahThreadLocalData::card_table_offset()), R16_thread);
+ __ add(addr, addr, R0);
__ addi(count, count, 1);
__ li(R0, 0);
__ mtctr(count);
diff --git a/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp b/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp
index 28a57b2dc293f..f3a7a948f7021 100644
--- a/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp
@@ -21,8 +21,8 @@
* questions.
*/
-#include "gc/shared/gcLogPrecious.hpp"
#include "gc/shared/gc_globals.hpp"
+#include "gc/shared/gcLogPrecious.hpp"
#include "gc/z/zAddress.inline.hpp"
#include "gc/z/zGlobals.hpp"
#include "runtime/globals.hpp"
@@ -92,7 +92,7 @@ size_t ZPlatformAddressOffsetBits() {
static const size_t valid_max_address_offset_bits = probe_valid_max_address_bit() + 1;
const size_t max_address_offset_bits = valid_max_address_offset_bits - 3;
const size_t min_address_offset_bits = max_address_offset_bits - 2;
- const size_t address_offset = round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
+ const size_t address_offset = ZGlobalsPointers::min_address_offset_request();
const size_t address_offset_bits = log2i_exact(address_offset);
return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
}
diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc.hpp b/src/hotspot/cpu/ppc/interp_masm_ppc.hpp
index 7277ac3bc1a0f..99ac037e4b7cb 100644
--- a/src/hotspot/cpu/ppc/interp_masm_ppc.hpp
+++ b/src/hotspot/cpu/ppc/interp_masm_ppc.hpp
@@ -265,7 +265,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
// Debugging
void verify_oop(Register reg, TosState state = atos); // only if +VerifyOops && state == atos
void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
- void verify_FPU(int stack_depth, TosState state = ftos);
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
index 000e3cdf2d9c1..b51a0739d63ed 100644
--- a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
@@ -958,17 +958,18 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
// markWord displaced_header = obj->mark().set_unlocked();
- if (DiagnoseSyncOnValueBasedClasses != 0) {
- load_klass(tmp, object);
- lbz(tmp, in_bytes(Klass::misc_flags_offset()), tmp);
- testbitdi(CR0, R0, tmp, exact_log2(KlassFlags::_misc_is_value_based_class));
- bne(CR0, slow_case);
- }
-
if (LockingMode == LM_LIGHTWEIGHT) {
lightweight_lock(monitor, object, header, tmp, slow_case);
b(done);
} else if (LockingMode == LM_LEGACY) {
+
+ if (DiagnoseSyncOnValueBasedClasses != 0) {
+ load_klass(tmp, object);
+ lbz(tmp, in_bytes(Klass::misc_flags_offset()), tmp);
+ testbitdi(CR0, R0, tmp, exact_log2(KlassFlags::_misc_is_value_based_class));
+ bne(CR0, slow_case);
+ }
+
// Load markWord from object into header.
ld(header, oopDesc::mark_offset_in_bytes(), object);
@@ -2381,12 +2382,6 @@ static bool verify_return_address(Method* m, int bci) {
return false;
}
-void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
- if (VerifyFPU) {
- unimplemented("verfiyFPU");
- }
-}
-
void InterpreterMacroAssembler::verify_oop_or_return_address(Register reg, Register Rtmp) {
if (!VerifyOops) return;
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
index 1267fa0e5166e..ca0a1344d143c 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
@@ -1284,13 +1284,7 @@ int MacroAssembler::ic_check(int end_alignment) {
if (use_trap_based_null_check) {
trap_null_check(receiver);
}
- if (UseCompactObjectHeaders) {
- load_narrow_klass_compact(tmp1, receiver);
- } else if (UseCompressedClassPointers) {
- lwz(tmp1, oopDesc::klass_offset_in_bytes(), receiver);
- } else {
- ld(tmp1, oopDesc::klass_offset_in_bytes(), receiver);
- }
+ load_klass_no_decode(tmp1, receiver); // 2 instructions with UseCompactObjectHeaders
ld(tmp2, in_bytes(CompiledICData::speculated_klass_offset()), data);
trap_ic_miss_check(tmp1, tmp2);
@@ -1306,11 +1300,7 @@ int MacroAssembler::ic_check(int end_alignment) {
cmpdi(CR0, receiver, 0);
beqctr(CR0);
}
- if (UseCompressedClassPointers) {
- lwz(tmp1, oopDesc::klass_offset_in_bytes(), receiver);
- } else {
- ld(tmp1, oopDesc::klass_offset_in_bytes(), receiver);
- }
+ load_klass_no_decode(tmp1, receiver); // 2 instructions with UseCompactObjectHeaders
ld(tmp2, in_bytes(CompiledICData::speculated_klass_offset()), data);
cmpd(CR0, tmp1, tmp2);
bnectr(CR0);
@@ -1347,7 +1337,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
// Get oop result if there is one and reset the value in the thread.
if (oop_result->is_valid()) {
- get_vm_result(oop_result);
+ get_vm_result_oop(oop_result);
}
_last_calls_return_pc = return_pc;
@@ -2265,27 +2255,28 @@ void MacroAssembler::check_klass_subtype(Register sub_klass,
// generic (count must be >0)
// iff found: CR0 eq, scratch == 0
void MacroAssembler::repne_scan(Register addr, Register value, Register count, Register scratch) {
- Label Lloop, Lexit;
-
-#ifdef ASSERT
- {
- Label ok;
- cmpdi(CR0, count, 0);
- bgt(CR0, ok);
- stop("count must be positive");
- bind(ok);
- }
-#endif
+ Label Lloop, Lafter_loop, Lexit;
- mtctr(count);
+ srdi_(scratch, count, 1);
+ beq(CR0, Lafter_loop);
+ mtctr(scratch);
- bind(Lloop);
- ld(scratch, 0 , addr);
+ bind(Lloop); // 2x unrolled
+ ld(scratch, 0, addr);
+ xor_(scratch, scratch, value);
+ beq(CR0, Lexit);
+ ld(scratch, 8, addr);
xor_(scratch, scratch, value);
beq(CR0, Lexit);
- addi(addr, addr, wordSize);
+ addi(addr, addr, 2 * wordSize);
bdnz(Lloop);
+ bind(Lafter_loop);
+ andi_(scratch, count, 1);
+ beq(CR0, Lexit); // if taken: CR0 eq and scratch == 0
+ ld(scratch, 0, addr);
+ xor_(scratch, scratch, value);
+
bind(Lexit);
}
@@ -2957,10 +2948,8 @@ void MacroAssembler::compiler_fast_unlock_object(ConditionRegister flag, Registe
// StoreLoad achieves this.
membar(StoreLoad);
- // Check if the entry lists are empty (EntryList first - by convention).
- ld(temp, in_bytes(ObjectMonitor::EntryList_offset()), current_header);
- ld(displaced_header, in_bytes(ObjectMonitor::cxq_offset()), current_header);
- orr(temp, temp, displaced_header); // Will be 0 if both are 0.
+ // Check if the entry_list is empty.
+ ld(temp, in_bytes(ObjectMonitor::entry_list_offset()), current_header);
cmpdi(flag, temp, 0);
beq(flag, success); // If so we are done.
@@ -3011,7 +3000,7 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
Label slow_path;
if (UseObjectMonitorTable) {
- // Clear cache in case fast locking succeeds.
+ // Clear cache in case fast locking succeeds or we need to take the slow-path.
li(tmp1, 0);
std(tmp1, in_bytes(BasicObjectLock::lock_offset()) + BasicLock::object_monitor_cache_offset_in_bytes(), box);
}
@@ -3298,8 +3287,6 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
bind(not_recursive);
- const Register t2 = tmp2;
-
// Set owner to null.
// Release to satisfy the JMM
release();
@@ -3309,10 +3296,8 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
// StoreLoad achieves this.
membar(StoreLoad);
- // Check if the entry lists are empty (EntryList first - by convention).
- ld(t, in_bytes(ObjectMonitor::EntryList_offset()), monitor);
- ld(t2, in_bytes(ObjectMonitor::cxq_offset()), monitor);
- orr(t, t, t2);
+ // Check if the entry_list is empty.
+ ld(t, in_bytes(ObjectMonitor::entry_list_offset()), monitor);
cmpdi(CR0, t, 0);
beq(CR0, unlocked); // If so we are done.
@@ -3440,34 +3425,34 @@ void MacroAssembler::set_top_ijava_frame_at_SP_as_last_Java_frame(Register sp, R
set_last_Java_frame(/*sp=*/sp, /*pc=*/tmp1);
}
-void MacroAssembler::get_vm_result(Register oop_result) {
+void MacroAssembler::get_vm_result_oop(Register oop_result) {
// Read:
// R16_thread
- // R16_thread->in_bytes(JavaThread::vm_result_offset())
+ // R16_thread->in_bytes(JavaThread::vm_result_oop_offset())
//
// Updated:
// oop_result
- // R16_thread->in_bytes(JavaThread::vm_result_offset())
+ // R16_thread->in_bytes(JavaThread::vm_result_oop_offset())
- ld(oop_result, in_bytes(JavaThread::vm_result_offset()), R16_thread);
+ ld(oop_result, in_bytes(JavaThread::vm_result_oop_offset()), R16_thread);
li(R0, 0);
- std(R0, in_bytes(JavaThread::vm_result_offset()), R16_thread);
+ std(R0, in_bytes(JavaThread::vm_result_oop_offset()), R16_thread);
verify_oop(oop_result, FILE_AND_LINE);
}
-void MacroAssembler::get_vm_result_2(Register metadata_result) {
+void MacroAssembler::get_vm_result_metadata(Register metadata_result) {
// Read:
// R16_thread
- // R16_thread->in_bytes(JavaThread::vm_result_2_offset())
+ // R16_thread->in_bytes(JavaThread::vm_result_metadata_offset())
//
// Updated:
// metadata_result
- // R16_thread->in_bytes(JavaThread::vm_result_2_offset())
+ // R16_thread->in_bytes(JavaThread::vm_result_metadata_offset())
- ld(metadata_result, in_bytes(JavaThread::vm_result_2_offset()), R16_thread);
+ ld(metadata_result, in_bytes(JavaThread::vm_result_metadata_offset()), R16_thread);
li(R0, 0);
- std(R0, in_bytes(JavaThread::vm_result_2_offset()), R16_thread);
+ std(R0, in_bytes(JavaThread::vm_result_metadata_offset()), R16_thread);
}
Register MacroAssembler::encode_klass_not_null(Register dst, Register src) {
@@ -3541,18 +3526,23 @@ void MacroAssembler::decode_klass_not_null(Register dst, Register src) {
}
}
-void MacroAssembler::load_klass(Register dst, Register src) {
+void MacroAssembler::load_klass_no_decode(Register dst, Register src) {
if (UseCompactObjectHeaders) {
load_narrow_klass_compact(dst, src);
- decode_klass_not_null(dst);
} else if (UseCompressedClassPointers) {
lwz(dst, oopDesc::klass_offset_in_bytes(), src);
- decode_klass_not_null(dst);
} else {
ld(dst, oopDesc::klass_offset_in_bytes(), src);
}
}
+void MacroAssembler::load_klass(Register dst, Register src) {
+ load_klass_no_decode(dst, src);
+ if (UseCompressedClassPointers) { // also true for UseCompactObjectHeaders
+ decode_klass_not_null(dst);
+ }
+}
+
// Loads the obj's Klass* into dst.
// Preserves all registers (incl src, rscratch1 and rscratch2).
// Input:
@@ -5009,19 +4999,27 @@ void MacroAssembler::atomically_flip_locked_state(bool is_unlock, Register obj,
// - t1, t2: temporary register
void MacroAssembler::lightweight_lock(Register box, Register obj, Register t1, Register t2, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
- assert_different_registers(box, obj, t1, t2);
+ assert_different_registers(box, obj, t1, t2, R0);
Label push;
- const Register top = t1;
- const Register mark = t2;
const Register t = R0;
if (UseObjectMonitorTable) {
- // Clear cache in case fast locking succeeds.
+ // Clear cache in case fast locking succeeds or we need to take the slow-path.
li(t, 0);
std(t, in_bytes(BasicObjectLock::lock_offset()) + BasicLock::object_monitor_cache_offset_in_bytes(), box);
}
+ if (DiagnoseSyncOnValueBasedClasses != 0) {
+ load_klass(t1, obj);
+ lbz(t1, in_bytes(Klass::misc_flags_offset()), t1);
+ testbitdi(CR0, R0, t1, exact_log2(KlassFlags::_misc_is_value_based_class));
+ bne(CR0, slow);
+ }
+
+ const Register top = t1;
+ const Register mark = t2;
+
// Check if the lock-stack is full.
lwz(top, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
cmplwi(CR0, top, LockStack::end_offset());
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
index 69570517866d6..7e2925ace26c8 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
@@ -745,8 +745,8 @@ class MacroAssembler: public Assembler {
void set_top_ijava_frame_at_SP_as_last_Java_frame(Register sp, Register tmp1, Label* jpc = nullptr);
// Read vm result from thread: oop_result = R16_thread->result;
- void get_vm_result (Register oop_result);
- void get_vm_result_2(Register metadata_result);
+ void get_vm_result_oop(Register oop_result);
+ void get_vm_result_metadata(Register metadata_result);
static bool needs_explicit_null_check(intptr_t offset);
static bool uses_implicit_null_check(void* address);
@@ -802,6 +802,7 @@ class MacroAssembler: public Assembler {
inline void decode_heap_oop(Register d);
// Load/Store klass oop from klass field. Compress.
+ void load_klass_no_decode(Register dst, Register src);
void load_klass(Register dst, Register src);
void load_narrow_klass_compact(Register dst, Register src);
void cmp_klass(ConditionRegister dst, Register obj, Register klass, Register tmp, Register tmp2);
diff --git a/src/hotspot/cpu/ppc/matcher_ppc.hpp b/src/hotspot/cpu/ppc/matcher_ppc.hpp
index 441339b94c61b..666bec9e0c802 100644
--- a/src/hotspot/cpu/ppc/matcher_ppc.hpp
+++ b/src/hotspot/cpu/ppc/matcher_ppc.hpp
@@ -115,9 +115,6 @@
// Java calling convention forces doubles to be aligned.
static const bool misaligned_doubles_ok = true;
- // Advertise here if the CPU requires explicit rounding operations to implement strictfp mode.
- static const bool strict_fp_requires_explicit_rounding = false;
-
// Do floats take an entire double register or just half?
//
// A float occupies a ppc64 double register. For the allocator, a
diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad
index 2504c613d7855..07d681e89823e 100644
--- a/src/hotspot/cpu/ppc/ppc.ad
+++ b/src/hotspot/cpu/ppc/ppc.ad
@@ -2108,7 +2108,12 @@ bool Matcher::match_rule_supported(int opcode) {
case Op_RoundDoubleModeV:
return SuperwordUseVSX;
case Op_PopCountVI:
+ case Op_PopCountVL:
return (SuperwordUseVSX && UsePopCountInstruction);
+ case Op_CountLeadingZerosV:
+ return SuperwordUseVSX && UseCountLeadingZerosInstructionsPPC64;
+ case Op_CountTrailingZerosV:
+ return SuperwordUseVSX && UseCountTrailingZerosInstructionsPPC64;
case Op_FmaF:
case Op_FmaD:
return UseFMA;
@@ -9532,28 +9537,6 @@ instruct sqrtF_reg(regF dst, regF src) %{
ins_pipe(pipe_class_default);
%}
-instruct roundDouble_nop(regD dst) %{
- match(Set dst (RoundDouble dst));
- ins_cost(0);
-
- format %{ " -- \t// RoundDouble not needed - empty" %}
- size(0);
- // PPC results are already "rounded" (i.e., normal-format IEEE).
- ins_encode( /*empty*/ );
- ins_pipe(pipe_class_default);
-%}
-
-instruct roundFloat_nop(regF dst) %{
- match(Set dst (RoundFloat dst));
- ins_cost(0);
-
- format %{ " -- \t// RoundFloat not needed - empty" %}
- size(0);
- // PPC results are already "rounded" (i.e., normal-format IEEE).
- ins_encode( /*empty*/ );
- ins_pipe(pipe_class_default);
-%}
-
// Multiply-Accumulate
// src1 * src2 + src3
@@ -14077,10 +14060,11 @@ instruct vsqrt2D_reg(vecX dst, vecX src) %{
ins_pipe(pipe_class_default);
%}
-// Vector Population Count Instructions
+// Vector Population Count and Zeros Count Instructions
instruct vpopcnt_reg(vecX dst, vecX src) %{
match(Set dst (PopCountVI src));
+ match(Set dst (PopCountVL src));
format %{ "VPOPCNT $dst,$src\t// pop count packed" %}
size(4);
ins_encode %{
@@ -14105,6 +14089,58 @@ instruct vpopcnt_reg(vecX dst, vecX src) %{
ins_pipe(pipe_class_default);
%}
+instruct vcount_leading_zeros_reg(vecX dst, vecX src) %{
+ match(Set dst (CountLeadingZerosV src));
+ format %{ "VCLZ $dst,$src\t// leading zeros count packed" %}
+ size(4);
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ switch (bt) {
+ case T_BYTE:
+ __ vclzb($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ case T_SHORT:
+ __ vclzh($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ case T_INT:
+ __ vclzw($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ case T_LONG:
+ __ vclzd($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ %}
+ ins_pipe(pipe_class_default);
+%}
+
+instruct vcount_trailing_zeros_reg(vecX dst, vecX src) %{
+ match(Set dst (CountTrailingZerosV src));
+ format %{ "VCTZ $dst,$src\t// trailing zeros count packed" %}
+ size(4);
+ ins_encode %{
+ BasicType bt = Matcher::vector_element_basic_type(this);
+ switch (bt) {
+ case T_BYTE:
+ __ vctzb($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ case T_SHORT:
+ __ vctzh($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ case T_INT:
+ __ vctzw($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ case T_LONG:
+ __ vctzd($dst$$VectorSRegister->to_vr(), $src$$VectorSRegister->to_vr());
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ %}
+ ins_pipe(pipe_class_default);
+%}
+
// --------------------------------- FMA --------------------------------------
// src1 * src2 + dst
instruct vfma4F(vecX dst, vecX src1, vecX src2) %{
@@ -14663,7 +14699,8 @@ instruct ShouldNotReachHere() %{
format %{ "ShouldNotReachHere" %}
ins_encode %{
if (is_reachable()) {
- __ stop(_halt_reason);
+ const char* str = __ code_string(_halt_reason);
+ __ stop(str);
}
%}
ins_pipe(pipe_class_default);
diff --git a/src/hotspot/cpu/ppc/runtime_ppc.cpp b/src/hotspot/cpu/ppc/runtime_ppc.cpp
index c5990e01e0df4..6d9a1dfcb1ea8 100644
--- a/src/hotspot/cpu/ppc/runtime_ppc.cpp
+++ b/src/hotspot/cpu/ppc/runtime_ppc.cpp
@@ -67,11 +67,15 @@
//
// Note: the exception pc MUST be at a call (precise debug information)
//
-void OptoRuntime::generate_exception_blob() {
+ExceptionBlob* OptoRuntime::generate_exception_blob() {
// Allocate space for the code.
ResourceMark rm;
// Setup code generation tools.
- CodeBuffer buffer("exception_blob", 2048, 1024);
+ const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
+ CodeBuffer buffer(name, 2048, 1024);
+ if (buffer.blob() == nullptr) {
+ return nullptr;
+ }
InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);
address start = __ pc();
@@ -142,7 +146,7 @@ void OptoRuntime::generate_exception_blob() {
masm->flush();
// Set exception blob.
- _exception_blob = ExceptionBlob::create(&buffer, oop_maps,
+ return ExceptionBlob::create(&buffer, oop_maps,
frame_size_in_bytes/wordSize);
}
diff --git a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
index f7e1410d10fa5..5a33a14f79e0b 100644
--- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
+++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
@@ -1143,12 +1143,12 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
__ bctr();
}
-AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
- int total_args_passed,
- int comp_args_on_stack,
- const BasicType *sig_bt,
- const VMRegPair *regs,
- AdapterFingerPrint* fingerprint) {
+void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
+ int total_args_passed,
+ int comp_args_on_stack,
+ const BasicType *sig_bt,
+ const VMRegPair *regs,
+ AdapterHandlerEntry* handler) {
address i2c_entry;
address c2i_unverified_entry;
address c2i_entry;
@@ -1223,8 +1223,8 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, call_interpreter, ientry);
- return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry,
- c2i_no_clinit_check_entry);
+ handler->set_entry_points(i2c_entry, c2i_entry, c2i_unverified_entry, c2i_no_clinit_check_entry);
+ return;
}
// An oop arg. Must pass a handle not the oop itself.
@@ -3100,11 +3100,15 @@ void SharedRuntime::generate_deopt_blob() {
}
#ifdef COMPILER2
-void OptoRuntime::generate_uncommon_trap_blob() {
+UncommonTrapBlob* OptoRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code.
ResourceMark rm;
// Setup code generation tools.
- CodeBuffer buffer("uncommon_trap_blob", 2048, 1024);
+ const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
+ CodeBuffer buffer(name, 2048, 1024);
+ if (buffer.blob() == nullptr) {
+ return nullptr;
+ }
InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);
address start = __ pc();
@@ -3227,7 +3231,7 @@ void OptoRuntime::generate_uncommon_trap_blob() {
masm->flush();
- _uncommon_trap_blob = UncommonTrapBlob::create(&buffer, oop_maps, frame_size_in_bytes/wordSize);
+ return UncommonTrapBlob::create(&buffer, oop_maps, frame_size_in_bytes/wordSize);
}
#endif // COMPILER2
@@ -3403,7 +3407,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
RegisterSaver::restore_live_registers_and_pop_frame(masm, frame_size_in_bytes, /*restore_ctr*/ false);
// Get the returned method.
- __ get_vm_result_2(R19_method);
+ __ get_vm_result_metadata(R19_method);
__ bctr();
@@ -3417,7 +3421,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
__ li(R11_scratch1, 0);
__ ld(R3_ARG1, thread_(pending_exception));
- __ std(R11_scratch1, in_bytes(JavaThread::vm_result_offset()), R16_thread);
+ __ std(R11_scratch1, in_bytes(JavaThread::vm_result_oop_offset()), R16_thread);
__ b64_patchable(StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type);
// -------------
diff --git a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
index 2bdff4c099520..4a0ced42ed4e8 100644
--- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
+++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
@@ -546,6 +546,177 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
+ // Computes the Galois/Counter Mode (GCM) product and reduction.
+ //
+ // This function performs polynomial multiplication of the subkey H with
+ // the current GHASH state using vectorized polynomial multiplication (`vpmsumd`).
+ // The subkey H is divided into lower, middle, and higher halves.
+ // The multiplication results are reduced using `vConstC2` to stay within GF(2^128).
+ // The final computed value is stored back into `vState`.
+ static void computeGCMProduct(MacroAssembler* _masm,
+ VectorRegister vLowerH, VectorRegister vH, VectorRegister vHigherH,
+ VectorRegister vConstC2, VectorRegister vZero, VectorRegister vState,
+ VectorRegister vLowProduct, VectorRegister vMidProduct, VectorRegister vHighProduct,
+ VectorRegister vReducedLow, VectorRegister vTmp8, VectorRegister vTmp9,
+ VectorRegister vCombinedResult, VectorRegister vSwappedH) {
+ __ vxor(vH, vH, vState);
+ __ vpmsumd(vLowProduct, vLowerH, vH); // L : Lower Half of subkey H
+ __ vpmsumd(vMidProduct, vSwappedH, vH); // M : Combined halves of subkey H
+ __ vpmsumd(vHighProduct, vHigherH, vH); // H : Higher Half of subkey H
+ __ vpmsumd(vReducedLow, vLowProduct, vConstC2); // Reduction
+ __ vsldoi(vTmp8, vMidProduct, vZero, 8); // mL : Extract the lower 64 bits of M
+ __ vsldoi(vTmp9, vZero, vMidProduct, 8); // mH : Extract the higher 64 bits of M
+ __ vxor(vLowProduct, vLowProduct, vTmp8); // LL + mL : Partial result for lower half
+ __ vxor(vHighProduct, vHighProduct, vTmp9); // HH + mH : Partial result for upper half
+ __ vsldoi(vLowProduct, vLowProduct, vLowProduct, 8); // Swap
+ __ vxor(vLowProduct, vLowProduct, vReducedLow);
+ __ vsldoi(vCombinedResult, vLowProduct, vLowProduct, 8); // Swap
+ __ vpmsumd(vLowProduct, vLowProduct, vConstC2); // Reduction using constant
+ __ vxor(vCombinedResult, vCombinedResult, vHighProduct); // Combine reduced Low & High products
+ __ vxor(vState, vLowProduct, vCombinedResult);
+ }
+
+ // Generate stub for ghash process blocks.
+ //
+ // Arguments for generated stub:
+ // state: R3_ARG1 (long[] state)
+ // subkeyH: R4_ARG2 (long[] subH)
+ // data: R5_ARG3 (byte[] data)
+ // blocks: R6_ARG4 (number of 16-byte blocks to process)
+ //
+ // The polynomials are processed in bit-reflected order for efficiency reasons.
+ // This optimization leverages the structure of the Galois field arithmetic
+ // to minimize the number of bit manipulations required during multiplication.
+ // For an explanation of how this works, refer :
+ // Vinodh Gopal, Erdinc Ozturk, Wajdi Feghali, Jim Guilford, Gil Wolrich,
+ // Martin Dixon. "Optimized Galois-Counter-Mode Implementation on Intel®
+ // Architecture Processor"
+ // http://web.archive.org/web/20130609111954/http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/communications-ia-galois-counter-mode-paper.pdf
+ //
+ //
+ address generate_ghash_processBlocks() {
+ StubCodeMark mark(this, "StubRoutines", "ghash");
+ address start = __ function_entry();
+
+ // Registers for parameters
+ Register state = R3_ARG1; // long[] state
+ Register subkeyH = R4_ARG2; // long[] subH
+ Register data = R5_ARG3; // byte[] data
+ Register blocks = R6_ARG4;
+ Register temp1 = R8;
+ // Vector Registers
+ VectorRegister vZero = VR0;
+ VectorRegister vH = VR1;
+ VectorRegister vLowerH = VR2;
+ VectorRegister vHigherH = VR3;
+ VectorRegister vLowProduct = VR4;
+ VectorRegister vMidProduct = VR5;
+ VectorRegister vHighProduct = VR6;
+ VectorRegister vReducedLow = VR7;
+ VectorRegister vTmp8 = VR8;
+ VectorRegister vTmp9 = VR9;
+ VectorRegister vTmp10 = VR10;
+ VectorRegister vSwappedH = VR11;
+ VectorRegister vTmp12 = VR12;
+ VectorRegister loadOrder = VR13;
+ VectorRegister vHigh = VR14;
+ VectorRegister vLow = VR15;
+ VectorRegister vState = VR16;
+ VectorRegister vPerm = VR17;
+ VectorRegister vCombinedResult = VR18;
+ VectorRegister vConstC2 = VR19;
+
+ __ li(temp1, 0xc2);
+ __ sldi(temp1, temp1, 56);
+ __ vspltisb(vZero, 0);
+ __ mtvrd(vConstC2, temp1);
+ __ lxvd2x(vH->to_vsr(), subkeyH);
+ __ lxvd2x(vState->to_vsr(), state);
+ // Operations to obtain lower and higher bytes of subkey H.
+ __ vspltisb(vReducedLow, 1);
+ __ vspltisb(vTmp10, 7);
+ __ vsldoi(vTmp8, vZero, vReducedLow, 1); // 0x1
+ __ vor(vTmp8, vConstC2, vTmp8); // 0xC2...1
+ __ vsplt(vTmp9, 0, vH); // MSB of H
+ __ vsl(vH, vH, vReducedLow); // Carry = H<<7
+ __ vsrab(vTmp9, vTmp9, vTmp10);
+ __ vand(vTmp9, vTmp9, vTmp8); // Carry
+ __ vxor(vTmp10, vH, vTmp9);
+ __ vsldoi(vConstC2, vZero, vConstC2, 8);
+ __ vsldoi(vSwappedH, vTmp10, vTmp10, 8); // swap Lower and Higher Halves of subkey H
+ __ vsldoi(vLowerH, vZero, vSwappedH, 8); // H.L
+ __ vsldoi(vHigherH, vSwappedH, vZero, 8); // H.H
+#ifdef ASSERT
+ __ cmpwi(CR0, blocks, 0); // Compare 'blocks' (R6_ARG4) with zero
+ __ asm_assert_ne("blocks should NOT be zero");
+#endif
+ __ clrldi(blocks, blocks, 32);
+ __ mtctr(blocks);
+ __ lvsl(loadOrder, temp1);
+#ifdef VM_LITTLE_ENDIAN
+ __ vspltisb(vTmp12, 0xf);
+ __ vxor(loadOrder, loadOrder, vTmp12);
+#define LE_swap_bytes(x) __ vec_perm(x, x, x, loadOrder)
+#else
+#define LE_swap_bytes(x)
+#endif
+
+ // This code performs Karatsuba multiplication in Galois fields to compute the GHASH operation.
+ //
+ // The Karatsuba method breaks the multiplication of two 128-bit numbers into smaller parts,
+ // performing three 128-bit multiplications and combining the results efficiently.
+ //
+ // (C1:C0) = A1*B1, (D1:D0) = A0*B0, (E1:E0) = (A0+A1)(B0+B1)
+ // (A1:A0)(B1:B0) = C1:(C0+C1+D1+E1):(D1+C0+D0+E0):D0
+ //
+ // Inputs:
+ // - vH: The data vector (state), containing both B0 (lower half) and B1 (higher half).
+ // - vLowerH: Lower half of the subkey H (A0).
+ // - vHigherH: Higher half of the subkey H (A1).
+ // - vConstC2: Constant used for reduction (for final processing).
+ //
+ // References:
+ // Shay Gueron, Michael E. Kounavis.
+ // "Intel® Carry-Less Multiplication Instruction and its Usage for Computing the GCM Mode"
+ // https://web.archive.org/web/20110609115824/https://software.intel.com/file/24918
+ //
+ Label L_aligned_loop, L_store, L_unaligned_loop, L_initialize_unaligned_loop;
+ __ andi(temp1, data, 15);
+ __ cmpwi(CR0, temp1, 0);
+ __ bne(CR0, L_initialize_unaligned_loop);
+
+ __ bind(L_aligned_loop);
+ __ lvx(vH, temp1, data);
+ LE_swap_bytes(vH);
+ computeGCMProduct(_masm, vLowerH, vH, vHigherH, vConstC2, vZero, vState,
+ vLowProduct, vMidProduct, vHighProduct, vReducedLow, vTmp8, vTmp9, vCombinedResult, vSwappedH);
+ __ addi(data, data, 16);
+ __ bdnz(L_aligned_loop);
+ __ b(L_store);
+
+ __ bind(L_initialize_unaligned_loop);
+ __ li(temp1, 0);
+ __ lvsl(vPerm, temp1, data);
+ __ lvx(vHigh, temp1, data);
+#ifdef VM_LITTLE_ENDIAN
+ __ vspltisb(vTmp12, -1);
+ __ vxor(vPerm, vPerm, vTmp12);
+#endif
+ __ bind(L_unaligned_loop);
+ __ addi(data, data, 16);
+ __ lvx(vLow, temp1, data);
+ __ vec_perm(vH, vHigh, vLow, vPerm);
+ computeGCMProduct(_masm, vLowerH, vH, vHigherH, vConstC2, vZero, vState,
+ vLowProduct, vMidProduct, vHighProduct, vReducedLow, vTmp8, vTmp9, vCombinedResult, vSwappedH);
+ __ vmr(vHigh, vLow);
+ __ bdnz(L_unaligned_loop);
+
+ __ bind(L_store);
+ __ stxvd2x(vState->to_vsr(), state);
+ __ blr();
+
+ return start;
+ }
// -XX:+OptimizeFill : convert fill/copy loops into intrinsic
//
// The code is implemented(ported from sparc) as we believe it benefits JVM98, however
@@ -2383,6 +2554,105 @@ class StubGenerator: public StubCodeGenerator {
}
+ // Helper for generate_unsafe_setmemory
+ //
+ // Atomically fill an array of memory using 1-, 2-, 4-, or 8-byte chunks and return.
+ static void do_setmemory_atomic_loop(int elem_size, Register dest, Register size, Register byteVal,
+ MacroAssembler *_masm) {
+
+ Label L_Loop, L_Tail; // 2x unrolled loop
+
+ // Propagate byte to required width
+ if (elem_size > 1) __ rldimi(byteVal, byteVal, 8, 64 - 2 * 8);
+ if (elem_size > 2) __ rldimi(byteVal, byteVal, 16, 64 - 2 * 16);
+ if (elem_size > 4) __ rldimi(byteVal, byteVal, 32, 64 - 2 * 32);
+
+ __ srwi_(R0, size, exact_log2(2 * elem_size)); // size is a 32 bit value
+ __ beq(CR0, L_Tail);
+ __ mtctr(R0);
+
+ __ align(32); // loop alignment
+ __ bind(L_Loop);
+ __ store_sized_value(byteVal, 0, dest, elem_size);
+ __ store_sized_value(byteVal, elem_size, dest, elem_size);
+ __ addi(dest, dest, 2 * elem_size);
+ __ bdnz(L_Loop);
+
+ __ bind(L_Tail);
+ __ andi_(R0, size, elem_size);
+ __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CR0, Assembler::equal), Assembler::bhintbhBCLRisReturn);
+ __ store_sized_value(byteVal, 0, dest, elem_size);
+ __ blr();
+ }
+
+ //
+ // Generate 'unsafe' set memory stub
+ // Though just as safe as the other stubs, it takes an unscaled
+ // size_t (# bytes) argument instead of an element count.
+ //
+ // Input:
+ // R3_ARG1 - destination array address
+ // R4_ARG2 - byte count (size_t)
+ // R5_ARG3 - byte value
+ //
+ address generate_unsafe_setmemory(address unsafe_byte_fill) {
+ __ align(CodeEntryAlignment);
+ StubCodeMark mark(this, StubGenStubId::unsafe_setmemory_id);
+ address start = __ function_entry();
+
+ // bump this on entry, not on exit:
+ // inc_counter_np(SharedRuntime::_unsafe_set_memory_ctr);
+
+ {
+ Label L_fill8Bytes, L_fill4Bytes, L_fillBytes;
+
+ const Register dest = R3_ARG1;
+ const Register size = R4_ARG2;
+ const Register byteVal = R5_ARG3;
+ const Register rScratch1 = R6;
+
+ // fill_to_memory_atomic(unsigned char*, unsigned long, unsigned char)
+
+ // Check for pointer & size alignment
+ __ orr(rScratch1, dest, size);
+
+ __ andi_(R0, rScratch1, 7);
+ __ beq(CR0, L_fill8Bytes);
+
+ __ andi_(R0, rScratch1, 3);
+ __ beq(CR0, L_fill4Bytes);
+
+ __ andi_(R0, rScratch1, 1);
+ __ bne(CR0, L_fillBytes);
+
+ // Mark remaining code as such which performs Unsafe accesses.
+ UnsafeMemoryAccessMark umam(this, true, false);
+
+ // At this point, we know the lower bit of size is zero and a
+ // multiple of 2
+ do_setmemory_atomic_loop(2, dest, size, byteVal, _masm);
+
+ __ align(32);
+ __ bind(L_fill8Bytes);
+ // At this point, we know the lower 3 bits of size are zero and a
+ // multiple of 8
+ do_setmemory_atomic_loop(8, dest, size, byteVal, _masm);
+
+ __ align(32);
+ __ bind(L_fill4Bytes);
+ // At this point, we know the lower 2 bits of size are zero and a
+ // multiple of 4
+ do_setmemory_atomic_loop(4, dest, size, byteVal, _masm);
+
+ __ align(32);
+ __ bind(L_fillBytes);
+ do_setmemory_atomic_loop(1, dest, size, byteVal, _masm);
+ }
+
+ return start;
+ }
+
+
//
// Generate generic array copy stubs
//
@@ -3207,6 +3477,7 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_arrayof_jshort_fill = generate_fill(StubGenStubId::arrayof_jshort_fill_id);
StubRoutines::_arrayof_jint_fill = generate_fill(StubGenStubId::arrayof_jint_fill_id);
}
+ StubRoutines::_unsafe_setmemory = generate_unsafe_setmemory(StubRoutines::_jbyte_fill);
#endif
}
@@ -4881,20 +5152,19 @@ void generate_lookup_secondary_supers_table_stub() {
StubRoutines::_verify_oop_subroutine_entry = generate_verify_oop();
// nmethod entry barriers for concurrent class unloading
- BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
- if (bs_nm != nullptr) {
- StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
- }
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
// arraycopy stubs used by compilers
generate_arraycopy_stubs();
+#ifdef COMPILER2
if (UseSecondarySupersTable) {
StubRoutines::_lookup_secondary_supers_table_slow_path_stub = generate_lookup_secondary_supers_table_slow_path_stub();
if (!InlineSecondarySupersTest) {
generate_lookup_secondary_supers_table_stub();
}
}
+#endif // COMPILER2
StubRoutines::_upcall_stub_exception_handler = generate_upcall_stub_exception_handler();
StubRoutines::_upcall_stub_load_target = generate_upcall_stub_load_target();
@@ -4929,6 +5199,10 @@ void generate_lookup_secondary_supers_table_stub() {
StubRoutines::_data_cache_writeback_sync = generate_data_cache_writeback_sync();
}
+ if (UseGHASHIntrinsics) {
+ StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks();
+ }
+
if (UseAESIntrinsics) {
StubRoutines::_aescrypt_encryptBlock = generate_aescrypt_encryptBlock();
StubRoutines::_aescrypt_decryptBlock = generate_aescrypt_decryptBlock();
diff --git a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
index 544de15d3f24a..a8f5dbda484d6 100644
--- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
+++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
@@ -1996,12 +1996,18 @@ address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(Abstract
return start;
}
-// Not supported
-address TemplateInterpreterGenerator::generate_currentThread() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Float_intBitsToFloat_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Float_floatToRawIntBits_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Double_longBitsToDouble_entry() { return nullptr; }
-address TemplateInterpreterGenerator::generate_Double_doubleToRawLongBits_entry() { return nullptr; }
+address TemplateInterpreterGenerator::generate_currentThread() {
+ address entry_point = __ pc();
+
+ __ ld(R3_RET, JavaThread::vthread_offset(), R16_thread);
+ __ resolve_oop_handle(R3_RET, R11_scratch1, R12_scratch2, MacroAssembler::PRESERVATION_FRAME_LR);
+
+ // restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted).
+ __ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0);
+ __ blr();
+
+ return entry_point;
+}
// =============================================================================
// Exceptions
@@ -2154,12 +2160,12 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
{
__ pop_ptr(Rexception);
__ verify_oop(Rexception);
- __ std(Rexception, in_bytes(JavaThread::vm_result_offset()), R16_thread);
+ __ std(Rexception, in_bytes(JavaThread::vm_result_oop_offset()), R16_thread);
__ unlock_if_synchronized_method(vtos, /* throw_monitor_exception */ false, true);
__ notify_method_exit(false, vtos, InterpreterMacroAssembler::SkipNotifyJVMTI, false);
- __ get_vm_result(Rexception);
+ __ get_vm_result_oop(Rexception);
// We are done with this activation frame; find out where to go next.
// The continuation point will be an exception handler, which expects
@@ -2316,11 +2322,11 @@ address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
// Support short-cut for TraceBytecodesAt.
// Don't call into the VM if we don't want to trace to speed up things.
Label Lskip_vm_call;
- if (TraceBytecodesAt > 0 && TraceBytecodesAt < max_intx) {
+ if (TraceBytecodesAt > 0) {
int offs1 = __ load_const_optimized(R11_scratch1, (address) &TraceBytecodesAt, R0, true);
int offs2 = __ load_const_optimized(R12_scratch2, (address) &BytecodeCounter::_counter_value, R0, true);
__ ld(R11_scratch1, offs1, R11_scratch1);
- __ lwa(R12_scratch2, offs2, R12_scratch2);
+ __ ld(R12_scratch2, offs2, R12_scratch2);
__ cmpd(CR0, R12_scratch2, R11_scratch1);
__ blt(CR0, Lskip_vm_call);
}
@@ -2334,7 +2340,7 @@ address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
__ mtlr(R31);
__ pop(state);
- if (TraceBytecodesAt > 0 && TraceBytecodesAt < max_intx) {
+ if (TraceBytecodesAt > 0) {
__ bind(Lskip_vm_call);
}
__ blr();
@@ -2344,9 +2350,9 @@ address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
void TemplateInterpreterGenerator::count_bytecode() {
int offs = __ load_const_optimized(R11_scratch1, (address) &BytecodeCounter::_counter_value, R12_scratch2, true);
- __ lwz(R12_scratch2, offs, R11_scratch1);
+ __ ld(R12_scratch2, offs, R11_scratch1);
__ addi(R12_scratch2, R12_scratch2, 1);
- __ stw(R12_scratch2, offs, R11_scratch1);
+ __ std(R12_scratch2, offs, R11_scratch1);
}
void TemplateInterpreterGenerator::histogram_bytecode(Template* t) {
@@ -2395,7 +2401,7 @@ void TemplateInterpreterGenerator::stop_interpreter_at() {
int offs1 = __ load_const_optimized(R11_scratch1, (address) &StopInterpreterAt, R0, true);
int offs2 = __ load_const_optimized(R12_scratch2, (address) &BytecodeCounter::_counter_value, R0, true);
__ ld(R11_scratch1, offs1, R11_scratch1);
- __ lwa(R12_scratch2, offs2, R12_scratch2);
+ __ ld(R12_scratch2, offs2, R12_scratch2);
__ cmpd(CR0, R12_scratch2, R11_scratch1);
__ bne(CR0, L);
__ illtrap();
diff --git a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
index 934bb1bd52918..8be6080e3d1c0 100644
--- a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
@@ -386,7 +386,7 @@ void TemplateTable::condy_helper(Label& Done) {
const Register rarg = R4_ARG2;
__ li(rarg, (int)bytecode());
call_VM(obj, CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc), rarg);
- __ get_vm_result_2(flags);
+ __ get_vm_result_metadata(flags);
// VMr = obj = base address to find primitive value to push
// VMr2 = flags = (tos, off) using format of CPCE::_flags
@@ -3964,7 +3964,7 @@ void TemplateTable::checkcast() {
// Call into the VM to "quicken" instanceof.
__ push_ptr(); // for GC
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
- __ get_vm_result_2(RspecifiedKlass);
+ __ get_vm_result_metadata(RspecifiedKlass);
__ pop_ptr(); // Restore receiver.
__ b(Lresolved);
@@ -4026,7 +4026,7 @@ void TemplateTable::instanceof() {
// Call into the VM to "quicken" instanceof.
__ push_ptr(); // for GC
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
- __ get_vm_result_2(RspecifiedKlass);
+ __ get_vm_result_metadata(RspecifiedKlass);
__ pop_ptr(); // Restore receiver.
__ b(Lresolved);
diff --git a/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp b/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp
index 872eee3b98e5a..5c7b0067c3afc 100644
--- a/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp
+++ b/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp
@@ -167,7 +167,6 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Symbol* signature,
#ifndef PRODUCT
LogTarget(Trace, foreign, upcall) lt;
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
arg_shuffle.print_on(&ls);
}
@@ -351,7 +350,6 @@ address UpcallLinker::make_upcall_stub(jobject receiver, Symbol* signature,
#ifndef PRODUCT
if (lt.is_enabled()) {
- ResourceMark rm;
LogStream ls(lt);
blob->print_on(&ls);
}
diff --git a/src/hotspot/cpu/ppc/vmStructs_ppc.hpp b/src/hotspot/cpu/ppc/vmStructs_ppc.hpp
index c1bdc1b1eb5d9..efe7fb9ad7bb3 100644
--- a/src/hotspot/cpu/ppc/vmStructs_ppc.hpp
+++ b/src/hotspot/cpu/ppc/vmStructs_ppc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -30,12 +30,12 @@
// constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp.
-#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field)
+#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field)
-#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
+#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type)
-#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant)
-#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant)
#endif // CPU_PPC_VMSTRUCTS_PPC_HPP
diff --git a/src/hotspot/cpu/ppc/vm_version_ppc.cpp b/src/hotspot/cpu/ppc/vm_version_ppc.cpp
index 8ec69bffe15ea..c8c53543d14ac 100644
--- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp
+++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp
@@ -219,7 +219,7 @@ void VM_Version::initialize() {
(has_brw() ? " brw" : "")
// Make sure number of %s matches num_features!
);
- _features_string = os::strdup(buf);
+ _cpu_info_string = os::strdup(buf);
if (Verbose) {
print_features();
}
@@ -308,8 +308,14 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
}
- if (UseGHASHIntrinsics) {
- warning("GHASH intrinsics are not available on this CPU");
+ if (VM_Version::has_vsx()) {
+ if (FLAG_IS_DEFAULT(UseGHASHIntrinsics)) {
+ UseGHASHIntrinsics = true;
+ }
+ } else if (UseGHASHIntrinsics) {
+ if (!FLAG_IS_DEFAULT(UseGHASHIntrinsics)) {
+ warning("GHASH intrinsics are not available on this CPU");
+ }
FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
}
@@ -519,7 +525,7 @@ void VM_Version::print_platform_virtualization_info(outputStream* st) {
}
void VM_Version::print_features() {
- tty->print_cr("Version: %s L1_data_cache_line_size=%d", features_string(), L1_data_cache_line_size());
+ tty->print_cr("Version: %s L1_data_cache_line_size=%d", cpu_info_string(), L1_data_cache_line_size());
if (Verbose) {
if (ContendedPaddingWidth > 0) {
@@ -726,6 +732,6 @@ void VM_Version::initialize_cpu_information(void) {
_no_of_threads = _no_of_cores;
_no_of_sockets = _no_of_cores;
snprintf(_cpu_name, CPU_TYPE_DESC_BUF_SIZE, "PowerPC POWER%lu", PowerArchitecturePPC64);
- snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "PPC %s", features_string());
+ snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "PPC %s", cpu_info_string());
_initialized = true;
}
diff --git a/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp b/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp
index 843a58e28d712..00a6877684af2 100644
--- a/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp
+++ b/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp
@@ -141,7 +141,8 @@ void AbstractInterpreter::layout_activation(Method* method,
#ifdef ASSERT
if (caller->is_interpreted_frame()) {
- assert(locals < caller->fp() + frame::interpreter_frame_initial_sp_offset, "bad placement");
+ assert(locals <= caller->interpreter_frame_expression_stack(), "bad placement");
+ assert(locals >= interpreter_frame->sender_sp() + max_locals - 1, "bad placement");
}
#endif
diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp
index 3a638357f0b37..63d5d4f3e613d 100644
--- a/src/hotspot/cpu/riscv/assembler_riscv.hpp
+++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp
@@ -371,7 +371,6 @@ class Assembler : public AbstractAssembler {
return -1;
}
-
static int zfa_zli_lookup_float(uint32_t value) {
switch(value) {
case 0xbf800000 : return 0;
@@ -411,8 +410,55 @@ class Assembler : public AbstractAssembler {
return -1;
}
+ static int zfa_zli_lookup_half_float(uint16_t value) {
+ switch(value) {
+ case 0xbc00 : return 0;
+ case 0x0400 : return 1;
+ case 0x0100 : return 2;
+ case 0x0200 : return 3;
+ case 0x1c00 : return 4;
+ case 0x2000 : return 5;
+ case 0x2c00 : return 6;
+ case 0x3000 : return 7;
+ case 0x3400 : return 8;
+ case 0x3500 : return 9;
+ case 0x3600 : return 10;
+ case 0x3700 : return 11;
+ case 0x3800 : return 12;
+ case 0x3900 : return 13;
+ case 0x3a00 : return 14;
+ case 0x3b00 : return 15;
+ case 0x3c00 : return 16;
+ case 0x3d00 : return 17;
+ case 0x3e00 : return 18;
+ case 0x3f00 : return 19;
+ case 0x4000 : return 20;
+ case 0x4100 : return 21;
+ case 0x4200 : return 22;
+ case 0x4400 : return 23;
+ case 0x4800 : return 24;
+ case 0x4c00 : return 25;
+ case 0x5800 : return 26;
+ case 0x5c00 : return 27;
+ case 0x7800 : return 28;
+ case 0x7c00 : return 29;
+ // case 0x7c00 : return 30; // redundant with 29
+ case 0x7e00 : return 31;
+ default: break;
+ }
+ return -1;
+ }
+
public:
+ static bool can_zfa_zli_half_float(jshort hf) {
+ if (!UseZfa || !UseZfh) {
+ return false;
+ }
+ uint16_t hf_bits = (uint16_t)hf;
+ return zfa_zli_lookup_half_float(hf_bits) != -1;
+ }
+
static bool can_zfa_zli_float(jfloat f) {
if (!UseZfa) {
return false;
@@ -769,7 +815,7 @@ class Assembler : public AbstractAssembler {
emit(insn);
}
- public:
+ protected:
enum barrier {
i = 0b1000, o = 0b0100, r = 0b0010, w = 0b0001,
@@ -800,6 +846,8 @@ class Assembler : public AbstractAssembler {
emit(insn);
}
+ public:
+
#define INSN(NAME, op, funct3, funct7) \
void NAME() { \
unsigned insn = 0; \
@@ -1316,6 +1364,7 @@ enum operand_size { int8, int16, int32, uint32, int64 };
public:
+ void flh(FloatRegister Rd, Register Rs, const int32_t offset) { fp_load<0b001>(Rd, Rs, offset); }
void flw(FloatRegister Rd, Register Rs, const int32_t offset) { fp_load<0b010>(Rd, Rs, offset); }
void _fld(FloatRegister Rd, Register Rs, const int32_t offset) { fp_load<0b011>(Rd, Rs, offset); }
@@ -1397,8 +1446,53 @@ enum operand_size { int8, int16, int32, uint32, int64 };
fp_base(Rd, Rs1, 0b00000, 0b000);
}
+ void fadd_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fsub_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fmul_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fdiv_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fsqrt_h(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fmin_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, Rs2, 0b000);
+ }
+
+ void fmax_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, Rs2, 0b001);
+ }
+
+ void fmadd_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ assert_cond(UseZfh);
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
// -------------- ZFA Instruction Definitions --------------
// Zfa Extension for Additional Floating-Point Instructions
+ void _fli_h(FloatRegister Rd, uint8_t Rs1) {
+ assert_cond(UseZfa && UseZfh);
+ fp_base(Rd, Rs1, 0b00001, 0b000);
+ }
+
void _fli_s(FloatRegister Rd, uint8_t Rs1) {
assert_cond(UseZfa);
fp_base(Rd, Rs1, 0b00001, 0b000);
@@ -1409,6 +1503,36 @@ enum operand_size { int8, int16, int32, uint32, int64 };
fp_base(Rd, Rs1, 0b00001, 0b000);
}
+ void fminm_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfa && UseZfh);
+ fp_base(Rd, Rs1, Rs2, 0b010);
+ }
+
+ void fmaxm_h(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfa && UseZfh);
+ fp_base