diff --git a/.github/actions/get-gtest/action.yml b/.github/actions/get-gtest/action.yml
index 5de2b10cd32..d38d33eabd8 100644
--- a/.github/actions/get-gtest/action.yml
+++ b/.github/actions/get-gtest/action.yml
@@ -49,6 +49,6 @@ runs:
- name: 'Export path to where GTest is installed'
id: path-name
run: |
- # Export the path
- echo 'path=gtest' >> $GITHUB_OUTPUT
+ # Export the absolute path
+ echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT
shell: bash
diff --git a/.github/actions/get-jtreg/action.yml b/.github/actions/get-jtreg/action.yml
index 78a3a4c9edd..4bb671d25d1 100644
--- a/.github/actions/get-jtreg/action.yml
+++ b/.github/actions/get-jtreg/action.yml
@@ -49,6 +49,6 @@ runs:
- name: 'Export path to where JTReg is installed'
id: path-name
run: |
- # Export the path
- echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
+ # Export the absolute path
+ echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT
shell: bash
diff --git a/.github/actions/upload-bundles/action.yml b/.github/actions/upload-bundles/action.yml
index 4e974ae58ba..30f4ac03c1e 100644
--- a/.github/actions/upload-bundles/action.yml
+++ b/.github/actions/upload-bundles/action.yml
@@ -32,6 +32,9 @@ inputs:
debug-suffix:
description: 'File name suffix denoting debug level, possibly empty'
required: false
+ bundle-suffix:
+ description: 'Bundle name suffix, possibly empty'
+ required: false
runs:
using: composite
@@ -75,7 +78,7 @@ runs:
- name: 'Upload bundles artifact'
uses: actions/upload-artifact@v4
with:
- name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
+ name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
path: bundles
retention-days: 1
if: steps.bundles.outputs.bundles-found == 'true'
diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml
index b1d4278f8b4..101668b2bd5 100644
--- a/.github/workflows/build-linux.yml
+++ b/.github/workflows/build-linux.yml
@@ -61,6 +61,9 @@ on:
make-arguments:
required: false
type: string
+ bundle-suffix:
+ required: false
+ type: string
jobs:
build-linux:
@@ -71,10 +74,6 @@ jobs:
fail-fast: false
matrix:
debug-level: ${{ fromJSON(inputs.debug-levels) }}
- include:
- - debug-level: debug
- flags: --with-debug-level=fastdebug
- suffix: -debug
steps:
- name: 'Checkout the JDK source'
@@ -118,7 +117,7 @@ jobs:
run: >
bash configure
--with-conf-name=${{ inputs.platform }}
- ${{ matrix.flags }}
+ ${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
--with-jtreg=${{ steps.jtreg.outputs.path }}
@@ -133,17 +132,14 @@ jobs:
- name: 'Build'
id: build
uses: ./.github/actions/do-build
- env:
- # Only build static-libs-bundles for release builds.
- # For debug builds, building static-libs often exceeds disk space.
- STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
with:
- make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
+ make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
- debug-suffix: '${{ matrix.suffix }}'
+ debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: ${{ inputs.platform }}
- debug-suffix: '${{ matrix.suffix }}'
+ debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
+ bundle-suffix: ${{ inputs.bundle-suffix }}
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 210d53be658..8dce1d214dc 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -225,6 +225,43 @@ jobs:
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
+ build-linux-x64-static:
+ name: linux-x64-static
+ needs: prepare
+ uses: ./.github/workflows/build-linux.yml
+ with:
+ platform: linux-x64
+ make-target: 'static-jdk-image'
+ # There are issues with fastdebug static build in GHA due to space limit.
+ # Only do release build for now.
+ debug-levels: '[ "release" ]'
+ gcc-major-version: '10'
+ configure-arguments: ${{ github.event.inputs.configure-arguments }}
+ make-arguments: ${{ github.event.inputs.make-arguments }}
+ # It currently doesn't produce any bundles, but probably will do in
+ # the future.
+ bundle-suffix: "-static"
+ if: needs.prepare.outputs.linux-x64 == 'true'
+
+ build-linux-x64-static-libs:
+ name: linux-x64-static-libs
+ needs: prepare
+ uses: ./.github/workflows/build-linux.yml
+ with:
+ platform: linux-x64
+ make-target: 'static-libs-bundles'
+ # Only build static-libs-bundles for release builds.
+ # For debug builds, building static-libs often exceeds disk space.
+ debug-levels: '[ "release" ]'
+ gcc-major-version: '10'
+ configure-arguments: ${{ github.event.inputs.configure-arguments }}
+ make-arguments: ${{ github.event.inputs.make-arguments }}
+ # Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
+ # This bundle is not used by testing jobs, but downstreams use it to check that
+ # dependent projects, e.g. libgraal, builds fine.
+ bundle-suffix: "-static-libs"
+ if: needs.prepare.outputs.linux-x64-variants == 'true'
+
build-linux-cross-compile:
name: linux-cross-compile
needs: prepare
@@ -325,17 +362,6 @@ jobs:
bootjdk-platform: linux-x64
runs-on: ubuntu-22.04
- test-macos-x64:
- name: macos-x64
- needs:
- - build-macos-x64
- uses: ./.github/workflows/test.yml
- with:
- platform: macos-x64
- bootjdk-platform: macos-x64
- runs-on: macos-13
- xcode-toolset-version: '14.3.1'
-
test-macos-aarch64:
name: macos-aarch64
needs:
diff --git a/.gitignore b/.gitignore
index b57addfccc9..2d82e0d943c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ NashornProfile.txt
/.cache
/.gdbinit
/.lldbinit
+**/core.[0-9]*
diff --git a/.jcheck/conf b/.jcheck/conf
index beb280d1a04..6ab5c2d64c2 100644
--- a/.jcheck/conf
+++ b/.jcheck/conf
@@ -36,6 +36,6 @@ pattern=^([124-8][0-9]{6}): (\S.*)$
dirs=test/jdk|test/langtools|test/lib-test|test/hotspot/jtreg|test/jaxp
[checks "copyright"]
-files=^(?!LICENSE|license\.txt|.*\.bin|.*\.gif|.*\.jpg|.*\.png|.*\.icon|.*\.tiff|.*\.dat|.*\.patch|.*\.wav|.*\.class|.*-header|.*\.jar|).*
+files=^(?!LICENSE|license\.txt|.*\.bin|.*\.gif|.*\.jpg|.*\.png|.*\.icon|.*\.tiff|.*\.dat|.*\.patch|.*\.wav|.*\.class|.*-header|.*\.jar).*
oracle_locator=.*Copyright \(c\)(.*)Oracle and/or its affiliates\. All rights reserved\.
oracle_validator=.*Copyright \(c\) (\d{4})(?:, (\d{4}))?, Oracle and/or its affiliates\. All rights reserved\.
diff --git a/Makefile b/Makefile
index ebe52d5d7f2..751574e9620 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2015, 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
@@ -24,8 +24,9 @@
#
###
-### This file is just a very small wrapper needed to run the real make/Init.gmk.
-### It also performs some sanity checks on make.
+### This file is just a very small wrapper which will include make/PreInit.gmk,
+### where the real work is done. This wrapper also performs some sanity checks
+### on make that must be done before we can include another file.
###
# The shell code below will be executed on /usr/bin/make on Solaris, but not in GNU Make.
@@ -58,7 +59,7 @@ ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
else
makefile_path := $(lastword $(MAKEFILE_LIST))
endif
-topdir := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
+TOPDIR := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
-# ... and then we can include the real makefile
-include $(topdir)/make/Init.gmk
+# ... and then we can include the real makefile to bootstrap the build
+include $(TOPDIR)/make/PreInit.gmk
diff --git a/bin/idea.sh b/bin/idea.sh
index c85ae294454..eb37964f396 100644
--- a/bin/idea.sh
+++ b/bin/idea.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 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
@@ -99,7 +99,7 @@ if [ "$VERBOSE" = "true" ] ; then
echo "idea template dir: $IDEA_TEMPLATE"
fi
-cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" $CONF_ARG || exit 1
+cd $TOP ; make idea-gen-config ALLOW=IDEA_OUTPUT,MODULES IDEA_OUTPUT=$IDEA_OUTPUT MODULES="$*" $CONF_ARG || exit 1
cd $SCRIPT_DIR
. $IDEA_OUTPUT/env.cfg
diff --git a/doc/hotspot-style.html b/doc/hotspot-style.html
index 0305bfeca03..7e7f4de3629 100644
--- a/doc/hotspot-style.html
+++ b/doc/hotspot-style.html
@@ -207,23 +207,38 @@ the simple "getter".
All source files must have a globally unique basename. The build
system depends on this uniqueness.
+Keep the include lines within a section alphabetically sorted by
+their lowercase value. If an include must be out of order for
+correctness, suffix with it a comment such as
+// do not reorder. Source code processing tools can also
+use this hint.
+Put conditional inclusions (#if ...) at the end of
+the section of HotSpot include lines. This also applies to
+macro-expanded includes of platform dependent files.
+Put system includes in a section after the HotSpot include lines
+with a blank line separating the two sections.
Do not put non-trivial function implementations in .hpp files. If
the implementation depends on other .hpp files, put it in a .cpp or a
.inline.hpp file.
.inline.hpp files should only be included in .cpp or .inline.hpp
files.
All .inline.hpp files should include their corresponding .hpp
-file as the first include line. Declarations needed by other files
-should be put in the .hpp file, and not in the .inline.hpp file. This
-rule exists to resolve problems with circular dependencies between
-.inline.hpp files.
-All .cpp files include precompiled.hpp as the first include
-line.
-precompiled.hpp is just a build time optimization, so don't rely
-on it to resolve include problems.
-Keep the include lines alphabetically sorted.
-Put conditional inclusions (#if ...) at the end of
-the include list.
+file as the first include line with a blank line separating it from the
+rest of the include lines. Declarations needed by other files should be
+put in the .hpp file, and not in the .inline.hpp file. This rule exists
+to resolve problems with circular dependencies between .inline.hpp
+files.
+Do not include a .hpp file if the corresponding .inline.hpp file
+is included.
+Use include guards for .hpp and .inline.hpp files. The name of
+the defined guard should be derived from the full search path of the
+file relative to the hotspot source directory. The guard should be all
+upper case with all paths separators and periods replaced by
+underscores.
+Some build configurations use precompiled headers to speed up the
+build times. The precompiled headers are included in the precompiled.hpp
+file. Note that precompiled.hpp is just a build time optimization, so
+don't rely on it to resolve include problems.
JTReg Tests
diff --git a/doc/hotspot-style.md b/doc/hotspot-style.md
index f5e59648cb2..0a135b2074c 100644
--- a/doc/hotspot-style.md
+++ b/doc/hotspot-style.md
@@ -135,9 +135,21 @@ change should be done with a "setter" accessor matched to the simple
### Source Files
-* All source files must have a globally unique basename. The build
+* All source files must have a globally unique basename. The build
system depends on this uniqueness.
+* Keep the include lines within a section alphabetically sorted by their
+lowercase value. If an include must be out of order for correctness,
+suffix with it a comment such as `// do not reorder`. Source code
+processing tools can also use this hint.
+
+* Put conditional inclusions (`#if ...`) at the end of the section of HotSpot
+include lines. This also applies to macro-expanded includes of platform
+dependent files.
+
+* Put system includes in a section after the HotSpot include lines with a blank
+line separating the two sections.
+
* Do not put non-trivial function implementations in .hpp files. If
the implementation depends on other .hpp files, put it in a .cpp or
a .inline.hpp file.
@@ -146,18 +158,22 @@ a .inline.hpp file.
files.
* All .inline.hpp files should include their corresponding .hpp file as
-the first include line. Declarations needed by other files should be put
-in the .hpp file, and not in the .inline.hpp file. This rule exists to
-resolve problems with circular dependencies between .inline.hpp files.
+the first include line with a blank line separating it from the rest of the
+include lines. Declarations needed by other files should be put in the .hpp
+file, and not in the .inline.hpp file. This rule exists to resolve problems
+with circular dependencies between .inline.hpp files.
-* All .cpp files include precompiled.hpp as the first include line.
+* Do not include a .hpp file if the corresponding .inline.hpp file is included.
-* precompiled.hpp is just a build time optimization, so don't rely on
-it to resolve include problems.
+* Use include guards for .hpp and .inline.hpp files. The name of the defined
+guard should be derived from the full search path of the file relative to the
+hotspot source directory. The guard should be all upper case with all paths
+separators and periods replaced by underscores.
-* Keep the include lines alphabetically sorted.
-
-* Put conditional inclusions (`#if ...`) at the end of the include list.
+* Some build configurations use precompiled headers to speed up the
+build times. The precompiled headers are included in the precompiled.hpp
+file. Note that precompiled.hpp is just a build time optimization, so
+don't rely on it to resolve include problems.
### JTReg Tests
diff --git a/make/Bundles.gmk b/make/Bundles.gmk
index 2ed04c19064..58950b5fb1f 100644
--- a/make/Bundles.gmk
+++ b/make/Bundles.gmk
@@ -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
@@ -23,10 +23,9 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include MakeIO.gmk
@@ -43,8 +42,6 @@ ifeq ($(call isBuildOs, windows), true)
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
endif
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
################################################################################
# BUNDLE : Name of bundle to create
# FILES : Files in BASE_DIRS to add to bundle
@@ -502,11 +499,6 @@ endif
################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Bundles.gmk))
-
-################################################################################
-
product-bundles: $(PRODUCT_TARGETS)
legacy-bundles: $(LEGACY_TARGETS)
test-bundles: $(TEST_TARGETS)
@@ -517,6 +509,10 @@ static-libs-bundles: $(STATIC_LIBS_TARGETS)
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
jcov-bundles: $(JCOV_TARGETS)
-.PHONY: all default product-bundles test-bundles \
+.PHONY: product-bundles test-bundles \
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
static-libs-bundles static-libs-graal-bundles jcov-bundles
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/CompileCommands.gmk b/make/CompileCommands.gmk
index 180bc76d4b8..baf07cf2e94 100644
--- a/make/CompileCommands.gmk
+++ b/make/CompileCommands.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018, 2020, 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
@@ -23,10 +23,9 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
# When FIXPATH is set, let it process the file to make sure all paths are usable
# by system native tools. The FIXPATH tool assumes arguments preceded by an @
@@ -50,6 +49,6 @@ $(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile-
TARGETS += $(OUTPUTDIR)/compile_commands.json
-all: $(TARGETS)
+################################################################################
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk
index 6c751552e50..503edf18e00 100644
--- a/make/CompileDemos.gmk
+++ b/make/CompileDemos.gmk
@@ -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
@@ -23,23 +23,17 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
include CopyFiles.gmk
include JavaCompilation.gmk
include TextFileProcessing.gmk
include ZipArchive.gmk
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
-
# Prepare the find cache.
DEMO_SRC_DIRS += $(TOPDIR)/src/demo
@@ -132,12 +126,19 @@ define SetupBuildDemoBody
JARMAIN := $$($1_MAIN_CLASS), \
MANIFEST := $(DEMO_MANIFEST), \
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
- SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
))
$1 += $$(BUILD_DEMO_$1)
+
+ $$(eval $$(call SetupZipArchive, ZIP_SRC_DEMO_$1, \
+ SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
+ ZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
+ EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
+ ))
+
+ $1 += $$(ZIP_SRC_DEMO_$1)
endif
# Copy files. Sort is needed to remove duplicates.
@@ -257,11 +258,8 @@ ifneq ($(filter images, $(MAKECMDGOALS)), )
IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
endif
-################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, CompileDemos-post.gmk))
-
-all: $(TARGETS)
images: $(IMAGES_TARGETS)
-.PHONY: all
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/CompileInterimLangtools.gmk b/make/CompileInterimLangtools.gmk
index dbb23de093c..c869ea160c7 100644
--- a/make/CompileInterimLangtools.gmk
+++ b/make/CompileInterimLangtools.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,11 +23,9 @@
# questions.
#
-# This must be the first rule
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include JavaCompilation.gmk
@@ -148,5 +146,4 @@ TARGETS += $(BUILD_JAVAC_SERVER)
################################################################################
-
-all: $(TARGETS)
+include MakeFileEnd.gmk
diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk
index 7c86b77dd31..b4a193dfade 100644
--- a/make/CompileJavaModules.gmk
+++ b/make/CompileJavaModules.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,13 +23,12 @@
# questions.
#
-# This must be the first rule
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
-include Modules.gmk
include JavaCompilation.gmk
+include Modules.gmk
################################################################################
# If this is an imported module that has prebuilt classes, only compile
@@ -86,7 +85,15 @@ CreateHkTargets = \
################################################################################
# Include module specific build settings
--include Java.gmk
+THIS_SNIPPET := modules/$(MODULE)/Java.gmk
+
+ifneq ($(wildcard $(THIS_SNIPPET)), )
+ include MakeSnippetStart.gmk
+
+ include $(THIS_SNIPPET)
+
+ include MakeSnippetEnd.gmk
+endif
################################################################################
# Setup the main compilation
@@ -148,6 +155,4 @@ endif
################################################################################
-all: $(TARGETS)
-
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/CompileModuleTools.gmk b/make/CompileModuleTools.gmk
index 888b8418eea..12088553055 100644
--- a/make/CompileModuleTools.gmk
+++ b/make/CompileModuleTools.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,14 +23,12 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
+include MakeFileStart.gmk
################################################################################
+include JavaCompilation.gmk
+
TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
# When using an external BUILDJDK, make it possible to shortcut building of
@@ -64,4 +62,4 @@ TARGETS += $(BUILD_JIGSAW_TOOLS)
################################################################################
-all: $(TARGETS)
+include MakeFileEnd.gmk
diff --git a/make/CompileToolsHotspot.gmk b/make/CompileToolsHotspot.gmk
index 3fd3e5e8b88..1ce6578de07 100644
--- a/make/CompileToolsHotspot.gmk
+++ b/make/CompileToolsHotspot.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2020, 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
@@ -23,19 +23,12 @@
# questions.
#
-# This must be the first rule
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include JavaCompilation.gmk
-TARGETS :=
-
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, hotspot/CompileTools.gmk))
-
################################################################################
# Build tools needed for the JFR source code generation
@@ -51,7 +44,6 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \
TARGETS += $(BUILD_TOOLS_HOTSPOT)
+################################################################################
-all: $(TARGETS)
-
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/CompileToolsJdk.gmk b/make/CompileToolsJdk.gmk
index 41a19f90ace..c291dbdba0a 100644
--- a/make/CompileToolsJdk.gmk
+++ b/make/CompileToolsJdk.gmk
@@ -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
@@ -23,21 +23,14 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include JavaCompilation.gmk
include TextFileProcessing.gmk
-################################################################################
-
-$(eval $(call IncludeCustomExtension, CompileTools.gmk))
-
-################################################################################
-
# Use += to be able to add to this from a custom extension
BUILD_TOOLS_SRC_DIRS += \
$(TOPDIR)/make/jdk/src/classes \
@@ -160,4 +153,6 @@ ifeq ($(ENABLE_PANDOC), true)
TARGETS += $(PANDOC_HTML_MANPAGE_FILTER_SETUP)
endif
-all: $(TARGETS)
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/CopyImportModules.gmk b/make/CopyImportModules.gmk
index 69a42f166ba..435468e48db 100644
--- a/make/CopyImportModules.gmk
+++ b/make/CopyImportModules.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,13 +23,12 @@
# questions.
#
+include MakeFileStart.gmk
+
+################################################################################
# This makefile is called for every imported module to copy the non class
# contents into the exploded jdk image.
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
@@ -103,4 +102,6 @@ ifneq ($(CONF_DIR), )
TARGETS += $(COPY_CONF)
endif
-all: $(TARGETS)
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/CopyInterimTZDB.gmk b/make/CopyInterimTZDB.gmk
index 1e54cd8af11..9305ca4c4ed 100644
--- a/make/CopyInterimTZDB.gmk
+++ b/make/CopyInterimTZDB.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2019, 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
@@ -23,15 +23,12 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-include CopyFiles.gmk
+include MakeFileStart.gmk
################################################################################
+include CopyFiles.gmk
+
### TZDB tool needs files from java.time.zone package
define tzdb_copyfiles
@@ -51,3 +48,7 @@ $(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \
################################################################################
all: $(COPY_INTERIM_TZDB)
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/Coverage.gmk b/make/Coverage.gmk
index 503acbe03ab..2fd4e4ec6d4 100644
--- a/make/Coverage.gmk
+++ b/make/Coverage.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018, 2019, 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
@@ -22,8 +22,7 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
-include $(SPEC)
-include MakeBase.gmk
+include MakeFileStart.gmk
################################################################################
@@ -47,7 +46,6 @@ $(JCOV_IMAGE_DIR)/release: $(JCOV_INPUT_IMAGE_DIR)/release
-t $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)/template.xml \
-rt $(JCOV_HOME)/lib/jcov_network_saver.jar \
-exclude 'java.lang.Object' \
- -exclude 'jdk.internal.org.objectweb.**' \
-exclude jdk.test.Main -exclude '**\$Proxy*' \
$(JCOV_FILTERS) \
$(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
@@ -55,3 +53,7 @@ $(JCOV_IMAGE_DIR)/release: $(JCOV_INPUT_IMAGE_DIR)/release
$(RMDIR) $(JCOV_TEMP)
jcov-image: $(JCOV_IMAGE_DIR)/release
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk
index 86bc3b8335e..40bceda69a9 100644
--- a/make/CreateJmods.gmk
+++ b/make/CreateJmods.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,10 +23,9 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include Execute.gmk
@@ -36,8 +35,6 @@ ifeq ($(MODULE), )
$(error MODULE must be set when calling CreateJmods.gmk)
endif
-$(eval $(call IncludeCustomExtension, CreateJmods.gmk))
-
################################################################################
JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
@@ -187,7 +184,15 @@ endif
################################################################################
# Include module specific build settings
--include Jmod.gmk
+THIS_SNIPPET := modules/$(MODULE)/Jmod.gmk
+
+ifneq ($(wildcard $(THIS_SNIPPET)), )
+ include MakeSnippetStart.gmk
+
+ include $(THIS_SNIPPET)
+
+ include MakeSnippetEnd.gmk
+endif
# Set main class
ifneq ($(JMOD_FLAGS_main_class), )
@@ -266,6 +271,4 @@ TARGETS += $(create_$(JMOD_FILE))
################################################################################
-all: $(TARGETS)
-
-################################################################################
+include MakeFileEnd.gmk
diff --git a/make/Docs.gmk b/make/Docs.gmk
index fb2726e6dad..49c97946f75 100644
--- a/make/Docs.gmk
+++ b/make/Docs.gmk
@@ -1,4 +1,4 @@
-# Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 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
@@ -22,26 +22,7 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-include CopyFiles.gmk
-include Execute.gmk
-include Modules.gmk
-include ModuleTools.gmk
-include ProcessMarkdown.gmk
-include ToolsJdk.gmk
-include ZipArchive.gmk
-include TextFileProcessing.gmk
-
-# This is needed to properly setup DOCS_MODULES.
-$(eval $(call ReadImportMetaData))
-
-################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Docs.gmk))
+include MakeFileStart.gmk
################################################################################
# This file generates all documentation for OpenJDK.
@@ -54,7 +35,19 @@ $(eval $(call IncludeCustomExtension, Docs.gmk))
#
# We will also generate separate, free-standing specifications from either
# markdown or existing html files.
-#
+################################################################################
+
+include CopyFiles.gmk
+include Execute.gmk
+include Modules.gmk
+include ProcessMarkdown.gmk
+include TextFileProcessing.gmk
+include ZipArchive.gmk
+include $(TOPDIR)/make/ModuleTools.gmk
+include $(TOPDIR)/make/ToolsJdk.gmk
+
+# This is needed to properly setup DOCS_MODULES.
+$(eval $(call ReadImportMetaData))
################################################################################
# Javadoc settings
@@ -105,14 +98,14 @@ 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 ISO-8859-1 -docencoding UTF-8 -breakiterator \
-splitIndex --system none -javafx --expand-requires transitive \
--override-methods=summary
# 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 ISO-8859-1 -breakiterator -splitIndex --system none \
-html5 -javafx --expand-requires transitive
# Should we add DRAFT stamps to the generated javadoc?
@@ -680,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), \
@@ -761,10 +754,6 @@ $(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \
ZIP_TARGETS += $(BUILD_JAVADOC_ZIP)
-################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Docs-post.gmk))
-
################################################################################
# Bundles all generated specs into a zip archive, skipping javadocs.
@@ -806,7 +795,11 @@ all: docs-jdk-api-javadoc docs-jdk-api-graphs docs-javase-api-javadoc \
docs-reference-api-graphs docs-jdk-specs docs-jdk-index docs-zip \
docs-specs-zip
-.PHONY: default all docs-jdk-api-javadoc docs-jdk-api-graphs \
+.PHONY: docs-jdk-api-javadoc docs-jdk-api-graphs \
docs-javase-api-javadoc docs-javase-api-graphs \
docs-reference-api-javadoc docs-reference-api-graphs docs-jdk-specs \
docs-jdk-index docs-zip docs-specs-zip
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/Doctor.gmk b/make/Doctor.gmk
index 39953cd28db..05de0730fa1 100644
--- a/make/Doctor.gmk
+++ b/make/Doctor.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2022, 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
@@ -23,18 +23,11 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Doctor.gmk))
+include MakeFileStart.gmk
################################################################################
-#
# Help user diagnose possible errors and problems with the build environment.
-#
+################################################################################
prologue:
$(ECHO)
@@ -145,4 +138,8 @@ doctor: $(TARGETS)
all: doctor
-.PHONY: default all doctor $(TARGETS)
+.PHONY: doctor $(TARGETS)
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/ExplodedImageOptimize.gmk b/make/ExplodedImageOptimize.gmk
index a67b987d91d..928ff86f10f 100644
--- a/make/ExplodedImageOptimize.gmk
+++ b/make/ExplodedImageOptimize.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2019, 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
@@ -23,16 +23,14 @@
# questions.
#
-# Runs a tool on the exploded image to improve performance
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include Execute.gmk
-include $(TOPDIR)/make/ModuleTools.gmk
+include MakeFileStart.gmk
################################################################################
+# Runs a tool on the exploded image to improve performance
+################################################################################
+
+include Execute.gmk
+include $(TOPDIR)/make/ModuleTools.gmk
ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class)
@@ -47,6 +45,4 @@ TARGETS := $(optimize_image_TARGET)
################################################################################
-all: $(TARGETS)
-
-.PHONY: all default
+include MakeFileEnd.gmk
diff --git a/src/hotspot/os_cpu/linux_x86/safefetch_linux_x86_32.S b/make/GenerateFindTests.gmk
similarity index 56%
rename from src/hotspot/os_cpu/linux_x86/safefetch_linux_x86_32.S
rename to make/GenerateFindTests.gmk
index 73f6cdf38c9..d8faa5cd0cd 100644
--- a/src/hotspot/os_cpu/linux_x86/safefetch_linux_x86_32.S
+++ b/make/GenerateFindTests.gmk
@@ -1,11 +1,12 @@
#
-# Copyright (c) 2022 SAP SE. All rights reserved.
-# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
+# 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.
+# 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
@@ -22,20 +23,16 @@
# questions.
#
-#include "defs.S.inc"
+include MakeFileStart.gmk
- .text
+################################################################################
+# This makefile is a thin wrapper around FindTests.gmk, just to make FindTest
+# fill the cache.
+################################################################################
- # Support for int SafeFetch32(int* address, int defaultval);
- #
- # 8(%esp) : default value
- # 4(%esp) : crash address
- # 0(%esp) : return pc
-DECLARE_FUNC(SafeFetch32_impl):
- movl 4(%esp),%ecx # load address from stack
-DECLARE_FUNC(_SafeFetch32_fault):
- movl (%ecx), %eax # load target value, may fault
- ret
-DECLARE_FUNC(_SafeFetch32_continuation):
- movl 8(%esp),%eax # load default value from stack
- ret
+GENERATE_FIND_TESTS_FILE := true
+include FindTests.gmk
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk
index b6989042d6a..5fc745ba223 100644
--- a/make/GenerateLinkOptData.gmk
+++ b/make/GenerateLinkOptData.gmk
@@ -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
@@ -23,15 +23,12 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# Generate classlist
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
include CopyFiles.gmk
include JavaCompilation.gmk
@@ -148,4 +145,4 @@ TARGETS += $(COPY_JLI_TRACE)
################################################################################
-all: $(TARGETS)
+include MakeFileEnd.gmk
diff --git a/make/GenerateModuleSummary.gmk b/make/GenerateModuleSummary.gmk
index 854d938c9ca..5c6ec055c45 100644
--- a/make/GenerateModuleSummary.gmk
+++ b/make/GenerateModuleSummary.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,12 +23,11 @@
# questions.
#
-# Default target declared first
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
-include ModuleTools.gmk
+################################################################################
+
+include $(TOPDIR)/make/ModuleTools.gmk
GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs
SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles
@@ -50,3 +49,7 @@ $(GENGRAPHS_DIR)/module-summary.html: $(BUILD_JIGSAW_TOOLS) $(GENGRAPHS_DIR)/tec
$(TOOL_MODULESUMMARY) -o $@ --module-path $(IMAGES_OUTPUTDIR)/jmods
all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/Global.gmk b/make/Global.gmk
index 86487c1c2fc..512c5b963aa 100644
--- a/make/Global.gmk
+++ b/make/Global.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2024, 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
@@ -108,6 +108,7 @@ help:
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
+ $(info $(_) ALLOW="FOO,BAR" # Do not warn that FOO and BAR are non-control variables)
$(info )
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))), \
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
@@ -120,12 +121,12 @@ print-configurations:
@true
test-prebuilt:
- @( cd $(topdir) && \
+ @( cd $(TOPDIR) && \
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
test-prebuilt-with-exit-code:
- @( cd $(topdir) && \
+ @( cd $(TOPDIR) && \
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
diff --git a/make/GraalBuilderImage.gmk b/make/GraalBuilderImage.gmk
index 7fa90c66019..d707e067a55 100644
--- a/make/GraalBuilderImage.gmk
+++ b/make/GraalBuilderImage.gmk
@@ -23,19 +23,14 @@
# questions.
#
-# This makefile creates a jdk image overlaid with statically linked core
-# libraries.
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-include CopyFiles.gmk
+include MakeFileStart.gmk
+################################################################################
+# This makefile creates a jdk image overlaid with statically linked core
+# libraries.
################################################################################
-TARGETS :=
+include CopyFiles.gmk
$(eval $(call SetupCopyFiles, COPY_JDK_IMG, \
SRC := $(JDK_IMAGE_DIR)/, \
@@ -54,6 +49,4 @@ TARGETS += $(COPY_STATIC_LIBS)
################################################################################
-all: $(TARGETS)
-
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/Hsdis.gmk b/make/Hsdis.gmk
index 13d84f964bc..a0fc031be1b 100644
--- a/make/Hsdis.gmk
+++ b/make/Hsdis.gmk
@@ -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
@@ -23,17 +23,14 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JdkNativeCompilation.gmk
+include MakeFileStart.gmk
################################################################################
# This makefile compiles and installs the hsdis library
-#
################################################################################
+include JdkNativeCompilation.gmk
+
HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
@@ -201,8 +198,8 @@ endif
TARGETS += install
+.PHONY: build install
+
################################################################################
-all: $(TARGETS)
-
-.PHONY: all default build install
+include MakeFileEnd.gmk
diff --git a/make/Images.gmk b/make/Images.gmk
index c5d0ef11b5d..3f2b34bc9c6 100644
--- a/make/Images.gmk
+++ b/make/Images.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,10 +23,9 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include DebugInfoUtils.gmk
@@ -37,9 +36,6 @@ include Utils.gmk
JDK_TARGETS :=
JRE_TARGETS :=
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Images-pre.gmk))
-
################################################################################
# All modules for the current target platform.
@@ -101,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) \
@@ -309,12 +309,6 @@ $(call SetupCopyDebuginfo,SYMBOLS)
################################################################################
-# Include custom post hook here to make it possible to augment the target lists
-# before actual target prerequisites are declared.
-$(eval $(call IncludeCustomExtension, Images-post.gmk))
-
-################################################################################
-
$(JRE_TARGETS): $(JLINK_JRE_TARGETS)
$(JDK_TARGETS): $(JLINK_JDK_TARGETS)
@@ -324,4 +318,8 @@ symbols: $(SYMBOLS_TARGETS)
all: jdk jre symbols
-.PHONY: default all jdk jre symbols
+.PHONY: jdk jre symbols
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/Init.gmk b/make/Init.gmk
index f2cfe3625a5..2a8f6399a18 100644
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2024, 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
@@ -23,263 +23,82 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
-# This is the bootstrapping part of the build. This file is included from the
-# top level Makefile, and is responsible for launching the Main.gmk file with
-# the proper make and the proper make arguments.
+# Init.gmk sits between PreInit.gmk and Main.gmk when bootstrapping the build.
+# It is called from PreInit.gmk, and its main responsibility is to launch
+# Main.gmk with the proper make and the proper make arguments.
+# PreMain.gmk has provided us with a proper SPEC. This allows us to use the
+# value of $(MAKE) for all further make calls.
################################################################################
-# This must be the first rule
-default:
-.PHONY: default
+# Our helper functions.
+include $(TOPDIR)/make/InitSupport.gmk
+include LogUtils.gmk
+
+# Force early generation of module-deps.gmk
+GENERATE_MODULE_DEPS_FILE := true
+include Modules.gmk
# Inclusion of this pseudo-target will cause make to execute this file
# serially, regardless of -j.
.NOTPARALLEL:
-ifeq ($(HAS_SPEC), )
- ##############################################################################
- # This is the default mode. We have not been recursively called with a SPEC.
- ##############################################################################
+# Parse COMPARE_BUILD (for makefile development)
+$(eval $(call ParseCompareBuild))
- # Include our helper functions.
- include $(topdir)/make/InitSupport.gmk
+# Setup reproducible build environment
+$(eval $(call SetupReproducibleBuild))
- # Here are "global" targets, i.e. targets that can be executed without having
- # 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)
-
- # Extract non-global targets that require a spec file.
- CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
-
- # If we have only global targets, or if we are called with -qp (assuming an
- # external part, e.g. bash completion, is trying to understand our targets),
- # we will skip SPEC location and the sanity checks.
- ifeq ($(CALLED_SPEC_TARGETS), )
- ONLY_GLOBAL_TARGETS := true
- endif
- ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
- ONLY_GLOBAL_TARGETS := true
- endif
-
- ifeq ($(ONLY_GLOBAL_TARGETS), true)
- ############################################################################
- # We have only global targets, or are called with -pq.
- ############################################################################
-
- ifeq ($(wildcard $(SPEC)), )
- # If we have no SPEC provided, we will just make a "best effort" target list.
- # First try to grab any available pre-existing main-targets.gmk.
- main_targets_file := $(firstword $(wildcard $(build_dir)/*/make-support/main-targets.gmk))
- ifneq ($(main_targets_file), )
- # Extract the SPEC that corresponds to this main-targets.gmk file.
- SPEC := $(patsubst %/make-support/main-targets.gmk, %/spec.gmk, $(main_targets_file))
- else
- # None found, pick an arbitrary SPEC for which to generate a file
- SPEC := $(firstword $(all_spec_files))
- endif
- endif
-
- ifneq ($(wildcard $(SPEC)), )
- $(eval $(call DefineMainTargets, LAZY, $(SPEC)))
- else
- # If we have no configurations we can not provide any main targets.
- ALL_MAIN_TARGETS :=
- endif
-
- ALL_TARGETS := $(sort $(ALL_GLOBAL_TARGETS) $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS))
-
- # Just list all our targets.
- $(ALL_TARGETS):
-
- .PHONY: $(ALL_TARGETS)
-
- else
- ############################################################################
- # This is the normal case, we have been called from the command line by the
- # user and we need to call ourself back with a proper SPEC.
- # We have at least one non-global target, so we need to find a spec file.
- ############################################################################
-
- # Basic checks on environment and command line.
- $(eval $(call CheckControlVariables))
- $(eval $(call CheckDeprecatedEnvironment))
- $(eval $(call CheckInvalidMakeFlags))
-
- # Check that CONF_CHECK is valid.
- $(eval $(call ParseConfCheckOption))
-
- # Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE, MAKE_LOG_VARS and MAKE_LOG_FLAGS.
+# If no LOG= was given on command line, but we have a non-standard default
+# value, use that instead and re-parse log level.
+ifeq ($(LOG), )
+ ifneq ($(DEFAULT_LOG), )
+ override LOG := $(DEFAULT_LOG)
$(eval $(call ParseLogLevel))
-
- # After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails).
- $(eval $(call ParseConfAndSpec))
-
- # Extract main targets from Main.gmk using the spec(s) provided. In theory,
- # with multiple specs, we should find the intersection of targets provided
- # by all specs, but we approximate this by an arbitrary spec from the list.
- # This will setup ALL_MAIN_TARGETS.
- $(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
-
- # Separate called targets depending on type.
- INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
- MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))
- SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS))
- PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
-
- # The spec files depend on the autoconf source code. This check makes sure
- # the configuration is up to date after changes to configure.
- $(SPECS): $(wildcard $(topdir)/make/autoconf/*) \
- $(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*)) \
- $(addprefix $(topdir)/make/conf/, version-numbers.conf branding.conf) \
- $(if $(CUSTOM_CONF_DIR), $(wildcard $(addprefix $(CUSTOM_CONF_DIR)/, \
- version-numbers.conf branding.conf)))
- ifeq ($(CONF_CHECK), fail)
- @echo Error: The configuration is not up to date for \
- "'$(lastword $(subst /, , $(dir $@)))'."
- $(call PrintConfCheckFailed)
- @exit 2
- else ifeq ($(CONF_CHECK), auto)
- @echo Note: The configuration is not up to date for \
- "'$(lastword $(subst /, , $(dir $@)))'."
- @( cd $(topdir) && \
- $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
- SPEC=$@ HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
- reconfigure )
- else ifeq ($(CONF_CHECK), ignore)
- # Do nothing
- endif
-
- # Do not let make delete spec files even if aborted while doing a reconfigure
- .PRECIOUS: $(SPECS)
-
- # Unless reconfigure is explicitly called, let all main targets depend on
- # the spec files to be up to date.
- ifeq ($(findstring reconfigure, $(INIT_TARGETS)), )
- $(MAIN_TARGETS): $(SPECS)
- endif
-
- make-info:
- ifneq ($(findstring $(LOG_LEVEL), info debug trace), )
- $(info Running make as '$(strip $(MAKE) $(MFLAGS) \
- $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
- endif
-
- MAKE_INIT_WITH_SPEC_ARGUMENTS := ACTUAL_TOPDIR=$(topdir) \
- USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \
- $(MAKE_LOG_VARS) \
- INIT_TARGETS="$(INIT_TARGETS)" \
- SEQUENTIAL_TARGETS="$(SEQUENTIAL_TARGETS)" \
- PARALLEL_TARGETS="$(PARALLEL_TARGETS)"
-
- # Now the init and main targets will be called, once for each SPEC. The
- # recipe will be run once for every target specified, but we only want to
- # execute the recipe a single time, hence the TARGET_DONE with a dummy
- # command if true.
- # The COMPARE_BUILD part implements special support for makefile development.
- $(ALL_INIT_TARGETS) $(ALL_MAIN_TARGETS): make-info
- @$(if $(TARGET_DONE), \
- true \
- , \
- ( cd $(topdir) && \
- $(foreach spec, $(SPECS), \
- $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
- SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
- main && \
- $(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
- $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
- SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
- COMPARE_BUILD="$(COMPARE_BUILD)" pre-compare-build && \
- $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
- SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
- COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" main && \
- $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
- SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
- COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" post-compare-build && \
- ) \
- ) true ) \
- $(eval TARGET_DONE=true) \
- )
-
- .PHONY: $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS)
-
- endif # $(ONLY_GLOBAL_TARGETS)!=true
-
-else # HAS_SPEC=true
-
- ##############################################################################
- # Now we have a spec. This part provides the "main" target that acts as a
- # trampoline to call the Main.gmk with the value of $(MAKE) found in the spec
- # file.
- ##############################################################################
-
- include $(SPEC)
-
- # Our helper functions.
- include $(TOPDIR)/make/InitSupport.gmk
-
- # Parse COMPARE_BUILD (for makefile development)
- $(eval $(call ParseCompareBuild))
-
- # Setup reproducible build environment
- $(eval $(call SetupReproducibleBuild))
-
- # If no LOG= was given on command line, but we have a non-standard default
- # value, use that instead and re-parse log level.
- ifeq ($(LOG), )
- ifneq ($(DEFAULT_LOG), )
- override LOG := $(DEFAULT_LOG)
- $(eval $(call ParseLogLevel))
- endif
endif
+endif
- ifeq ($(LOG_NOFILE), true)
- # Disable build log if LOG=[level,]nofile was given
- override BUILD_LOG_PIPE :=
- override BUILD_LOG_PIPE_SIMPLE :=
- endif
+ifeq ($(LOG_NOFILE), true)
+ # Disable build log if LOG=[level,]nofile was given
+ override BUILD_LOG_PIPE :=
+ override BUILD_LOG_PIPE_SIMPLE :=
+endif
- ifeq ($(filter dist-clean, $(SEQUENTIAL_TARGETS)), dist-clean)
- # We can't have a log file if we're about to remove it.
- override BUILD_LOG_PIPE :=
- override BUILD_LOG_PIPE_SIMPLE :=
- endif
+ifeq ($(filter dist-clean, $(SEQUENTIAL_TARGETS)), dist-clean)
+ # We can't have a log file if we're about to remove it.
+ override BUILD_LOG_PIPE :=
+ override BUILD_LOG_PIPE_SIMPLE :=
+endif
- ifeq ($(OUTPUT_SYNC_SUPPORTED), true)
- OUTPUT_SYNC_FLAG := -O$(OUTPUT_SYNC)
- endif
+ifeq ($(OUTPUT_SYNC_SUPPORTED), true)
+ OUTPUT_SYNC_FLAG := -O$(OUTPUT_SYNC)
+endif
- ##############################################################################
- # Init targets
- ##############################################################################
+##############################################################################
+# Init targets. These are handled fully, here and now.
+##############################################################################
- print-modules:
+print-modules:
( cd $(TOPDIR) && \
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
NO_RECIPES=true print-modules )
- print-targets:
+print-targets:
( cd $(TOPDIR) && \
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
NO_RECIPES=true print-targets )
- print-tests:
+print-tests:
( cd $(TOPDIR) && \
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
NO_RECIPES=true print-tests )
- print-configuration:
- $(ECHO) $(CONFIGURE_COMMAND_LINE)
+print-configuration:
+ $(ECHO) $(CONFIGURE_COMMAND_LINE)
- reconfigure:
+reconfigure:
ifneq ($(REAL_CONFIGURE_COMMAND_EXEC_FULL), )
$(ECHO) "Re-running configure using original command line '$(REAL_CONFIGURE_COMMAND_EXEC_SHORT) $(REAL_CONFIGURE_COMMAND_LINE)'"
$(eval RECONFIGURE_COMMAND := $(REAL_CONFIGURE_COMMAND_EXEC_FULL) $(REAL_CONFIGURE_COMMAND_LINE))
@@ -295,25 +114,27 @@ else # HAS_SPEC=true
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
$(RECONFIGURE_COMMAND) )
- ##############################################################################
- # The main target, for delegating into Main.gmk
- ##############################################################################
+.PHONY: print-modules print-targets print-tests print-configuration reconfigure
- MAIN_TARGETS := $(SEQUENTIAL_TARGETS) $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE)
- # If building the default target, add what they are to the description.
- DESCRIPTION_TARGETS := $(strip $(MAIN_TARGETS))
- ifeq ($(DESCRIPTION_TARGETS), default)
- DESCRIPTION_TARGETS += ($(DEFAULT_MAKE_TARGET))
- endif
- TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \
- '$(strip $(DESCRIPTION_TARGETS))' in configuration '$(CONF_NAME)'
+##############################################################################
+# The main target. This will delegate all other targets into Main.gmk.
+##############################################################################
- # MAKEOVERRIDES is automatically set and propagated by Make to sub-Make calls.
- # We need to clear it of the init-specific variables. The user-specified
- # variables are explicitly propagated using $(USER_MAKE_VARS).
- main: MAKEOVERRIDES :=
+MAIN_TARGETS := $(SEQUENTIAL_TARGETS) $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE)
+# If building the default target, add what they are to the description.
+DESCRIPTION_TARGETS := $(strip $(MAIN_TARGETS))
+ifeq ($(DESCRIPTION_TARGETS), default)
+ DESCRIPTION_TARGETS += ($(DEFAULT_MAKE_TARGET))
+endif
+TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \
+ '$(strip $(DESCRIPTION_TARGETS))' in configuration '$(CONF_NAME)'
- main: $(INIT_TARGETS)
+# MAKEOVERRIDES is automatically set and propagated by Make to sub-Make calls.
+# We need to clear it of the init-specific variables. The user-specified
+# variables are explicitly propagated using $(USER_MAKE_VARS).
+main: MAKEOVERRIDES :=
+
+main: $(INIT_TARGETS)
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
$(call RotateLogFiles)
$(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
@@ -333,14 +154,14 @@ else # HAS_SPEC=true
# treat it as NOT using jobs at all.
( cd $(TOPDIR) && \
$(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
- $(if $(JOBS), -j $(JOBS)) \
+ $(if $(JOBS), -j $(JOBS)) \
-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" \
$(BUILD_LOG_PIPE_SIMPLE) && \
cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \
- HAS_SPEC=true on-failure ; \
+ on-failure ; \
exit $$exitcode ) )
$(call CleanupJavacServer)
$(call StopGlobalTimer)
@@ -353,7 +174,7 @@ else # HAS_SPEC=true
$(call ReportProfileTimes)
endif
- on-failure:
+on-failure:
$(call CleanupJavacServer)
$(call StopGlobalTimer)
$(call ReportBuildTimes)
@@ -365,15 +186,18 @@ else # HAS_SPEC=true
$(call CleanupCompareBuild)
endif
- # Support targets for COMPARE_BUILD, used for makefile development
- pre-compare-build:
+# Support targets for COMPARE_BUILD, used for makefile development
+pre-compare-build:
$(call WaitForJavacServerFinish)
$(call PrepareCompareBuild)
- post-compare-build:
+post-compare-build:
$(call WaitForJavacServerFinish)
$(call CleanupCompareBuild)
$(call CompareBuildDoComparison)
- .PHONY: print-targets print-modules reconfigure main on-failure
-endif
+.PHONY: main on-failure pre-compare-build post-compare-build
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk
index eea593a80db..a9af44e4225 100644
--- a/make/InitSupport.gmk
+++ b/make/InitSupport.gmk
@@ -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
@@ -23,396 +23,114 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains helper functions for Init.gmk.
-# It is divided in two parts, depending on if a SPEC is present or not
-# (HAS_SPEC is true or not).
################################################################################
-ifndef _INITSUPPORT_GMK
-_INITSUPPORT_GMK := 1
+# Define basic logging setup
+BUILD_LOG := $(OUTPUTDIR)/build.log
+BUILD_PROFILE_LOG := $(OUTPUTDIR)/build-profile.log
-ifeq ($(HAS_SPEC), )
+BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
+# Use this for simple echo/printf commands that are never expected to print
+# to stderr.
+BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG)
- # COMMA is defined in spec.gmk, but that is not included yet
- COMMA := ,
-
- # Include the corresponding closed file, if present.
- ifneq ($(CUSTOM_MAKE_DIR), )
- -include $(CUSTOM_MAKE_DIR)/InitSupport.gmk
+# Setup the build environment to match the requested specification on
+# level of reproducible builds
+define SetupReproducibleBuild
+ ifeq ($$(SOURCE_DATE), updated)
+ # For static values of SOURCE_DATE (not "updated"), these are set in spec.gmk
+ export SOURCE_DATE_EPOCH := $$(shell $$(DATE) +"%s")
+ export SOURCE_DATE_ISO_8601 := $$(call EpochToISO8601, $$(SOURCE_DATE_EPOCH))
endif
+endef
- ##############################################################################
- # Helper functions for the initial part of Init.gmk, before the spec file is
- # loaded. Most of these functions provide parsing and setting up make options
- # from the command-line.
- ##############################################################################
+# Parse COMPARE_BUILD into COMPARE_BUILD_*
+# Syntax: COMPARE_BUILD=CONF=:PATCH=:
+# MAKE=:COMP_OPTS=:
+# COMP_DIR=|:
+# FAIL=
+# If neither CONF or PATCH is given, assume means CONF if it
+# begins with "--", otherwise assume it means PATCH.
+# MAKE and COMP_OPTS can only be used with CONF and/or PATCH specified.
+# If any value contains "+", it will be replaced by space.
+# FAIL can be set to false to have the return value of compare be ignored.
+define ParseCompareBuild
+ ifneq ($$(COMPARE_BUILD), )
+ COMPARE_BUILD_OUTPUTDIR := $(WORKSPACE_ROOT)/build/compare-build/$(CONF_NAME)
+ COMPARE_BUILD_FAIL := true
- # Make control variables, handled by Init.gmk
- INIT_CONTROL_VARIABLES += LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
- COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
-
- # All known make control variables
- MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER SPEC_FILTER
-
- # Define a simple reverse function.
- # Should maybe move to MakeBase.gmk, but we can't include that file now.
- reverse = \
- $(if $(strip $(1)), $(call reverse, $(wordlist 2, $(words $(1)), $(1)))) \
- $(firstword $(1))
-
- # The variable MAKEOVERRIDES contains variable assignments from the command
- # line, but in reverse order to what the user entered.
- # The '§' <=> '\ 'dance is needed to keep values with space in them connected.
- COMMAND_LINE_VARIABLES := $(subst §,\ , $(call reverse, $(subst \ ,§,$(MAKEOVERRIDES))))
-
- # A list like FOO="val1" BAR="val2" containing all user-supplied make
- # variables that we should propagate.
- # The '§' <=> '\ 'dance is needed to keep values with space in them connected.
- USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \
- $(subst \ ,§,$(MAKEOVERRIDES))))
-
- # Setup information about available configurations, if any.
- ifneq ($(CUSTOM_ROOT), )
- build_dir = $(CUSTOM_ROOT)/build
- else
- build_dir = $(topdir)/build
- endif
- all_spec_files = $(wildcard $(build_dir)/*/spec.gmk)
- # Extract the configuration names from the path
- all_confs = $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
-
- # Check for unknown command-line variables
- define CheckControlVariables
- command_line_variables := $$(strip $$(foreach var, \
- $$(subst \ ,_,$$(MAKEOVERRIDES)), \
- $$(firstword $$(subst =, , $$(var)))))
- unknown_command_line_variables := $$(strip \
- $$(filter-out $$(MAKE_CONTROL_VARIABLES), $$(command_line_variables)))
- ifneq ($$(unknown_command_line_variables), )
- $$(info Note: Command line contains non-control variables:)
- $$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
- $$(info Make sure it is not mistyped, and that you intend to override this variable.)
- $$(info 'make help' will list known control variables.)
- $$(info )
- 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
- # MAKEFLAGS only indicate -j if read in a recipe (!)
- $$(topdir)/make/Init.gmk: .FORCE
- $$(if $$(findstring --jobserver, $$(MAKEFLAGS)), \
- $$(info Error: 'make -jN' is not supported, use 'make JOBS=N') \
- $$(error Cannot continue) \
- )
- .FORCE:
- .PHONY: .FORCE
- endef
-
- # Check that the CONF_CHECK option is valid and set up handling
- define ParseConfCheckOption
- ifeq ($$(CONF_CHECK), )
- # Default behavior is fail
- CONF_CHECK := fail
- else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)), )
- $$(info Error: CONF_CHECK must be one of: auto, fail or ignore.)
- $$(error Cannot continue)
- endif
- endef
-
- define ParseConfAndSpec
- ifneq ($$(origin SPEC), undefined)
- # We have been given a SPEC, check that it works out properly
- ifneq ($$(origin CONF), undefined)
- # We also have a CONF argument. We can't have both.
- $$(info Error: Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
- $$(error Cannot continue)
- endif
- ifneq ($$(origin CONF_NAME), undefined)
- # We also have a CONF_NAME argument. We can't have both.
- $$(info Error: Cannot use CONF_NAME=$$(CONF_NAME) and SPEC=$$(SPEC) at the same time. Choose one.)
- $$(error Cannot continue)
- endif
- ifeq ($$(wildcard $$(SPEC)), )
- $$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
- $$(error Cannot continue)
- endif
- ifeq ($$(filter /%, $$(SPEC)), )
- # If given with relative path, make it absolute
- SPECS := $$(CURDIR)/$$(strip $$(SPEC))
- else
- SPECS := $$(SPEC)
- endif
-
- # For now, unset this SPEC variable.
- override SPEC :=
+ ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
+ $$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
+ $$(if $$(filter PATCH=%, $$(part)), \
+ $$(eval COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(part)))) \
+ ) \
+ $$(if $$(filter CONF=%, $$(part)), \
+ $$(eval COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \
+ ) \
+ $$(if $$(filter MAKE=%, $$(part)), \
+ $$(eval COMPARE_BUILD_MAKE = $$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \
+ ) \
+ $$(if $$(filter COMP_OPTS=%, $$(part)), \
+ $$(eval COMPARE_BUILD_COMP_OPTS = $$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \
+ ) \
+ $$(if $$(filter COMP_DIR=%, $$(part)), \
+ $$(eval COMPARE_BUILD_COMP_DIR = $$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \
+ ) \
+ $$(if $$(filter FAIL=%, $$(part)), \
+ $$(eval COMPARE_BUILD_FAIL = $$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
+ ) \
+ $$(if $$(filter NODRYRUN=%, $$(part)), \
+ $$(eval COMPARE_BUILD_NODRYRUN = $$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
+ ) \
+ )
else
- # Use spec.gmk files in the build output directory
- ifeq ($$(all_spec_files), )
- ifneq ($(CUSTOM_ROOT), )
- $$(info Error: No configurations found for $$(CUSTOM_ROOT).)
- else
- $$(info Error: No configurations found for $$(topdir).)
- endif
- $$(info Please run 'bash configure' to create a configuration.)
- $$(info )
- $$(error Cannot continue)
- endif
-
- ifneq ($$(origin CONF_NAME), undefined)
- ifneq ($$(origin CONF), undefined)
- # We also have a CONF argument. We can't have both.
- $$(info Error: Cannot use CONF=$$(CONF) and CONF_NAME=$$(CONF_NAME) at the same time. Choose one.)
- $$(error Cannot continue)
- endif
- matching_conf := $$(strip $$(filter $$(CONF_NAME), $$(all_confs)))
- ifeq ($$(matching_conf), )
- $$(info Error: No configurations found matching CONF_NAME=$$(CONF_NAME).)
- $$(info Available configurations in $$(build_dir):)
- $$(foreach var, $$(all_confs), $$(info * $$(var)))
- $$(error Cannot continue)
- else ifneq ($$(words $$(matching_conf)), 1)
- $$(info Error: Matching more than one configuration CONF_NAME=$$(CONF_NAME).)
- $$(info Available configurations in $$(build_dir):)
- $$(foreach var, $$(all_confs), $$(info * $$(var)))
- $$(error Cannot continue)
- else
- $$(info Building configuration '$$(matching_conf)' (matching CONF_NAME=$$(CONF_NAME)))
- endif
- # Create a SPEC definition. This will contain the path to exactly one spec file.
- SPECS := $$(build_dir)/$$(matching_conf)/spec.gmk
- else ifneq ($$(origin CONF), undefined)
- # User have given a CONF= argument.
- ifeq ($$(CONF), )
- # If given CONF=, match all configurations
- matching_confs := $$(strip $$(all_confs))
- else
- # Otherwise select those that contain the given CONF string
- ifeq ($$(patsubst !%,,$$(CONF)), )
- # A CONF starting with ! means we should negate the search term
- matching_confs := $$(strip $$(foreach var, $$(all_confs), \
- $$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
- else
- matching_confs := $$(strip $$(foreach var, $$(all_confs), \
- $$(if $$(findstring $$(CONF), $$(var)), $$(var))))
- endif
- ifneq ($$(filter $$(CONF), $$(matching_confs)), )
- # If we found an exact match, use that
- matching_confs := $$(CONF)
- # Don't repeat this output on make restarts caused by including
- # generated files.
- ifeq ($$(MAKE_RESTARTS), )
- $$(info Using exact match for CONF=$$(CONF) (other matches are possible))
- endif
- endif
- endif
- ifeq ($$(matching_confs), )
- $$(info Error: No configurations found matching CONF=$$(CONF).)
- $$(info Available configurations in $$(build_dir):)
- $$(foreach var, $$(all_confs), $$(info * $$(var)))
- $$(error Cannot continue)
- else
- # Don't repeat this output on make restarts caused by including
- # generated files.
- ifeq ($$(MAKE_RESTARTS), )
- ifeq ($$(words $$(matching_confs)), 1)
- ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
- $$(info Building configuration '$$(matching_confs)' (matching CONF=$$(CONF)))
- endif
- else
- $$(info Building these configurations (matching CONF=$$(CONF)):)
- $$(foreach var, $$(matching_confs), $$(info * $$(var)))
- endif
- endif
- endif
-
- # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
- SPECS := $$(addsuffix /spec.gmk, $$(addprefix $$(build_dir)/, $$(matching_confs)))
+ # Separate handling for single field case, to allow for spaces in values.
+ ifneq ($$(filter PATCH=%, $$(COMPARE_BUILD)), )
+ COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD)))
+ else ifneq ($$(filter CONF=%, $$(COMPARE_BUILD)), )
+ COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD))))
+ else ifneq ($$(filter --%, $$(COMPARE_BUILD)), )
+ # Assume CONF if value begins with --
+ COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(COMPARE_BUILD)))
else
- # No CONF or SPEC given, check the available configurations
- ifneq ($$(words $$(all_spec_files)), 1)
- $$(info Error: No CONF given, but more than one configuration found.)
- $$(info Available configurations in $$(build_dir):)
- $$(foreach var, $$(all_confs), $$(info * $$(var)))
- $$(info Please retry building with CONF= (or SPEC=).)
- $$(info )
- $$(error Cannot continue)
+ # Otherwise assume patch file
+ COMPARE_BUILD_PATCH = $$(strip $$(COMPARE_BUILD))
+ endif
+ endif
+ ifneq ($$(COMPARE_BUILD_PATCH), )
+ ifneq ($$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH)), )
+ # Assume relative path, if file exists
+ COMPARE_BUILD_PATCH := $$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH))
+ else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
+ $$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
+ endif
+ ifneq ($$(COMPARE_BUILD_NODRYRUN), true)
+ PATCH_DRY_RUN := $$(shell cd $$(WORKSPACE_ROOT) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
+ ifeq ($$(PATCH_DRY_RUN), FAILED)
+ $$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
endif
-
- # We found exactly one configuration, use it
- SPECS := $$(strip $$(all_spec_files))
endif
endif
- endef
-
- # Extract main targets from Main.gmk using the spec provided in $2.
- #
- # Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
- # Param 2: The SPEC file to use.
- define DefineMainTargets
-
- # 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
-
- ifeq ($$(MAKE_RESTARTS), )
- # Only do this if make has not been restarted, and if we do not force it.
- ifeq ($(strip $1), FORCE)
- $$(shell rm -f $$(main_targets_file))
- endif
+ ifneq ($$(COMPARE_BUILD_FAIL), true)
+ COMPARE_BUILD_IGNORE_RESULT := || true
endif
-
- $$(main_targets_file):
- @( cd $$(topdir) && \
- $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(topdir)/make/Main.gmk \
- -I $$(topdir)/make/common SPEC=$(strip $2) NO_RECIPES=true \
- $$(MAKE_LOG_VARS) \
- create-main-targets-include )
-
- # Now include main-targets.gmk. This will define ALL_MAIN_TARGETS.
- -include $$(main_targets_file)
- endef
-
- define PrintConfCheckFailed
- @echo ' '
- @echo "Please rerun configure! Easiest way to do this is by running"
- @echo "'make reconfigure'."
- @echo "This behavior may also be changed using CONF_CHECK=."
- @echo ' '
- endef
-
-else # $(HAS_SPEC)=true
- ##############################################################################
- # Helper functions for the 'main' target. These functions assume a single,
- # proper and existing SPEC is included.
- ##############################################################################
-
- include $(TOPDIR)/make/common/MakeBase.gmk
-
- # Define basic logging setup
- BUILD_LOG := $(OUTPUTDIR)/build.log
- BUILD_PROFILE_LOG := $(OUTPUTDIR)/build-profile.log
-
- BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
- # Use this for simple echo/printf commands that are never expected to print
- # to stderr.
- BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG)
-
- ifneq ($(CUSTOM_ROOT), )
- topdir = $(CUSTOM_ROOT)
- else
- topdir = $(TOPDIR)
endif
+endef
- # Setup the build environment to match the requested specification on
- # level of reproducible builds
- define SetupReproducibleBuild
- ifeq ($$(SOURCE_DATE), updated)
- # For static values of SOURCE_DATE (not "updated"), these are set in spec.gmk
- export SOURCE_DATE_EPOCH := $$(shell $$(DATE) +"%s")
- export SOURCE_DATE_ISO_8601 := $$(call EpochToISO8601, $$(SOURCE_DATE_EPOCH))
- endif
- endef
-
- # Parse COMPARE_BUILD into COMPARE_BUILD_*
- # Syntax: COMPARE_BUILD=CONF=:PATCH=:
- # MAKE=:COMP_OPTS=:
- # COMP_DIR=|:
- # FAIL=
- # If neither CONF or PATCH is given, assume means CONF if it
- # begins with "--", otherwise assume it means PATCH.
- # MAKE and COMP_OPTS can only be used with CONF and/or PATCH specified.
- # If any value contains "+", it will be replaced by space.
- # FAIL can be set to false to have the return value of compare be ignored.
- define ParseCompareBuild
- ifneq ($$(COMPARE_BUILD), )
- COMPARE_BUILD_OUTPUTDIR := $(topdir)/build/compare-build/$(CONF_NAME)
- COMPARE_BUILD_FAIL := true
-
- ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
- $$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
- $$(if $$(filter PATCH=%, $$(part)), \
- $$(eval COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(part)))) \
- ) \
- $$(if $$(filter CONF=%, $$(part)), \
- $$(eval COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \
- ) \
- $$(if $$(filter MAKE=%, $$(part)), \
- $$(eval COMPARE_BUILD_MAKE = $$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \
- ) \
- $$(if $$(filter COMP_OPTS=%, $$(part)), \
- $$(eval COMPARE_BUILD_COMP_OPTS = $$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \
- ) \
- $$(if $$(filter COMP_DIR=%, $$(part)), \
- $$(eval COMPARE_BUILD_COMP_DIR = $$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \
- ) \
- $$(if $$(filter FAIL=%, $$(part)), \
- $$(eval COMPARE_BUILD_FAIL = $$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
- ) \
- $$(if $$(filter NODRYRUN=%, $$(part)), \
- $$(eval COMPARE_BUILD_NODRYRUN = $$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
- ) \
- )
- else
- # Separate handling for single field case, to allow for spaces in values.
- ifneq ($$(filter PATCH=%, $$(COMPARE_BUILD)), )
- COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD)))
- else ifneq ($$(filter CONF=%, $$(COMPARE_BUILD)), )
- COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD))))
- else ifneq ($$(filter --%, $$(COMPARE_BUILD)), )
- # Assume CONF if value begins with --
- COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(COMPARE_BUILD)))
- else
- # Otherwise assume patch file
- COMPARE_BUILD_PATCH = $$(strip $$(COMPARE_BUILD))
- endif
- endif
- ifneq ($$(COMPARE_BUILD_PATCH), )
- ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), )
- # Assume relative path, if file exists
- COMPARE_BUILD_PATCH := $$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH))
- else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
- $$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
- endif
- ifneq ($$(COMPARE_BUILD_NODRYRUN), true)
- PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
- ifeq ($$(PATCH_DRY_RUN), FAILED)
- $$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
- endif
- endif
- endif
- ifneq ($$(COMPARE_BUILD_FAIL), true)
- COMPARE_BUILD_IGNORE_RESULT := || true
- endif
- endif
- endef
-
- # Prepare for a comparison rebuild
- define PrepareCompareBuild
+# Prepare for a comparison rebuild
+define PrepareCompareBuild
$(ECHO) "Preparing for comparison rebuild"
# Apply patch, if any
- $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
+ $(if $(COMPARE_BUILD_PATCH), cd $(WORKSPACE_ROOT) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
# Move the first build away temporarily
- $(RM) -r $(topdir)/build/.compare-build-temp
- $(MKDIR) -p $(topdir)/build/.compare-build-temp
- $(MV) $(OUTPUTDIR) $(topdir)/build/.compare-build-temp
+ $(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp
+ $(MKDIR) -p $(WORKSPACE_ROOT)/build/.compare-build-temp
+ $(MV) $(OUTPUTDIR) $(WORKSPACE_ROOT)/build/.compare-build-temp
# Restore an old compare-build, or create a new compare-build directory.
if test -d $(COMPARE_BUILD_OUTPUTDIR); then \
$(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \
@@ -422,23 +140,23 @@ else # $(HAS_SPEC)=true
# Re-run configure with the same arguments (and possibly some additional),
# must be done after patching.
( cd $(CONFIGURE_START_DIR) && PATH="$(ORIGINAL_PATH)" \
- $(BASH) $(topdir)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
- endef
+ $(BASH) $(WORKSPACE_ROOT)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
+endef
- # Cleanup after a compare build
- define CleanupCompareBuild
+# Cleanup after a compare build
+define CleanupCompareBuild
# If running with a COMPARE_BUILD patch, reverse-apply it, but continue
# even if that fails (can happen with removed files).
- $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true)
+ $(if $(COMPARE_BUILD_PATCH), cd $(WORKSPACE_ROOT) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true)
# Move this build away and restore the original build
- $(MKDIR) -p $(topdir)/build/compare-build
+ $(MKDIR) -p $(WORKSPACE_ROOT)/build/compare-build
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
- $(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
- $(RM) -r $(topdir)/build/.compare-build-temp
- endef
+ $(MV) $(WORKSPACE_ROOT)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
+ $(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp
+endef
- # Do the actual comparison of two builds
- define CompareBuildDoComparison
+# Do the actual comparison of two builds
+define CompareBuildDoComparison
# Compare first and second build. Ignore any error code from compare.sh.
$(ECHO) "Comparing between comparison rebuild (this/new) and baseline (other/old)"
$(if $(COMPARE_BUILD_COMP_DIR), \
@@ -448,9 +166,9 @@ else # $(HAS_SPEC)=true
+(cd $(COMPARE_BUILD_OUTPUTDIR) && ./compare.sh --diffs $(COMPARE_BUILD_COMP_OPTS) \
-o $(OUTPUTDIR) $(COMPARE_BUILD_IGNORE_RESULT)) \
)
- endef
+endef
- define PrintFailureReports
+define PrintFailureReports
$(if $(filter none, $(LOG_REPORT)), , \
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
@@ -472,9 +190,9 @@ else # $(HAS_SPEC)=true
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
) \
)
- endef
+endef
- define PrintBuildLogFailures
+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" ; \
@@ -487,96 +205,96 @@ else # $(HAS_SPEC)=true
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
)
- endef
+endef
- define RotateLogFiles
+define RotateLogFiles
$(RM) $(BUILD_LOG).old 2> /dev/null && \
$(MV) $(BUILD_LOG) $(BUILD_LOG).old 2> /dev/null || true
$(if $(findstring true, $(LOG_PROFILE_TIMES_FILE)), \
$(RM) $(BUILD_PROFILE_LOG).old 2> /dev/null && \
$(MV) $(BUILD_PROFILE_LOG) $(BUILD_PROFILE_LOG).old 2> /dev/null || true \
)
- endef
+endef
- # Failure logs are only supported for "parallel" main targets, not the
- # (trivial) sequential make targets (such as clean and reconfigure),
- # since the failure-logs directory creation will conflict with clean.
- # We also make sure the javatmp directory exists, which is needed if a java
- # process (like javac) is using java.io.tmpdir.
- define PrepareFailureLogs
+# Failure logs are only supported for "parallel" main targets, not the
+# (trivial) sequential make targets (such as clean and reconfigure),
+# since the failure-logs directory creation will conflict with clean.
+# We also make sure the javatmp directory exists, which is needed if a java
+# process (like javac) is using java.io.tmpdir.
+define PrepareFailureLogs
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs
$(MKDIR) -p $(JAVA_TMP_DIR)
$(RM) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error 2> /dev/null
- endef
+endef
- # Remove any javac server logs and port files. This
- # prevents a new make run to reuse the previous servers.
- define PrepareJavacServer
+# Remove any javac server logs and port files. This
+# prevents a new make run to reuse the previous servers.
+define PrepareJavacServer
$(if $(JAVAC_SERVER_DIR), \
$(RM) -r $(JAVAC_SERVER_DIR) 2> /dev/null && \
$(MKDIR) -p $(JAVAC_SERVER_DIR) \
)
- endef
+endef
- define CleanupJavacServer
+define CleanupJavacServer
[ -f $(JAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping javac server && \
$(TOUCH) $(JAVAC_SERVER_DIR)/server.port.stop; true
- endef
+endef
- ifeq ($(call isBuildOs, windows), true)
- # On windows we need to synchronize with the javac server to be able to
- # move or remove the build output directory. Since we have no proper
- # synchronization process, wait for a while and hope it helps. This is only
- # used by build comparisons.
+ifeq ($(call isBuildOs, windows), true)
+ # On windows we need to synchronize with the javac server to be able to
+ # move or remove the build output directory. Since we have no proper
+ # synchronization process, wait for a while and hope it helps. This is only
+ # used by build comparisons.
define WaitForJavacServerFinish
$(if $(JAVAC_SERVER_DIR), \
sleep 5 \
)
- endef
- else
- define WaitForJavacServerFinish
- endef
- endif
+ endef
+else
+ define WaitForJavacServerFinish
+ endef
+endif
- ##############################################################################
- # Functions for timers
- ##############################################################################
+##############################################################################
+# Functions for timers
+##############################################################################
- # Store the build times in this directory.
- BUILDTIMESDIR = $(OUTPUTDIR)/make-support/build-times
+# Store the build times in this directory.
+BUILDTIMESDIR := $(OUTPUTDIR)/make-support/build-times
- # Record starting time for build of a sub repository.
- define RecordStartTime
+# Record starting time for build of a sub repository.
+define RecordStartTime
$(DATE) '+%Y %m %d %H %M %S' | $(AWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$(strip $1) && \
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$(strip $1)_human_readable
- endef
+endef
- # Record ending time and calculate the difference and store it in a
- # easy to read format. Handles builds that cross midnight. Expects
- # that a build will never take 24 hours or more.
- define RecordEndTime
+# Record ending time and calculate the difference and store it in a
+# easy to read format. Handles builds that cross midnight. Expects
+# that a build will never take 24 hours or more.
+define RecordEndTime
$(DATE) '+%Y %m %d %H %M %S' | $(AWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$(strip $1)
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$(strip $1)_human_readable
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$(strip $1)` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$(strip $1)` $1 | \
$(AWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
> $(BUILDTIMESDIR)/build_time_diff_$(strip $1)
- endef
+endef
- define StartGlobalTimer
+define StartGlobalTimer
$(RM) -r $(BUILDTIMESDIR) 2> /dev/null && \
$(MKDIR) -p $(BUILDTIMESDIR) && \
$(call RecordStartTime,TOTAL)
- endef
+endef
- define StopGlobalTimer
+define StopGlobalTimer
$(call RecordEndTime,TOTAL)
- endef
+endef
- # Find all build_time_* files and print their contents in a list sorted
- # on the name of the sub repository.
- define ReportBuildTimes
+# Find all build_time_* files and print their contents in a list sorted
+# on the name of the sub repository.
+define ReportBuildTimes
$(PRINTF) $(LOG_INFO) -- \
"----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
@@ -585,119 +303,20 @@ else # $(HAS_SPEC)=true
$(XARGS) $(CAT) | $(SORT) -k 2`" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`" \
$(BUILD_LOG_PIPE_SIMPLE)
- endef
-
- define ReportProfileTimes
- $(if $(findstring true, $(LOG_PROFILE_TIMES_LOG)), \
- [ ! -f $(BUILD_PROFILE_LOG) ] || \
- { $(ECHO) Begin $(notdir $(BUILD_PROFILE_LOG)) && \
- $(CAT) $(BUILD_PROFILE_LOG) && \
- $(ECHO) End $(notdir $(BUILD_PROFILE_LOG)); \
- } \
- $(BUILD_LOG_PIPE_SIMPLE)
- )
- endef
-
-endif # HAS_SPEC
-
-# Look for a given option in the LOG variable, and if found, set a variable
-# and remove the option from the LOG variable
-# $1: The option to look for
-# $2: The variable to set to "true" if the option is found
-define ParseLogOption
- ifneq ($$(findstring $1, $$(LOG)), )
- override $2 := true
- # First try to remove "," if it exists, otherwise just remove " "
- LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
- # We might have ended up with a leading comma. Remove it. Need override
- # since LOG is set from the command line.
- override LOG := $$(strip $$(patsubst $$(COMMA)%, %, $$(LOG_STRIPPED)))
- endif
endef
-# Look for a given option with an assignment in the LOG variable, and if found,
-# set a variable to that value and remove the option from the LOG variable
-# $1: The option to look for
-# $2: The variable to set to the value of the option, if found
-define ParseLogValue
- ifneq ($$(findstring $1=, $$(LOG)), )
- # Make words of out comma-separated list and find the one with opt=val
- value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG)))))
- override $2 := $$(value)
- # First try to remove ", " if it exists, otherwise just remove " "
- LOG_STRIPPED := $$(subst $$(strip $1)=$$(value),, \
- $$(subst $$(COMMA)$$(strip $1)=$$(value),, $$(LOG)))
- # We might have ended up with a leading comma. Remove it. Need override
- # since LOG is set from the command line.
- override LOG := $$(strip $$(patsubst $$(COMMA)%, %, $$(LOG_STRIPPED)))
- endif
+define ReportProfileTimes
+ $(if $(findstring true, $(LOG_PROFILE_TIMES_LOG)), \
+ [ ! -f $(BUILD_PROFILE_LOG) ] || \
+ { $(ECHO) Begin $(notdir $(BUILD_PROFILE_LOG)) && \
+ $(CAT) $(BUILD_PROFILE_LOG) && \
+ $(ECHO) End $(notdir $(BUILD_PROFILE_LOG)); \
+ } \
+ $(BUILD_LOG_PIPE_SIMPLE)
+ )
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
- $$(eval $$(call ParseLogOption, nofile, LOG_NOFILE))
-
- # If "cmdline" is present, print all executes "important" command lines.
- $$(eval $$(call ParseLogOption, cmdlines, LOG_CMDLINES))
-
- # If "report" is present, use non-standard reporting options at build failure.
- $$(eval $$(call ParseLogValue, report, LOG_REPORT))
- ifneq ($$(LOG_REPORT), )
- ifeq ($$(filter $$(LOG_REPORT), none all default), )
- $$(info Error: LOG=report has invalid value: $$(LOG_REPORT).)
- $$(info Valid values: LOG=report=||)
- $$(error Cannot continue)
- endif
- endif
-
- # If "profile-to-log" is present, write shell times in build log
- $$(eval $$(call ParseLogOption, profile-to-log, LOG_PROFILE_TIMES_LOG))
-
- # If "profile" is present, write shell times in separate log file
- # IMPORTANT: $(ParseLogOption profile-to-log) should go first. Otherwise
- # parsing of 'LOG=debug,profile-to-log,nofile' ends up in the following error:
- # Error: LOG contains unknown option or log level: debug-to-log.
- $$(eval $$(call ParseLogOption, profile, LOG_PROFILE_TIMES_FILE))
-
- # Treat LOG=profile-to-log as if it were LOG=profile,profile-to-log
- LOG_PROFILE_TIMES_FILE := $$(firstword $$(LOG_PROFILE_TIMES_FILE) $$(LOG_PROFILE_TIMES_LOG))
-
- override LOG_LEVEL := $$(LOG)
-
- ifeq ($$(LOG_LEVEL), )
- # Set LOG to "warn" as default if not set
- override LOG_LEVEL := warn
- endif
-
- ifeq ($$(LOG_LEVEL), warn)
- override MAKE_LOG_FLAGS := -s
- else ifeq ($$(LOG_LEVEL), info)
- override MAKE_LOG_FLAGS := -s
- else ifeq ($$(LOG_LEVEL), debug)
- override MAKE_LOG_FLAGS :=
- else ifeq ($$(LOG_LEVEL), trace)
- override MAKE_LOG_FLAGS :=
- else
- $$(info Error: LOG contains unknown option or log level: $$(LOG).)
- $$(info LOG can be [,[...]] where is nofile | cmdlines | profile | profile-to-log)
- $$(info and is warn | info | debug | trace)
- $$(error Cannot continue)
- endif
-endef
-
-MAKE_LOG_VARS = $(foreach v, \
- LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_REPORT LOG_PROFILE_TIMES_LOG \
- LOG_PROFILE_TIMES_FILE, \
- $v=$($v) \
-)
-
-endif # _INITSUPPORT_GMK
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/InterimImage.gmk b/make/InterimImage.gmk
index e046f060513..5fd685509ae 100644
--- a/make/InterimImage.gmk
+++ b/make/InterimImage.gmk
@@ -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
@@ -23,10 +23,9 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include Execute.gmk
include Modules.gmk
@@ -58,6 +57,4 @@ TARGETS += $(jlink_interim_image)
################################################################################
-all: $(TARGETS)
-
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/JrtfsJar.gmk b/make/JrtfsJar.gmk
index e1b3965ba04..54e2b094318 100644
--- a/make/JrtfsJar.gmk
+++ b/make/JrtfsJar.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,14 +23,13 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
-include JavaCompilation.gmk
include JarArchive.gmk
+include JavaCompilation.gmk
include TextFileProcessing.gmk
# This rule will be depended on due to the MANIFEST line
@@ -78,3 +77,7 @@ $(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \
))
all: $(BUILD_JRTFS_JAR)
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk
index 13b80b8e56e..f80ca1e2735 100644
--- a/make/MacBundles.gmk
+++ b/make/MacBundles.gmk
@@ -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
@@ -23,8 +23,9 @@
# questions.
#
-include $(SPEC)
-include MakeBase.gmk
+include MakeFileStart.gmk
+
+################################################################################
include CopyFiles.gmk
include TextFileProcessing.gmk
@@ -118,3 +119,7 @@ else # Not macosx
endif # macosx
.PHONY: jdk-bundle jre-bundle bundles
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/Main.gmk b/make/Main.gmk
index 7675fe6fcf7..eda3b79265a 100644
--- a/make/Main.gmk
+++ b/make/Main.gmk
@@ -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
@@ -24,44 +24,35 @@
#
################################################################################
-# This is the main makefile containing most actual top level targets. It needs
-# to be called with a SPEC file defined.
+# This is the main makefile containing most actual top level targets.
################################################################################
-# Declare default target
-default:
+# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
+# valid top level targets. It's used to declare them all as PHONY and to
+# generate the -only targets.
-ifeq ($(wildcard $(SPEC)), )
- $(error Main.gmk needs SPEC set to a proper spec.gmk)
-endif
+ALL_TARGETS :=
-# Now load the spec
-include $(SPEC)
+DEFAULT_TARGET := default-target
-# Load the vital tools for all the makefiles.
-include $(TOPDIR)/make/common/MakeBase.gmk
-include $(TOPDIR)/make/common/Modules.gmk
-include $(TOPDIR)/make/common/FindTests.gmk
+include MakeFileStart.gmk
+
+################################################################################
include $(TOPDIR)/make/MainSupport.gmk
+include FindTests.gmk
+include Modules.gmk
+
# Are we requested to ignore dependencies?
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
DEPS := none
endif
-# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
-# valid top level targets. It's used to declare them all as PHONY and to
-# generate the -only targets.
-ALL_TARGETS :=
-
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Main.gmk))
# All modules for the current target platform.
ALL_MODULES := $(call FindAllModules)
-################################################################################
################################################################################
#
# Recipes for all targets. Only recipes, dependencies are declared later.
@@ -356,6 +347,14 @@ $(eval $(call SetupTarget, vscode-project-ccls, \
DEPS := compile-commands, \
))
+################################################################################
+# IDEA IntelliJ projects
+
+$(eval $(call SetupTarget, idea-gen-config, \
+ MAKEFILE := ide/idea/jdk/IdeaGenConfig, \
+ ARGS := IDEA_OUTPUT="$(IDEA_OUTPUT)" MODULES="$(MODULES)", \
+))
+
################################################################################
# Build demos targets
@@ -754,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, \
@@ -1282,7 +1292,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
@@ -1310,10 +1321,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
@@ -1334,7 +1342,7 @@ ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-static-libs \
# Traditional targets typically run by users.
# These can be considered aliases for the targets now named by a more
# "modern" naming scheme.
-default: $(DEFAULT_MAKE_TARGET)
+default-target: $(DEFAULT_MAKE_TARGET)
jdk: exploded-image
images: product-images
docs: docs-image
@@ -1369,7 +1377,6 @@ ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \
test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \
test-jdk-jtreg-native test-docs
-################################################################################
################################################################################
#
# Clean targets
@@ -1475,13 +1482,12 @@ print-tests:
create-main-targets-include:
$(call LogInfo, Generating main target list)
+ $(call MakeDir, $(MAKESUPPORT_OUTPUTDIR))
@$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
-################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Main-post.gmk))
-
.PHONY: $(ALL_TARGETS)
FRC: # Force target
+
+include MakeFileEnd.gmk
diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk
index 5a5e40d025a..f7ba4de2d53 100644
--- a/make/MainSupport.gmk
+++ b/make/MainSupport.gmk
@@ -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
@@ -23,13 +23,13 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains helper functions for Main.gmk.
################################################################################
-ifndef _MAINSUPPORT_GMK
-_MAINSUPPORT_GMK := 1
-
# Setup make rules for creating a top-level target.
# Parameter 1 is the name of the rule. This name is used as variable prefix.
#
@@ -218,4 +218,5 @@ endef
################################################################################
-endif # _MAINSUPPORT_GMK
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/ModuleTools.gmk b/make/ModuleTools.gmk
index 020e12d6e4b..3b26ce86c28 100644
--- a/make/ModuleTools.gmk
+++ b/make/ModuleTools.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,8 +23,10 @@
# questions.
#
-ifndef _MODULE_TOOLS_GMK
-_MODULE_TOOLS_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
include JavaCompilation.gmk
@@ -49,4 +51,7 @@ TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL_BUILDJDK) \
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
build.tools.jigsaw.AddPackagesAttribute
-endif # _MODULE_TOOLS_GMK
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/ModuleWrapper.gmk b/make/ModuleWrapper.gmk
index 51208432ea0..b3ddf940e00 100644
--- a/make/ModuleWrapper.gmk
+++ b/make/ModuleWrapper.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,27 +23,29 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# This makefile is called from Main.gmk, through a macro in MakeHelpers.gmk
# and wraps calls to makefiles for specific modules and build phases. Having
# this wrapper reduces the need for boilerplate code. It also provides
# opportunity for automatic copying of files to an interim exploded runnable
# image.
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
MODULE_SRC := $(TOPDIR)/src/$(MODULE)
-# All makefiles should add the targets to be built to this variable.
-TARGETS :=
+# Define the snippet for MakeSnippetStart/End
+THIS_SNIPPET := modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk
+
+include MakeSnippetStart.gmk
# Include the file being wrapped.
-include $(MAKEFILE_PREFIX).gmk
+include $(THIS_SNIPPET)
+
+include MakeSnippetEnd.gmk
ifeq ($(MAKEFILE_PREFIX), Lib)
# We need to keep track of what libraries are generated/needed by this
@@ -128,8 +130,12 @@ $(eval $(call SetupCopyFiles, COPY_CONF, \
))
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
- all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
+ TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
else
- all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
+ TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
$(COPY_INCLUDE) $(COPY_CMDS) $(COPY_MAN) $(COPY_CONF) $(LINK_LIBS_TO_LIB)
endif
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/PreInit.gmk b/make/PreInit.gmk
new file mode 100644
index 00000000000..a01971e845d
--- /dev/null
+++ b/make/PreInit.gmk
@@ -0,0 +1,223 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+# This file is the earliest part of the build bootstrap process (not counting
+# Makefile that includes it). Its main responsibility is to figure out what
+# configuration to use and pick up the corresponding SPEC file. It will then
+# call Init.gmk with this SPEC for further bootstrapping.
+################################################################################
+
+# This must be the first rule
+default:
+.PHONY: default
+
+# Inclusion of this pseudo-target will cause make to execute this file
+# serially, regardless of -j.
+.NOTPARALLEL:
+
+IS_PREINIT_ENV := true
+
+# Include our helper functions.
+include $(TOPDIR)/make/PreInitSupport.gmk
+include $(TOPDIR)/make/common/LogUtils.gmk
+
+# Here are "global" targets, i.e. targets that can be executed without having
+# 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)
+
+# Extract non-global targets that require a spec file.
+CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
+
+# If we have only global targets, or if we are called with -qp (assuming an
+# external part, e.g. bash completion, is trying to understand our targets),
+# we will skip SPEC location and the sanity checks.
+ifeq ($(CALLED_SPEC_TARGETS), )
+ SKIP_SPEC := true
+endif
+ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
+ SKIP_SPEC := true
+endif
+
+ifneq ($(SKIP_SPEC), true)
+
+ ############################################################################
+ # This is the common case: we have been called from the command line by the
+ # user with a target that should be delegated to Main.gmk, so we need to
+ # figure out a proper SPEC and call Init.gmk with it.
+ ############################################################################
+
+ # Basic checks on environment and command line.
+ $(eval $(call CheckControlVariables))
+ $(eval $(call CheckInvalidMakeFlags))
+
+ # Check that CONF_CHECK is valid.
+ $(eval $(call ParseConfCheckOption))
+
+ # Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE,
+ # MAKE_LOG_VARS and MAKE_LOG_FLAGS.
+ $(eval $(call ParseLogLevel))
+
+ # After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails).
+ $(eval $(call ParseConfAndSpec))
+
+ # Extract main targets from Main.gmk using the spec(s) provided. In theory,
+ # with multiple specs, we should find the intersection of targets provided
+ # by all specs, but we approximate this by an arbitrary spec from the list.
+ # This will setup ALL_MAIN_TARGETS.
+ $(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
+
+ # Separate called targets depending on type.
+ INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
+ MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))
+ SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS))
+ PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
+
+ MAKE_INIT_ARGS := $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common
+
+ # The spec files depend on the autoconf source code. This check makes sure
+ # the configuration is up to date after changes to configure.
+ $(SPECS): $(wildcard $(TOPDIR)/make/autoconf/*) \
+ $(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*)) \
+ $(addprefix $(TOPDIR)/make/conf/, version-numbers.conf branding.conf) \
+ $(if $(CUSTOM_CONF_DIR), $(wildcard $(addprefix $(CUSTOM_CONF_DIR)/, \
+ version-numbers.conf branding.conf)))
+ ifeq ($(CONF_CHECK), fail)
+ @echo Error: The configuration is not up to date for \
+ "'$(lastword $(subst /, , $(dir $@)))'."
+ $(call PrintConfCheckFailed)
+ @exit 2
+ else ifeq ($(CONF_CHECK), auto)
+ @echo Note: The configuration is not up to date for \
+ "'$(lastword $(subst /, , $(dir $@)))'."
+ @( cd $(TOPDIR) && \
+ $(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk SPEC=$@ \
+ reconfigure )
+ else ifeq ($(CONF_CHECK), ignore)
+ # Do nothing
+ endif
+
+ # Do not let make delete spec files even if aborted while doing a reconfigure
+ .PRECIOUS: $(SPECS)
+
+ # Unless reconfigure is explicitly called, let all main targets depend on
+ # the spec files to be up to date.
+ ifeq ($(findstring reconfigure, $(INIT_TARGETS)), )
+ $(MAIN_TARGETS): $(SPECS)
+ endif
+
+ make-info:
+ ifneq ($(findstring $(LOG_LEVEL), info debug trace), )
+ $(info Running make as '$(strip $(MAKE) $(MFLAGS) \
+ $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
+ endif
+
+ MAKE_INIT_MAIN_TARGET_ARGS := \
+ USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \
+ $(MAKE_LOG_VARS) \
+ INIT_TARGETS="$(INIT_TARGETS)" \
+ SEQUENTIAL_TARGETS="$(SEQUENTIAL_TARGETS)" \
+ PARALLEL_TARGETS="$(PARALLEL_TARGETS)"
+
+ # Now the init and main targets will be called, once for each SPEC. The
+ # recipe will be run once for every target specified, but we only want to
+ # execute the recipe a single time, hence the TARGET_DONE with a dummy
+ # command if true.
+ # The COMPARE_BUILD part implements special support for makefile development.
+ $(ALL_INIT_TARGETS) $(ALL_MAIN_TARGETS): make-info
+ @$(if $(TARGET_DONE), \
+ 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 && \
+ $(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
+ $(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
+ SPEC=$(spec) \
+ 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) \
+ COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
+ main && \
+ $(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
+ SPEC=$(spec) \
+ COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
+ post-compare-build && \
+ ) \
+ ) true ) \
+ $(eval TARGET_DONE=true) \
+ )
+
+ .PHONY: $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS)
+
+else # SKIP_SPEC=true
+
+ ############################################################################
+ # We have only global targets, or are called with -pq (from command
+ # completion). In this case we might not even have a configuration at all, but
+ # still need to handle the situation gracefully even if there is no SPEC file.
+ ############################################################################
+
+ ifeq ($(wildcard $(SPEC)), )
+ # If we have no SPEC provided, we will just make a "best effort" target list.
+ # First try to grab any available pre-existing main-targets.gmk.
+ main_targets_file := $(firstword $(wildcard $(build_dir)/*/make-support/main-targets.gmk))
+ ifneq ($(main_targets_file), )
+ # Extract the SPEC that corresponds to this main-targets.gmk file.
+ SPEC := $(patsubst %/make-support/main-targets.gmk, %/spec.gmk, $(main_targets_file))
+ else
+ # None found, pick an arbitrary SPEC for which to generate a file
+ SPEC := $(firstword $(all_spec_files))
+ endif
+ endif
+
+ ifneq ($(wildcard $(SPEC)), )
+ $(eval $(call DefineMainTargets, LAZY, $(SPEC)))
+ else
+ # If we have no configurations we can not provide any main targets.
+ ALL_MAIN_TARGETS :=
+ endif
+
+ ALL_TARGETS := $(sort $(ALL_GLOBAL_TARGETS) $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS))
+
+ # Just list all our targets.
+ $(ALL_TARGETS):
+
+ .PHONY: $(ALL_TARGETS)
+
+endif # $(SKIP_SPEC)!=true
+
+################################################################################
diff --git a/make/PreInitSupport.gmk b/make/PreInitSupport.gmk
new file mode 100644
index 00000000000..668363d8725
--- /dev/null
+++ b/make/PreInitSupport.gmk
@@ -0,0 +1,290 @@
+#
+# 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
+# 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.
+#
+
+################################################################################
+# Helper functions for PreInit.gmk, the initial part of initialization before
+# the SPEC file is loaded. Most of these functions provide parsing and setting
+# up make options from the command-line.
+################################################################################
+
+# Include the corresponding closed file, if present.
+ifneq ($(CUSTOM_MAKE_DIR), )
+ -include $(CUSTOM_MAKE_DIR)/PreInitSupport-pre.gmk
+endif
+
+# COMMA is defined in spec.gmk, but that is not included yet
+COMMA := ,
+
+# Essential control variables that are handled by PreInit.gmk or Init.gmk
+INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS CONF_CHECK ALLOW \
+ COMPARE_BUILD
+
+# All known make control variables; these are handled in other makefiles
+MAKE_CONTROL_VARIABLES += JDK_FILTER SPEC_FILTER \
+ TEST TEST_JOBS JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
+
+ALL_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) $(MAKE_CONTROL_VARIABLES)
+
+# Define a simple reverse function.
+# Should maybe move to MakeBase.gmk, but we can't include that file now.
+reverse = \
+ $(if $(strip $(1)), $(call reverse, $(wordlist 2, $(words $(1)), $(1)))) \
+ $(firstword $(1))
+
+# The variable MAKEOVERRIDES contains variable assignments from the command
+# line, but in reverse order to what the user entered.
+# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
+COMMAND_LINE_VARIABLES := $(subst §,\ , $(call reverse, $(subst \ ,§,$(MAKEOVERRIDES))))
+
+# A list like FOO="val1" BAR="val2" containing all user-supplied make
+# variables that we should propagate.
+# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
+# This explicit propagation is needed to avoid problems with characters that needs
+# escaping.
+USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(ALL_CONTROL_VARIABLES)), \
+ $(subst \ ,§,$(MAKEOVERRIDES))))
+
+# Setup information about available configurations, if any.
+ifneq ($(CUSTOM_ROOT), )
+ build_dir := $(CUSTOM_ROOT)/build
+else
+ build_dir := $(TOPDIR)/build
+endif
+all_spec_files := $(wildcard $(build_dir)/*/spec.gmk)
+# Extract the configuration names from the path
+all_confs := $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
+
+# Check for unknown command-line variables
+define CheckControlVariables
+ command_line_variables := $$(strip $$(foreach var, \
+ $$(subst \ ,_,$$(MAKEOVERRIDES)), \
+ $$(firstword $$(subst =, , $$(var)))))
+ allowed_command_line_variables := $$(strip $$(subst $$(COMMA), , $$(ALLOW)))
+ unknown_command_line_variables := $$(strip \
+ $$(filter-out $$(ALL_CONTROL_VARIABLES) $$(allowed_command_line_variables), \
+ $$(command_line_variables)))
+ ifneq ($$(unknown_command_line_variables), )
+ $$(info Note: Command line contains non-control variables:)
+ $$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
+ $$(info Make sure it is not mistyped, and that you intend to override this variable.)
+ $$(info 'make help' will list known control variables.)
+ $$(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
+ # MAKEFLAGS only indicate -j if read in a recipe (!)
+ $$(TOPDIR)/make/PreInit.gmk: .FORCE
+ $$(if $$(findstring --jobserver, $$(MAKEFLAGS)), \
+ $$(info Error: 'make -jN' is not supported, use 'make JOBS=N') \
+ $$(error Cannot continue) \
+ )
+ .FORCE:
+ .PHONY: .FORCE
+endef
+
+# Check that the CONF_CHECK option is valid and set up handling
+define ParseConfCheckOption
+ ifeq ($$(CONF_CHECK), )
+ # Default behavior is fail
+ CONF_CHECK := fail
+ else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)), )
+ $$(info Error: CONF_CHECK must be one of: auto, fail or ignore.)
+ $$(error Cannot continue)
+ endif
+endef
+
+define ParseConfAndSpec
+ ifneq ($$(origin SPEC), undefined)
+ # We have been given a SPEC, check that it works out properly
+ ifneq ($$(origin CONF), undefined)
+ # We also have a CONF argument. We can't have both.
+ $$(info Error: Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
+ $$(error Cannot continue)
+ endif
+ ifneq ($$(origin CONF_NAME), undefined)
+ # We also have a CONF_NAME argument. We can't have both.
+ $$(info Error: Cannot use CONF_NAME=$$(CONF_NAME) and SPEC=$$(SPEC) at the same time. Choose one.)
+ $$(error Cannot continue)
+ endif
+ ifeq ($$(wildcard $$(SPEC)), )
+ $$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
+ $$(error Cannot continue)
+ endif
+ ifeq ($$(filter /%, $$(SPEC)), )
+ # If given with relative path, make it absolute
+ SPECS := $$(CURDIR)/$$(strip $$(SPEC))
+ else
+ SPECS := $$(SPEC)
+ endif
+
+ # For now, unset this SPEC variable.
+ override SPEC :=
+ else
+ # Use spec.gmk files in the build output directory
+ ifeq ($$(all_spec_files), )
+ ifneq ($(CUSTOM_ROOT), )
+ $$(info Error: No configurations found for $$(CUSTOM_ROOT).)
+ else
+ $$(info Error: No configurations found for $$(TOPDIR).)
+ endif
+ $$(info Please run 'bash configure' to create a configuration.)
+ $$(info )
+ $$(error Cannot continue)
+ endif
+
+ ifneq ($$(origin CONF_NAME), undefined)
+ ifneq ($$(origin CONF), undefined)
+ # We also have a CONF argument. We can't have both.
+ $$(info Error: Cannot use CONF=$$(CONF) and CONF_NAME=$$(CONF_NAME) at the same time. Choose one.)
+ $$(error Cannot continue)
+ endif
+ matching_conf := $$(strip $$(filter $$(CONF_NAME), $$(all_confs)))
+ ifeq ($$(matching_conf), )
+ $$(info Error: No configurations found matching CONF_NAME=$$(CONF_NAME).)
+ $$(info Available configurations in $$(build_dir):)
+ $$(foreach var, $$(all_confs), $$(info * $$(var)))
+ $$(error Cannot continue)
+ else ifneq ($$(words $$(matching_conf)), 1)
+ $$(info Error: Matching more than one configuration CONF_NAME=$$(CONF_NAME).)
+ $$(info Available configurations in $$(build_dir):)
+ $$(foreach var, $$(all_confs), $$(info * $$(var)))
+ $$(error Cannot continue)
+ else
+ $$(info Building configuration '$$(matching_conf)' (matching CONF_NAME=$$(CONF_NAME)))
+ endif
+ # Create a SPEC definition. This will contain the path to exactly one spec file.
+ SPECS := $$(build_dir)/$$(matching_conf)/spec.gmk
+ else ifneq ($$(origin CONF), undefined)
+ # User have given a CONF= argument.
+ ifeq ($$(CONF), )
+ # If given CONF=, match all configurations
+ matching_confs := $$(strip $$(all_confs))
+ else
+ # Otherwise select those that contain the given CONF string
+ ifeq ($$(patsubst !%,,$$(CONF)), )
+ # A CONF starting with ! means we should negate the search term
+ matching_confs := $$(strip $$(foreach var, $$(all_confs), \
+ $$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
+ else
+ matching_confs := $$(strip $$(foreach var, $$(all_confs), \
+ $$(if $$(findstring $$(CONF), $$(var)), $$(var))))
+ endif
+ ifneq ($$(filter $$(CONF), $$(matching_confs)), )
+ ifneq ($$(word 2, $$(matching_confs)), )
+ # Don't repeat this output on make restarts caused by including
+ # generated files.
+ ifeq ($$(MAKE_RESTARTS), )
+ $$(info Using exact match for CONF=$$(CONF) (other matches are possible))
+ endif
+ endif
+ # If we found an exact match, use that
+ matching_confs := $$(CONF)
+ endif
+ endif
+ ifeq ($$(matching_confs), )
+ $$(info Error: No configurations found matching CONF=$$(CONF).)
+ $$(info Available configurations in $$(build_dir):)
+ $$(foreach var, $$(all_confs), $$(info * $$(var)))
+ $$(error Cannot continue)
+ else
+ # Don't repeat this output on make restarts caused by including
+ # generated files.
+ ifeq ($$(MAKE_RESTARTS), )
+ ifeq ($$(words $$(matching_confs)), 1)
+ ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
+ $$(info Building configuration '$$(matching_confs)' (matching CONF=$$(CONF)))
+ endif
+ else
+ $$(info Building these configurations (matching CONF=$$(CONF)):)
+ $$(foreach var, $$(matching_confs), $$(info * $$(var)))
+ endif
+ endif
+ endif
+
+ # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
+ SPECS := $$(addsuffix /spec.gmk, $$(addprefix $$(build_dir)/, $$(matching_confs)))
+ else
+ # No CONF or SPEC given, check the available configurations
+ ifneq ($$(words $$(all_spec_files)), 1)
+ $$(info Error: No CONF given, but more than one configuration found.)
+ $$(info Available configurations in $$(build_dir):)
+ $$(foreach var, $$(all_confs), $$(info * $$(var)))
+ $$(info Please retry building with CONF= (or SPEC=).)
+ $$(info )
+ $$(error Cannot continue)
+ endif
+
+ # We found exactly one configuration, use it
+ SPECS := $$(strip $$(all_spec_files))
+ endif
+ endif
+endef
+
+# Extract main targets from Main.gmk using the spec provided in $2.
+#
+# Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
+# Param 2: The SPEC file to use.
+define DefineMainTargets
+
+ # 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
+
+ ifeq ($$(MAKE_RESTARTS), )
+ # Only do this if make has not been restarted, and if we do not force it.
+ ifeq ($(strip $1), FORCE)
+ $$(shell rm -f $$(main_targets_file))
+ endif
+ endif
+
+ $$(main_targets_file):
+ @( cd $$(TOPDIR) && \
+ $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
+ -I $$(TOPDIR)/make/common SPEC=$(strip $2) )
+ @( cd $$(TOPDIR) && \
+ $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \
+ -I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \
+ $$(MAKE_LOG_VARS) \
+ create-main-targets-include )
+
+ # Now include main-targets.gmk. This will define ALL_MAIN_TARGETS.
+ -include $$(main_targets_file)
+endef
+
+define PrintConfCheckFailed
+ @echo ' '
+ @echo "Please rerun configure! Easiest way to do this is by running"
+ @echo "'make reconfigure'."
+ @echo "This behavior may also be changed using CONF_CHECK=."
+ @echo ' '
+endef
+
+################################################################################
diff --git a/make/ReleaseFile.gmk b/make/ReleaseFile.gmk
index dc6f66a69a2..4204dfc76d5 100644
--- a/make/ReleaseFile.gmk
+++ b/make/ReleaseFile.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2023, 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
@@ -23,16 +23,12 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
+include MakeFileStart.gmk
################################################################################
# This makefile generates the "release" file into the exploded image. Jlink is
# then responsible for using this as the base for release files in each linked
# image.
-#
################################################################################
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
@@ -85,10 +81,4 @@ TARGETS += $(BASE_RELEASE_FILE)
################################################################################
-$(eval $(call IncludeCustomExtension, ReleaseFile.gmk))
-
-################################################################################
-
-all: $(TARGETS)
-
-.PHONY: all default
+include MakeFileEnd.gmk
diff --git a/make/RunTests.gmk b/make/RunTests.gmk
index 636d1ed18b2..b9fd3e755d1 100644
--- a/make/RunTests.gmk
+++ b/make/RunTests.gmk
@@ -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
@@ -23,10 +23,10 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
include FindTests.gmk
# We will always run multiple tests serially
@@ -71,9 +71,6 @@ ifeq ($(call isTargetOs, windows), true)
endif
endif
-################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, RunTests.gmk))
################################################################################
# This is the JDK that we will test
@@ -108,8 +105,8 @@ ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
#
endif
-GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \
- $(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
+GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher$(EXECUTABLE_SUFFIX), %, \
+ $(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher$(EXECUTABLE_SUFFIX)))
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, \
$(GTEST_LAUNCHER_DIRS)))
@@ -530,21 +527,34 @@ 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_SKIPPED := $$(shell $$(AWK) \
+ '/YOU HAVE [0-9]+ DISABLED TEST/ { \
+ if (match($$$$0, /[0-9]+/, arr)) { \
+ print arr[0]; \
+ found=1; \
+ } \
+ } \
+ END { if (!found) print 0; }' \
+ $$($1_RESULT_FILE))) \
$$(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))) \
+ $$(eval $1_TOTAL := $$(shell \
+ $$(EXPR) $$($1_RUN) + $$($1_SKIPPED))) \
, \
$$(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
+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
- $1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))
+ # 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)
+ $$(call MakeDir, $$($1_AOT_JDK_OUTPUT_DIR))
- $(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 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
@@ -926,6 +942,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 +967,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
@@ -1034,23 +1054,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) \
@@ -1109,8 +1170,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)')
@@ -1120,6 +1179,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 \
))
@@ -1229,8 +1289,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]')) \
@@ -1242,15 +1302,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) ==============================
@@ -1353,4 +1413,8 @@ endif
all: run-test
-.PHONY: default all $(TARGETS)
+.PHONY: $(TARGETS)
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/RunTestsPrebuilt.gmk b/make/RunTestsPrebuilt.gmk
index 95ad239e846..ba9731789b0 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
@@ -24,9 +24,11 @@
#
################################################################################
-# Initial bootstrapping, copied and stripped down from Makefile and Init.gmk
+# Initial bootstrapping, copied and stripped down from Makefile and PreInit.gmk.
################################################################################
+IS_PREINIT_ENV := true
+
# In Cygwin, the MAKE variable gets prepended with the current directory if the
# make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe).
ifneq ($(findstring :, $(MAKE)), )
@@ -57,7 +59,7 @@ TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
define SetupVariable
ifeq ($$($1), )
ifeq ($2, )
- $$(info Error: Prebuilt variable $1 is missing, needed for run-tests-prebuilt)
+ $$(info Error: Prebuilt variable $1 is missing, needed for test-prebuilt)
$$(error Cannot continue.)
else ifeq ($2, OPTIONAL)
ifneq ($$(findstring $$(LOG), info debug trace), )
@@ -135,10 +137,9 @@ $(eval $(call SetupVariable,JIB_JAR,OPTIONAL))
# can include the prebuilt spec file ourselves, without an ephemeral spec
# wrapper. This is required so we can include MakeBase which is needed for
# CreateNewSpec.
-HAS_SPEC :=
-include $(TOPDIR)/make/InitSupport.gmk
+include $(TOPDIR)/make/PreInitSupport.gmk
+include $(TOPDIR)/make/common/LogUtils.gmk
-$(eval $(call CheckDeprecatedEnvironment))
$(eval $(call CheckInvalidMakeFlags))
$(eval $(call ParseLogLevel))
@@ -245,7 +246,7 @@ endif
# Now we can include additional custom support.
# This might define CUSTOM_NEW_SPEC_LINE
ifneq ($(CUSTOM_MAKE_DIR), )
- include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt.gmk
+ include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt-pre.gmk
endif
NEW_SPEC := $(OUTPUTDIR)/run-test-spec.gmk
@@ -295,13 +296,10 @@ test-prebuilt:
# is unfortunately not available at this point.
$(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs)
@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
- # The lazy initialization of the cache file in FindTests.gmk does not
- # always work with RunTests.gmk. To guarantee that the jtreg test groups
- # are always found and parsed, call FindTests.gmk stand alone once
- # before calling RunTests.gmk.
- @cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/common/FindTests.gmk \
- SPEC=$(SPEC) FINDTESTS_STAND_ALONE=true
- @cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
+ # We need to fill the FindTest cache before entering RunTests.gmk.
+ @cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) SPEC=$(SPEC) \
+ -f GenerateFindTests.gmk
+ @cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
TEST="$(TEST)"
test-prebuilt-with-exit-code: test-prebuilt
diff --git a/make/SourceRevision.gmk b/make/SourceRevision.gmk
index 79c438987f7..285aaae17b5 100644
--- a/make/SourceRevision.gmk
+++ b/make/SourceRevision.gmk
@@ -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
@@ -23,10 +23,7 @@
# questions.
#
-include $(SPEC)
-include MakeBase.gmk
-
-$(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk))
+include MakeFileStart.gmk
################################################################################
# Keep track of what source revision is used to create the build, by creating
@@ -38,6 +35,7 @@ $(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk))
# bundle. As a part of creating this source bundle, the current SCM revisions of
# all repos will be stored in a file in the top dir, which is then used when
# creating the tracker file.
+################################################################################
STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev
@@ -156,10 +154,6 @@ endif
################################################################################
-$(eval $(call IncludeCustomExtension, SourceRevision-post.gmk))
-
-################################################################################
-
store-source-revision: $(STORE_SOURCE_REVISION_TARGET)
create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET)
@@ -167,3 +161,7 @@ create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET)
FRC: # Force target
.PHONY: store-source-revision create-source-revision-tracker
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/StaticLibs.gmk b/make/StaticLibs.gmk
index d54c67b50b3..3cf2a4dd136 100644
--- a/make/StaticLibs.gmk
+++ b/make/StaticLibs.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024, 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
@@ -23,15 +23,15 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include DebugInfoUtils.gmk
include Modules.gmk
include modules/LauncherCommon.gmk
+include Execute.gmk
################################################################################
#
@@ -67,10 +67,12 @@ else ifeq ($(call isTargetOs, windows), true)
BROKEN_STATIC_LIBS += splashscreen
# libsspi_bridge has name conflicts with sunmscapi
BROKEN_STATIC_LIBS += sspi_bridge
- # These libs define DllMain which conflict with Hotspot
- BROKEN_STATIC_LIBS += awt dt_shmem dt_socket
- # These libs are dependent on any of the above disabled libs
- BROKEN_STATIC_LIBS += fontmanager jawt lcms net nio
+ # 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), \
@@ -102,12 +104,25 @@ 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
$(eval $(call SetupBuildLauncher, java, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
+ ENABLE_ARG_FILES := true, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
OPTIMIZATION := HIGH, \
@@ -120,6 +135,9 @@ $(eval $(call SetupBuildLauncher, java, \
))
$(java): $(STATIC_LIB_FILES)
+ifeq ($(call isTargetOs, aix), true)
+ $(java): $(STATIC_LIB_EXPORT_FILES)
+endif
TARGETS += $(java)
@@ -186,6 +204,8 @@ static-jdk-image: $(copy-from-jdk-image) $(copy-static-launcher) $(copy-static-l
TARGETS += static-jdk-image
-all: $(TARGETS)
+.PHONY: static-launcher static-jdk-image
-.PHONY: all static-launcher static-jdk-image
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/StaticLibsImage.gmk b/make/StaticLibsImage.gmk
index 6a181ff262f..1f50c5b7f1b 100644
--- a/make/StaticLibsImage.gmk
+++ b/make/StaticLibsImage.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2019, 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
@@ -23,13 +23,12 @@
# questions.
#
+include MakeFileStart.gmk
+
+################################################################################
# This makefile creates an image of the optional static versions of certain JDK
# libraries.
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include Modules.gmk
@@ -38,8 +37,6 @@ ALL_MODULES = $(call FindAllModules)
################################################################################
-TARGETS :=
-
ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
IMAGE_DEST_DIR = $(STATIC_LIBS_IMAGE_DIR)/lib
else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), )
@@ -72,11 +69,9 @@ ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
)
endif
-################################################################################
-
static-libs-image: $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS) $(STATIC_LIBS_TARGETS)
static-libs-graal-image: $(STATIC_LIBS_TARGETS)
-all: $(TARGETS)
+################################################################################
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/TestImage.gmk b/make/TestImage.gmk
index 5c788a8d0a6..869cce1d558 100644
--- a/make/TestImage.gmk
+++ b/make/TestImage.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
@@ -23,13 +23,7 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, TestImage-pre.gmk))
+include MakeFileStart.gmk
################################################################################
@@ -54,4 +48,8 @@ TARGETS += $(BUILD_INFO_PROPERTIES) $(README)
prepare-test-image: $(TARGETS)
all: prepare-test-image
-.PHONY: default all prepare-test-image
+.PHONY: prepare-test-image
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/ToolsHotspot.gmk b/make/ToolsHotspot.gmk
index f53d851c0b7..60ef0f2e35e 100644
--- a/make/ToolsHotspot.gmk
+++ b/make/ToolsHotspot.gmk
@@ -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
@@ -23,8 +23,10 @@
# questions.
#
-ifndef _TOOLS_HOTSPOT_GMK
-_TOOLS_HOTSPOT_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
include JavaCompilation.gmk
@@ -44,4 +46,5 @@ TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \
################################################################################
-endif # _TOOLS_HOTSPOT_GMK
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/ToolsJdk.gmk b/make/ToolsJdk.gmk
index 98287473f3e..f301ddb53d1 100644
--- a/make/ToolsJdk.gmk
+++ b/make/ToolsJdk.gmk
@@ -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
@@ -23,14 +23,13 @@
# questions.
#
-ifndef _TOOLS_GMK
-_TOOLS_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
include JavaCompilation.gmk
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, Tools.gmk))
-
################################################################################
# To avoid reevaluating the compilation setup for the tools each time this file
# is included, the actual compilation is handled by CompileTools.gmk. The
@@ -137,7 +136,5 @@ PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpa
################################################################################
-# Hook to include the corresponding custom post file, if present.
-$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk))
-
-endif # _TOOLS_GMK
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/ToolsLangtools.gmk b/make/ToolsLangtools.gmk
index 86fb364a7cd..4146652bf8b 100644
--- a/make/ToolsLangtools.gmk
+++ b/make/ToolsLangtools.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,11 +23,10 @@
# questions.
#
-# This must be the first rule
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
include JavaCompilation.gmk
################################################################################
@@ -43,3 +42,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \
))
all: $(BUILD_TOOLS_LANGTOOLS)
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/UpdateBuildDocs.gmk b/make/UpdateBuildDocs.gmk
index 7fed72e7311..b507789489f 100644
--- a/make/UpdateBuildDocs.gmk
+++ b/make/UpdateBuildDocs.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, 2019, 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
@@ -23,17 +23,14 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include ProcessMarkdown.gmk
+include MakeFileStart.gmk
################################################################################
# This makefile updates the generated build html documentation.
-#
################################################################################
+include ProcessMarkdown.gmk
+
ifeq ($(ENABLE_PANDOC), false)
$(info No pandoc executable was detected by configure)
$(error Cannot continue)
@@ -55,10 +52,4 @@ TARGETS += $(md_docs)
################################################################################
-$(eval $(call IncludeCustomExtension, UpdateBuildDocs.gmk))
-
-################################################################################
-
-all: $(TARGETS)
-
-.PHONY: all default
+include MakeFileEnd.gmk
diff --git a/make/UpdateSleefSource.gmk b/make/UpdateSleefSource.gmk
index 37a28abcb85..c7fdfdb41d9 100644
--- a/make/UpdateSleefSource.gmk
+++ b/make/UpdateSleefSource.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024, 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
@@ -23,15 +23,7 @@
# questions.
#
-################################################################################
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-include CopyFiles.gmk
-include Execute.gmk
+include MakeFileStart.gmk
################################################################################
# This file is responsible for updating the generated sleef source code files
@@ -40,6 +32,9 @@ include Execute.gmk
# updated from upstream.
################################################################################
+include CopyFiles.gmk
+include Execute.gmk
+
ifneq ($(COMPILE_TYPE), cross)
$(error Only cross-compilation of libsleef is currently supported)
endif
@@ -148,6 +143,4 @@ TARGETS := $(copy_generated_sleef_source)
################################################################################
-all: $(TARGETS)
-
-.PHONY: all default
+include MakeFileEnd.gmk
diff --git a/make/UpdateX11Wrappers.gmk b/make/UpdateX11Wrappers.gmk
index f6f43ac2b53..3ff2fc148fb 100644
--- a/make/UpdateX11Wrappers.gmk
+++ b/make/UpdateX11Wrappers.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2024, 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
@@ -23,15 +23,7 @@
# questions.
#
-################################################################################
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include Execute.gmk
-include JdkNativeCompilation.gmk
-include ToolsJdk.gmk
+include MakeFileStart.gmk
################################################################################
# This file is responsible for extracting the x11 native struct offsets to
@@ -43,6 +35,10 @@ include ToolsJdk.gmk
# GensrcX11Wrappers.gmk to generate the Java code during the build.
################################################################################
+include Execute.gmk
+include JdkNativeCompilation.gmk
+include $(TOPDIR)/make/ToolsJdk.gmk
+
ifeq ($(COMPILE_TYPE), cross)
$(error It is not possible to update the x11wrappers when cross-compiling)
endif
@@ -108,6 +104,4 @@ TARGETS += $(run_wrappergen) wrapper-information
################################################################################
-all: $(TARGETS)
-
-.PHONY: all default
+include MakeFileEnd.gmk
diff --git a/make/ZipSecurity.gmk b/make/ZipSecurity.gmk
index 08f9caadd9a..fa5e4125290 100644
--- a/make/ZipSecurity.gmk
+++ b/make/ZipSecurity.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,10 +23,10 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
include ZipArchive.gmk
################################################################################
@@ -100,6 +100,4 @@ endif
################################################################################
-all: $(TARGETS)
-
-.PHONY: default all
+include MakeFileEnd.gmk
diff --git a/make/ZipSource.gmk b/make/ZipSource.gmk
index c1df6af7583..519339f2078 100644
--- a/make/ZipSource.gmk
+++ b/make/ZipSource.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,19 +23,16 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
include Modules.gmk
include ZipArchive.gmk
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, ZipSource.gmk))
-
################################################################################
# Create the directory structure for src.zip using symlinks.
# //.java
@@ -95,8 +92,8 @@ zip: $(SRC_ZIP_SRCS)
TARGETS += zip
+.PHONY: zip
+
################################################################################
-all: $(TARGETS)
-
-.PHONY: default all zip
+include MakeFileEnd.gmk
diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4
index f574174a12e..6daba35547b 100644
--- a/make/autoconf/basic.m4
+++ b/make/autoconf/basic.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,18 +75,25 @@ 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
# We get the top-level directory from the supporting wrappers.
BASIC_WINDOWS_VERIFY_DIR($TOPDIR, source)
+ orig_topdir="$TOPDIR"
UTIL_FIXUP_PATH(TOPDIR)
AC_MSG_CHECKING([for top-level directory])
AC_MSG_RESULT([$TOPDIR])
+ if test "x$TOPDIR" != "x$orig_topdir"; then
+ AC_MSG_WARN([Your top dir was originally represented as $orig_topdir,])
+ AC_MSG_WARN([but after rewriting it became $TOPDIR.])
+ AC_MSG_WARN([This typically means you have characters like space in the path, which can cause all kind of trouble.])
+ fi
AC_SUBST(TOPDIR)
if test "x$CUSTOM_ROOT" != x; then
@@ -543,9 +550,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
diff --git a/make/autoconf/basic_tools.m4 b/make/autoconf/basic_tools.m4
index eceb0ae6cc4..eac14207b1d 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)
diff --git a/make/autoconf/build-aux/config.guess b/make/autoconf/build-aux/config.guess
index afdf7cb5f92..ce9fb6cd16f 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/configure.ac b/make/autoconf/configure.ac
index 66809127a75..fffe17daad8 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,11 @@ 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
################################################################################
#
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index d33f1885922..374ee1851a5 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.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
@@ -235,9 +235,10 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
# Additional warnings that are not activated by -Wall and -Wextra
- WARNINGS_ENABLE_ADDITIONAL="-Wpointer-arith -Wreturn-type -Wsign-compare \
- -Wtrampolines -Wundef -Wunused-const-variable=1 -Wunused-function \
- -Wunused-result -Wunused-value -Wtype-limits -Wuninitialized"
+ WARNINGS_ENABLE_ADDITIONAL="-Winvalid-pch -Wpointer-arith -Wreturn-type \
+ -Wsign-compare -Wtrampolines -Wtype-limits -Wundef -Wuninitialized \
+ -Wunused-const-variable=1 -Wunused-function -Wunused-result \
+ -Wunused-value"
WARNINGS_ENABLE_ADDITIONAL_CXX="-Woverloaded-virtual -Wreorder"
WARNINGS_ENABLE_ALL_CFLAGS="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL"
WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX"
@@ -277,7 +278,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
[
# bounds, memory and behavior checking options
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
case $DEBUG_LEVEL in
release )
# no adjustment
@@ -346,7 +347,7 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_DEBUG="-Od"
C_O_FLAG_DEBUG_JVM=""
C_O_FLAG_NONE="-Od"
- C_O_FLAG_SIZE="-Os"
+ C_O_FLAG_SIZE="-O1"
fi
# Now copy to C++ flags
@@ -481,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
@@ -516,12 +527,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
fi
- if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
- # clang compiler on aix needs -ffunction-sections
- TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno -fstack-protector"
- TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char -fstack-protector"
- fi
-
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-fvisibility=hidden -pipe -fstack-protector"
@@ -541,7 +546,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Restrict the debug information created by Clang to avoid
# too big object files and speed the build up a little bit
# (see http://llvm.org/bugs/show_bug.cgi?id=7554)
- TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info -fstack-protector"
# In principle the stack alignment below is cpu- and ABI-dependent and
# should agree with values of StackAlignmentInBytes in various
@@ -559,13 +564,19 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JDK="-pipe"
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
fi
- TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden"
+
+ if test "x$OPENJDK_TARGET_OS" = xaix; then
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno"
+ TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char"
+ fi
+
+ 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 -permissive- -utf-8 -MP"
- TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -permissive- -utf-8 -Zc:wchar_t-"
+ 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-"
fi
# CFLAGS C language level for JDK sources (hotspot only uses C++)
@@ -714,11 +725,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
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"
@@ -736,6 +749,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
# for all archs except arm and ppc, prevent gcc to omit frame pointer
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
fi
+ 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=power10"
+ fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
$1_CFLAGS_CPU="-mcpu=pwr8"
@@ -830,6 +848,22 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
FLAGS_SETUP_BRANCH_PROTECTION
+ if test "x$FLAGS_CPU" = xriscv64; then
+ AC_MSG_CHECKING([if RVV/vector sigcontext supported])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ],
+ [
+ return (int)sizeof(struct __riscv_v_ext_state);
+ ])],
+ [
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ $1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -DNO_RVV_SIGCONTEXT"
+ AC_MSG_RESULT([no])
+ ]
+ )
+ fi
+
# EXPORT to API
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
$TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \
@@ -890,8 +924,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 ffb1f0d6e19..509e0dd825f 100644
--- a/make/autoconf/flags-ldflags.m4
+++ b/make/autoconf/flags-ldflags.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
@@ -78,7 +78,7 @@ 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 \
+ 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
@@ -197,8 +197,8 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
$2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
${$1_CPU_EXECUTABLE_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
- $2LDFLAGS_STATIC_JDK="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY \
- $OS_LDFLAGS ${$2EXTRA_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
+ $2LDFLAGS_STATIC_JDK="$BASIC_LDFLAGS $OS_LDFLAGS ${$2EXTRA_LDFLAGS} \
+ $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
$2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS $OS_LDFLAGS_JVM_ONLY \
$DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY \
diff --git a/make/autoconf/help.m4 b/make/autoconf/help.m4
index 4d1b3c37bbb..400acf11a63 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
@@ -341,14 +341,6 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
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"
- 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"
diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4
index c09f581688c..72e731e7ffc 100644
--- a/make/autoconf/jdk-options.m4
+++ b/make/autoconf/jdk-options.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
@@ -446,6 +446,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
fi
if test "x$TOOLCHAIN_TYPE" = "xclang"; then
ASAN_CFLAGS="$ASAN_CFLAGS -fsanitize-address-use-after-return=never"
+ ASAN_LDFLAGS="$ASAN_LDFLAGS -shared-libasan"
fi
elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
# -Oy- is equivalent to -fno-omit-frame-pointer in GCC/Clang.
@@ -515,10 +516,11 @@ 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-stringop-truncation -Wno-format-overflow -Wno-array-bounds -Wno-stringop-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
UBSAN_LDFLAGS="$UBSAN_CHECKS"
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
DESC: [enable UndefinedBehaviorSanitizer],
@@ -552,16 +554,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.
@@ -628,6 +620,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)
])
################################################################################
@@ -669,15 +673,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
@@ -864,8 +859,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)
])
################################################################################
@@ -972,6 +965,29 @@ 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)
+])
+
################################################################################
#
# fallback linker
diff --git a/make/autoconf/jvm-features.m4 b/make/autoconf/jvm-features.m4
index 9695644bafe..668de019469 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-hsdis.m4 b/make/autoconf/lib-hsdis.m4
index a4d2c5f81f3..784c76424cf 100644
--- a/make/autoconf/lib-hsdis.m4
+++ b/make/autoconf/lib-hsdis.m4
@@ -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
@@ -40,6 +40,9 @@ AC_DEFUN([LIB_SETUP_HSDIS_CAPSTONE],
HSDIS_CFLAGS="-I${CAPSTONE}/include/capstone"
if test "x$OPENJDK_TARGET_OS" != xwindows; then
HSDIS_LDFLAGS="-L${CAPSTONE}/lib"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" ; then
+ HSDIS_LDFLAGS="-L${CAPSTONE}/lib64 $HSDIS_LDFLAGS"
+ fi
HSDIS_LIBS="-lcapstone"
else
HSDIS_LDFLAGS="-nodefaultlib:libcmt.lib"
diff --git a/make/autoconf/lib-tests.m4 b/make/autoconf/lib-tests.m4
index afb94030808..d2a4fcbb191 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 b68fef7bbba..b946be97d96 100644
--- a/make/autoconf/libraries.m4
+++ b/make/autoconf/libraries.m4
@@ -139,7 +139,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 +197,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 937d8c37927..31451d0c37f 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 2637285334b..80c6dfc2ba2 100644
--- a/make/autoconf/spec.gmk.template
+++ b/make/autoconf/spec.gmk.template
@@ -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@
@@ -475,6 +479,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@
@@ -708,6 +715,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@
diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4
index c240b9098bc..b7a01074686 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 4f970df7b5f..17ad2666b3a 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 aa9662e2100..12c9c92b492 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 7717150dfd9..9e3e5472c9e 100644
--- a/make/autoconf/util_paths.m4
+++ b/make/autoconf/util_paths.m4
@@ -77,7 +77,10 @@ AC_DEFUN([UTIL_FIXUP_PATH],
imported_path=""
fi
fi
- if test "x$imported_path" != "x$path"; then
+ [ imported_path_lower=`$ECHO $imported_path | $TR '[:upper:]' '[:lower:]'` ]
+ [ orig_path_lower=`$ECHO $path | $TR '[:upper:]' '[:lower:]'` ]
+ # If only case differs, keep original path
+ if test "x$imported_path_lower" != "x$orig_path_lower"; then
$1="$imported_path"
fi
else
@@ -357,6 +360,8 @@ AC_DEFUN([UTIL_SETUP_TOOL],
fi
$1="$tool_command"
fi
+ # Make sure we add fixpath if needed
+ UTIL_FIXUP_EXECUTABLE($1)
if test "x$tool_args" != x; then
# If we got arguments, re-append them to the command after the fixup.
$1="[$]$1 $tool_args"
diff --git a/make/common/CopyFiles.gmk b/make/common/CopyFiles.gmk
index 8ba21677245..f56947f01f5 100644
--- a/make/common/CopyFiles.gmk
+++ b/make/common/CopyFiles.gmk
@@ -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
@@ -23,14 +23,11 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including CopyFiles.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
-#
# Code for handling the SetupCopyFiles macro.
-#
################################################################################
define AddFileToCopy
@@ -110,3 +107,8 @@ define SetupCopyFilesBody
)
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/DebugInfoUtils.gmk b/make/common/DebugInfoUtils.gmk
index 69d6c24b5e0..721dd06e587 100644
--- a/make/common/DebugInfoUtils.gmk
+++ b/make/common/DebugInfoUtils.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024, 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
@@ -23,14 +23,11 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including DebugInfoUtils.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
-#
# Common debuginfo utility functions
-#
################################################################################
################################################################################
@@ -56,3 +53,6 @@ else
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
endif
endif
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/Execute.gmk b/make/common/Execute.gmk
index aa3c2e58813..bf108c30c05 100644
--- a/make/common/Execute.gmk
+++ b/make/common/Execute.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2019, 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
@@ -23,17 +23,13 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including Execute.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
-#
# Code for handling the SetupExecute macro.
-#
################################################################################
-
################################################################################
# Setup make rules for executing an arbitrary command.
#
@@ -196,3 +192,8 @@ define SetupExecuteBody
$1_TARGET := $$($1_FINAL_RESULT)
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/FileUtils.gmk b/make/common/FileUtils.gmk
index d3cc4872ebb..fa934797fc7 100644
--- a/make/common/FileUtils.gmk
+++ b/make/common/FileUtils.gmk
@@ -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
@@ -23,14 +23,11 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including FileUtils.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
-#
# Common file utility functions
-#
################################################################################
################################################################################
@@ -307,3 +304,8 @@ ifeq ($(DISABLE_CACHE_FIND), true)
else
FindFiles = $(CacheFindFiles)
endif
+
+################################################################################
+
+include MakeIncludeEnd.gmk
+endif # include guard
diff --git a/make/common/FindTests.gmk b/make/common/FindTests.gmk
index db9cfe774de..1f3a70b3035 100644
--- a/make/common/FindTests.gmk
+++ b/make/common/FindTests.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
@@ -23,21 +23,10 @@
# questions.
#
-ifndef _FIND_TESTS_GMK
-_FIND_TESTS_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
-# This makefile can be called directly to just trigger generation of the cache
-# makefile. If so, SPEC and MakeBase.gmk need to be included.
-ifeq ($(FINDTESTS_STAND_ALONE), true)
- include $(SPEC)
- include MakeBase.gmk
-endif
-
-# Make sure this variable is not lazy evaled.
-ALL_NAMED_TESTS :=
-
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, common/FindTests.gmk))
+################################################################################
# TEST_BASEDIRS might have been set by a custom extension
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR)
@@ -62,10 +51,11 @@ $(foreach root, $(JTREG_TESTROOTS), \
# Cache the expensive to calculate test names in a generated makefile.
FIND_TESTS_CACHE_FILE := $(MAKESUPPORT_OUTPUTDIR)/find-tests.gmk
-# If this file is deemed outdated, it will automatically get regenerated
-# by this rule before being included below.
-$(FIND_TESTS_CACHE_FILE): $(JTREG_ROOT_FILES) $(JTREG_GROUP_FILES) \
- $(TOPDIR)/test/make/TestMake.gmk
+ifeq ($(GENERATE_FIND_TESTS_FILE), true)
+ # If this file is deemed outdated, it will automatically get regenerated
+ # by this rule before being included below.
+ $(FIND_TESTS_CACHE_FILE): $(JTREG_ROOT_FILES) $(JTREG_GROUP_FILES) \
+ $(TOPDIR)/test/make/TestMake.gmk
$(call MakeTargetDir)
( $(foreach root, $(JTREG_TESTROOTS), \
$(PRINTF) "\n$(root)_JTREG_TEST_GROUPS := " ; \
@@ -78,6 +68,7 @@ $(FIND_TESTS_CACHE_FILE): $(JTREG_ROOT_FILES) $(JTREG_GROUP_FILES) \
$(MAKE) -s --no-print-directory $(MAKE_ARGS) \
SPEC=$(SPEC) -f $(TOPDIR)/test/make/TestMake.gmk print-targets \
TARGETS_FILE=$@
+endif
-include $(FIND_TESTS_CACHE_FILE)
@@ -103,4 +94,5 @@ ALL_NAMED_TESTS += failure-handler make
################################################################################
-endif # _FIND_TESTS_GMK
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/JarArchive.gmk b/make/common/JarArchive.gmk
index 68e9eaca32c..1f8ed1bc002 100644
--- a/make/common/JarArchive.gmk
+++ b/make/common/JarArchive.gmk
@@ -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
@@ -23,12 +23,10 @@
# questions.
#
-ifndef _JAR_ARCHIVE_GMK
-_JAR_ARCHIVE_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including JarArchive.gmk)
-endif
+################################################################################
include MakeIO.gmk
@@ -283,4 +281,7 @@ define SetupJarArchiveBody
$1 += $$($1_JAR)
endef
-endif # _JAR_ARCHIVE_GMK
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk
index 59ea23d359b..f48aefcd517 100644
--- a/make/common/JavaCompilation.gmk
+++ b/make/common/JavaCompilation.gmk
@@ -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
@@ -23,19 +23,15 @@
# questions.
#
-ifndef _JAVA_COMPILATION_GMK
-_JAVA_COMPILATION_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
-endif
+################################################################################
include MakeIO.gmk
-# Java compilation needs SetupJarArchive and/or SetupZipArchive, if we're
-# generating a jar file or a source zip.
+# Java compilation needs SetupJarArchive if we're generating a jar file
include JarArchive.gmk
-include ZipArchive.gmk
###
### Definitions for common release targets
@@ -156,7 +152,6 @@ endef
# COPY_FILES myapp/foo/setting.txt means copy this file over to the package myapp/foo
# CLEAN .properties means copy and clean all properties file to the corresponding package in BIN.
# CLEAN_FILES myapp/foo/setting.txt means clean this file over to the package myapp/foo
-# SRCZIP Create a src.zip based on the found sources and copied files.
# 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.
@@ -529,19 +524,6 @@ define SetupJavaCompilationBody
# Add jar to target list
$1 += $$($1_JAR)
endif
-
- # Check if a srczip was specified, then setup the rules for the srczip.
- ifneq ($$($1_SRCZIP), )
- $$(eval $$(call SetupZipArchive, ZIP_ARCHIVE_$1, \
- SRC := $$($1_SRC), \
- ZIP := $$($1_SRCZIP), \
- INCLUDES := $$($1_INCLUDES), \
- EXCLUDES := $$($1_EXCLUDES), \
- EXCLUDE_FILES := $$($1_EXCLUDE_FILES)))
-
- # Add zip to target list
- $1 += $$($1_SRCZIP)
- endif
endif # Source files found
endef
@@ -556,4 +538,7 @@ SetupJavaCompilationCompileTarget = \
SetupJavaCompilationApiTarget = \
$(strip $2)/_the.$(strip $1)_pubapi
-endif # _JAVA_COMPILATION_GMK
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/JdkNativeCompilation.gmk b/make/common/JdkNativeCompilation.gmk
index ca0f1429c61..372ad39305c 100644
--- a/make/common/JdkNativeCompilation.gmk
+++ b/make/common/JdkNativeCompilation.gmk
@@ -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
@@ -23,18 +23,13 @@
# questions.
#
-ifndef _JDK_NATIVE_COMPILATION_GMK
-_JDK_NATIVE_COMPILATION_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including JdkNativeCompilation.gmk)
-endif
+################################################################################
include NativeCompilation.gmk
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, common/JdkNativeCompilation.gmk))
-
FindSrcDirsForComponent += \
$(call uniq, $(wildcard \
$(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/$(strip $2) \
@@ -266,6 +261,9 @@ JDK_RCFLAGS=$(RCFLAGS) \
# will be replaced with proper values for hotspot.
# HEADERS_FROM_SRC -- if false, does not add source dirs automatically as
# header include dirs. (Defaults to true.)
+# JAVA_HEADERS -- if false, does not add the directory with the generated
+# headers from the Java compilation of the current module to the search
+# path for include files. (Defaults to true.)
# JDK_LIBS -- libraries generated by the JDK build system to link against.
# These take the form :. For the current module, the
# module name and colon can be omitted. The basename should be specified
@@ -385,7 +383,9 @@ define SetupJdkNativeCompilationBody
# Add the module specific java header dir
ifneq ($$(MODULE), )
- $1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE)))
+ ifneq ($$($1_JAVA_HEADERS), false)
+ $1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE)))
+ endif
endif
$1_JDK_LIBS += $$($1_JDK_LIBS_$$(OPENJDK_TARGET_OS))
@@ -494,4 +494,7 @@ define SetupJdkExecutableBody
$$(eval $$(call SetupJdkNativeCompilation, $1))
endef
-endif # _JDK_NATIVE_COMPILATION_GMK
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/LogUtils.gmk b/make/common/LogUtils.gmk
new file mode 100644
index 00000000000..50969733320
--- /dev/null
+++ b/make/common/LogUtils.gmk
@@ -0,0 +1,132 @@
+#
+# 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
+# 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 $(TOPDIR)/make/common/MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+# This file contains helper functions for logging.
+################################################################################
+
+# Look for a given option in the LOG variable, and if found, set a variable
+# and remove the option from the LOG variable
+# $1: The option to look for
+# $2: The variable to set to "true" if the option is found
+define ParseLogOption
+ ifneq ($$(findstring $1, $$(LOG)), )
+ override $2 := true
+ # First try to remove "," if it exists, otherwise just remove " "
+ LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
+ # We might have ended up with a leading comma. Remove it. Need override
+ # since LOG is set from the command line.
+ override LOG := $$(strip $$(patsubst $$(COMMA)%, %, $$(LOG_STRIPPED)))
+ endif
+endef
+
+# Look for a given option with an assignment in the LOG variable, and if found,
+# set a variable to that value and remove the option from the LOG variable
+# $1: The option to look for
+# $2: The variable to set to the value of the option, if found
+define ParseLogValue
+ ifneq ($$(findstring $1=, $$(LOG)), )
+ # Make words of out comma-separated list and find the one with opt=val
+ value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG)))))
+ override $2 := $$(value)
+ # First try to remove ", " if it exists, otherwise just remove " "
+ LOG_STRIPPED := $$(subst $$(strip $1)=$$(value),, \
+ $$(subst $$(COMMA)$$(strip $1)=$$(value),, $$(LOG)))
+ # We might have ended up with a leading comma. Remove it. Need override
+ # since LOG is set from the command line.
+ override LOG := $$(strip $$(patsubst $$(COMMA)%, %, $$(LOG_STRIPPED)))
+ endif
+endef
+
+define ParseLogLevel
+ # Setup logging according to LOG
+
+ # If "nofile" is present, do not log to a file
+ $$(eval $$(call ParseLogOption, nofile, LOG_NOFILE))
+
+ # If "cmdline" is present, print all executes "important" command lines.
+ $$(eval $$(call ParseLogOption, cmdlines, LOG_CMDLINES))
+
+ # If "report" is present, use non-standard reporting options at build failure.
+ $$(eval $$(call ParseLogValue, report, LOG_REPORT))
+ ifneq ($$(LOG_REPORT), )
+ ifeq ($$(filter $$(LOG_REPORT), none all default), )
+ $$(info Error: LOG=report has invalid value: $$(LOG_REPORT).)
+ $$(info Valid values: LOG=report=||)
+ $$(error Cannot continue)
+ endif
+ endif
+
+ # If "profile-to-log" is present, write shell times in build log
+ $$(eval $$(call ParseLogOption, profile-to-log, LOG_PROFILE_TIMES_LOG))
+
+ # If "profile" is present, write shell times in separate log file
+ # IMPORTANT: $(ParseLogOption profile-to-log) should go first. Otherwise
+ # parsing of 'LOG=debug,profile-to-log,nofile' ends up in the following error:
+ # Error: LOG contains unknown option or log level: debug-to-log.
+ $$(eval $$(call ParseLogOption, profile, LOG_PROFILE_TIMES_FILE))
+
+ # If "flow" is present, log makefile execution flow
+ $$(eval $$(call ParseLogOption, flow, LOG_FLOW))
+
+ # Treat LOG=profile-to-log as if it were LOG=profile,profile-to-log
+ LOG_PROFILE_TIMES_FILE := $$(firstword $$(LOG_PROFILE_TIMES_FILE) $$(LOG_PROFILE_TIMES_LOG))
+
+ override LOG_LEVEL := $$(LOG)
+
+ ifeq ($$(LOG_LEVEL), )
+ # Set LOG to "warn" as default if not set
+ override LOG_LEVEL := warn
+ endif
+
+ ifeq ($$(LOG_LEVEL), warn)
+ override MAKE_LOG_FLAGS := -s
+ else ifeq ($$(LOG_LEVEL), info)
+ override MAKE_LOG_FLAGS := -s
+ else ifeq ($$(LOG_LEVEL), debug)
+ override MAKE_LOG_FLAGS :=
+ else ifeq ($$(LOG_LEVEL), trace)
+ override MAKE_LOG_FLAGS :=
+ else
+ $$(info Error: LOG contains unknown option or log level: $$(LOG).)
+ $$(info LOG can be [,[...]] where is nofile | cmdlines | profile | profile-to-log)
+ $$(info and is warn | info | debug | trace)
+ $$(error Cannot continue)
+ endif
+endef
+
+MAKE_LOG_VARS = $(foreach v, \
+ LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_REPORT LOG_PROFILE_TIMES_LOG \
+ LOG_PROFILE_TIMES_FILE LOG_FLOW, \
+ $v=$($v) \
+)
+
+################################################################################
+
+endif # include guard
+include $(TOPDIR)/make/common/MakeIncludeEnd.gmk
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
index aec7396cd65..d1bb0396943 100644
--- a/make/common/MakeBase.gmk
+++ b/make/common/MakeBase.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+MAKEBASE_INCLUDED := true
+
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# MakeBase provides the core functionality needed and used by all makefiles. It
# should be included by all makefiles. MakeBase provides essential
@@ -30,13 +35,6 @@
# execution, logging and fixpath functionality.
################################################################################
-ifndef _MAKEBASE_GMK
-_MAKEBASE_GMK := 1
-
-ifeq ($(wildcard $(SPEC)), )
- $(error MakeBase.gmk needs SPEC set to a proper spec.gmk)
-endif
-
# By defining this pseudo target, make will automatically remove targets
# if their recipe fails so that a rebuild is automatically triggered on the
# next make invocation.
@@ -312,7 +310,5 @@ ExecuteWithLog = \
################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, common/MakeBase.gmk))
-
-endif # _MAKEBASE_GMK
+include MakeIncludeEnd.gmk
+endif # include guard
diff --git a/make/common/MakeFileEnd.gmk b/make/common/MakeFileEnd.gmk
new file mode 100644
index 00000000000..0c02ae79373
--- /dev/null
+++ b/make/common/MakeFileEnd.gmk
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+
+################################################################################
+# MakeFileEnd.gmk should be included last of all in all top-level makefiles
+################################################################################
+
+# Hook to include the corresponding custom file, if present.
+ifneq ($(NO_CUSTOM_EXTENSIONS), true)
+ CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_MAKEFILE))
+ $(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME)))
+endif
+
+all: $(TARGETS)
+
+ifeq ($(LOG_FLOW), true)
+ $(info :Leave $(THIS_MAKEFILE) [now executing rules])
+endif
+
+.PHONY: default all
diff --git a/make/common/MakeFileStart.gmk b/make/common/MakeFileStart.gmk
new file mode 100644
index 00000000000..f1dd0abb792
--- /dev/null
+++ b/make/common/MakeFileStart.gmk
@@ -0,0 +1,66 @@
+#
+# 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.
+#
+
+################################################################################
+# MakeFileStart.gmk should be included first of all in all top-level makefiles
+################################################################################
+
+# This must be the first rule
+default: $(if $(DEFAULT_TARGET), $(DEFAULT_TARGET), all)
+
+THIS_MAKEFILE_PATH := $(firstword $(MAKEFILE_LIST))
+
+ifeq ($(SPEC), )
+ $(error $(THIS_MAKEFILE_PATH): SPEC is not set)
+endif
+
+ifeq ($(wildcard $(SPEC)), )
+ $(error $(THIS_MAKEFILE_PATH): spec.gmk file $(SPEC) is missing)
+endif
+
+ifneq ($(words $(MAKEFILE_LIST)), 2)
+ $(error $(THIS_MAKEFILE_PATH): This file is not supposed to be included)
+endif
+
+# We need spec.gmk to get $(TOPDIR)
+include $(SPEC)
+
+THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH)))
+
+ifeq ($(LOG_FLOW), true)
+ $(info :Enter $(THIS_MAKEFILE))
+endif
+
+include $(TOPDIR)/make/common/MakeBase.gmk
+
+TARGETS :=
+
+all:
+
+# Hook to include the corresponding custom file, if present.
+ifneq ($(NO_CUSTOM_EXTENSIONS), true)
+ CUSTOM_PRE_NAME := $(subst .gmk,-pre.gmk, $(THIS_MAKEFILE))
+ $(eval $(call IncludeCustomExtension, $(CUSTOM_PRE_NAME)))
+endif
diff --git a/make/common/MakeIO.gmk b/make/common/MakeIO.gmk
index e1806e9259a..b32f427226a 100644
--- a/make/common/MakeIO.gmk
+++ b/make/common/MakeIO.gmk
@@ -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
@@ -23,18 +23,14 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including MakeIO.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
-#
# Functions for dealing with reading and writing from makefiles. Prior to GNU
# Make 4.0, this was tricky business.
-#
################################################################################
-
################################################################################
# ListPathsSafely can be used to print command parameters to a file. This is
# typically done if the command line length risk being too long for the
@@ -241,3 +237,8 @@ else # HAS_FILE_FUNCTION = false
$$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
endef
endif # HAS_FILE_FUNCTION
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/MakeIncludeEnd.gmk b/make/common/MakeIncludeEnd.gmk
new file mode 100644
index 00000000000..7023a861fa1
--- /dev/null
+++ b/make/common/MakeIncludeEnd.gmk
@@ -0,0 +1,45 @@
+#
+# 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.
+#
+
+################################################################################
+# MakeIncludeEnd.gmk should be included last of all in all include files
+################################################################################
+
+# Hook to include the corresponding custom file, if present.
+ifneq ($(NO_CUSTOM_EXTENSIONS), true)
+ CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_INCLUDE))
+ $(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME)))
+endif
+
+# Pop our helper name off the 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 $(INCLUDE_STACK) $(SNIPPET_STACK), )Leave $(THIS_INCLUDE))
+endif
+
+# Restore the previous helper name
+THIS_INCLUDE := $(firstword $(INCLUDE_STACK))
diff --git a/make/common/MakeIncludeStart.gmk b/make/common/MakeIncludeStart.gmk
new file mode 100644
index 00000000000..d09f027c1d3
--- /dev/null
+++ b/make/common/MakeIncludeStart.gmk
@@ -0,0 +1,83 @@
+#
+# 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.
+#
+
+################################################################################
+# MakeIncludeStart.gmk should be included first of all in all include files
+################################################################################
+
+# 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))
+
+# Print an indented message, also counting the top-level makefile as a level
+ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
+ THIS_INCLUDE_MSG := include
+else
+ THIS_INCLUDE_MSG := included already
+endif
+
+ifeq ($(LOG_FLOW), true)
+ $(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Enter $(THIS_INCLUDE) [$(THIS_INCLUDE_MSG)])
+endif
+
+ifneq ($(filter $(THIS_INCLUDE), $(INCLUDE_STACK)), )
+ $(error Internal makefile error: Include loop detected: $(THIS_INCLUDE) $(INCLUDE_STACK))
+endif
+
+ifeq ($(words $(MAKEFILE_LIST)), 2)
+ $(error $(THIS_INCLUDE_PATH): This file is supposed to be included)
+endif
+
+# In a preinit environment, we do not have any SPEC
+ifneq ($(IS_PREINIT_ENV), true)
+ ifeq ($(SPEC), )
+ $(error $(THIS_INCLUDE_PATH): SPEC is not set)
+ endif
+
+ ifeq ($(wildcard $(SPEC)), )
+ $(error $(THIS_INCLUDE_PATH): spec.gmk file $(SPEC) is missing)
+ endif
+
+ ifneq ($(MAKEBASE_INCLUDED), true)
+ $(error $(THIS_INCLUDE_PATH): MakeBase.gmk is not included)
+ endif
+endif
+
+# Push our helper name onto the stack
+INCLUDE_STACK := $(THIS_INCLUDE) $(INCLUDE_STACK)
+
+# Setup an automatic include guard
+ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
+ INCLUDE_GUARD_$(THIS_INCLUDE) := true
+ INCLUDE := true
+
+ # Hook to include the corresponding custom file, if present.
+ ifneq ($(NO_CUSTOM_EXTENSIONS), true)
+ CUSTOM_PRE_NAME := $(subst .gmk,-pre.gmk, $(THIS_INCLUDE))
+ $(eval $(call IncludeCustomExtension, $(CUSTOM_PRE_NAME)))
+ endif
+else
+ INCLUDE := false
+endif
diff --git a/make/common/MakeSnippetEnd.gmk b/make/common/MakeSnippetEnd.gmk
new file mode 100644
index 00000000000..7b46310330a
--- /dev/null
+++ b/make/common/MakeSnippetEnd.gmk
@@ -0,0 +1,45 @@
+#
+# 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.
+#
+
+################################################################################
+# MakeSnippetEnd.gmk should be included after including a makefile snippet
+################################################################################
+
+# Hook to include the corresponding custom file, if present.
+ifneq ($(NO_CUSTOM_EXTENSIONS), true)
+ CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_SNIPPET))
+ $(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME)))
+endif
+
+# Pop our helper name off the 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 $(INCLUDE_STACK) $(SNIPPET_STACK), )Leave $(THIS_SNIPPET))
+endif
+
+# Restore the previous helper name
+THIS_SNIPPET := $(firstword $(SNIPPET_STACK))
diff --git a/make/common/MakeSnippetStart.gmk b/make/common/MakeSnippetStart.gmk
new file mode 100644
index 00000000000..1df5a1e20cb
--- /dev/null
+++ b/make/common/MakeSnippetStart.gmk
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+################################################################################
+# MakeSnippetStart.gmk should be included before including a makefile snippet
+################################################################################
+
+ifeq ($(THIS_SNIPPET), )
+ $(error Internal makefile error: THIS_SNIPPET is not defined)
+endif
+
+# Print an indented message, also counting the top-level makefile as a level
+ifeq ($(LOG_FLOW), true)
+ $(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Enter $(THIS_SNIPPET) [snippet])
+endif
+
+# Push our helper name onto the stack
+SNIPPET_STACK := $(THIS_SNIPPET) $(SNIPPET_STACK)
+
+# Hook to include the corresponding custom file, if present.
+ifneq ($(NO_CUSTOM_EXTENSIONS), true)
+ CUSTOM_PRE_NAME := $(subst .gmk,-pre.gmk, $(THIS_SNIPPET))
+ $(eval $(call IncludeCustomExtension, $(CUSTOM_PRE_NAME)))
+endif
diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk
index 8ae33b3641e..f4f815c740d 100644
--- a/make/common/Modules.gmk
+++ b/make/common/Modules.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,8 +23,8 @@
# questions.
#
-ifndef _MODULES_GMK
-_MODULES_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
# Setup module sets for classloaders
@@ -45,11 +45,6 @@ include $(TOPDIR)/make/conf/docs-modules.conf
include $(TOPDIR)/make/conf/build-module-sets.conf
-################################################################################
-# Hook to include the corresponding custom file, if present.
-# Allowing MODULE list extensions setup above.
-$(eval $(call IncludeCustomExtension, common/Modules.gmk))
-
################################################################################
# Depending on the configuration, we might need to filter out some modules that
# normally should have been included
@@ -92,7 +87,10 @@ SRC_SUBDIRS += share/classes
SPEC_SUBDIRS += share/specs
-MAN_SUBDIRS += share/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.
@@ -158,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, \
@@ -172,8 +174,9 @@ MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
MODULE_INFOS := $(call FindAllModuleInfos, *)
-$(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
- $(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps)
+ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
+ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
+ $(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps)
$(call MakeTargetDir)
$(RM) $@
$(foreach m, $(MODULE_INFOS), \
@@ -206,6 +209,7 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
printf(" %s", $$0) } \
END { printf("\n") }' $m \
) >> $@ $(NEWLINE))
+endif
-include $(MODULE_DEPS_MAKEFILE)
@@ -314,4 +318,5 @@ endef
################################################################################
-endif # _MODULES_GMK
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index 66d07df3b78..9721f1c0aca 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -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
@@ -23,19 +23,15 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This is the top-level entry point for our native compilation and linking.
# It contains the SetupNativeCompilation macro, but is supported by helper
# macros in the make/common/native directory.
################################################################################
-ifndef _NATIVE_COMPILATION_GMK
-_NATIVE_COMPILATION_GMK := 1
-
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
-endif
-
include MakeIO.gmk
include native/CompileFile.gmk
include native/DebugSymbols.gmk
@@ -223,6 +219,7 @@ define SetupNativeCompilationBody
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
# Override all targets (this is a hack)
$1 := $$($1_ALL_OBJS_JSON) $$($1_LDFLAGS_FILE)
+ TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
endif
endef
@@ -409,4 +406,7 @@ define ImportDependencyFile
endif
endef
-endif # _NATIVE_COMPILATION_GMK
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/ProcessMarkdown.gmk b/make/common/ProcessMarkdown.gmk
index d14c3ce4f76..1b4a5b76ea1 100644
--- a/make/common/ProcessMarkdown.gmk
+++ b/make/common/ProcessMarkdown.gmk
@@ -1,4 +1,4 @@
-# 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
@@ -22,9 +22,10 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
include TextFileProcessing.gmk
@@ -181,3 +182,8 @@ define SetupProcessMarkdownBody
)
endif
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/TestFilesCompilation.gmk b/make/common/TestFilesCompilation.gmk
index e09e144fa06..fd1c54eaf48 100644
--- a/make/common/TestFilesCompilation.gmk
+++ b/make/common/TestFilesCompilation.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,13 +23,10 @@
# questions.
#
-ifndef _TEST_FILES_COMPILATION_GMK
-_TEST_FILES_COMPILATION_GMK := 1
-
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including TestFilesCompilation.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+################################################################################
include JdkNativeCompilation.gmk
@@ -46,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
@@ -111,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, \
@@ -120,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), \
@@ -142,4 +142,7 @@ define SetupTestFilesCompilationBody
endef
-endif # _TEST_FILES_COMPILATION_GMK
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/TextFileProcessing.gmk b/make/common/TextFileProcessing.gmk
index 94aa259bebc..462d8756650 100644
--- a/make/common/TextFileProcessing.gmk
+++ b/make/common/TextFileProcessing.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,9 +23,10 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# Helper function for SetupTextFileProcessing; adds a rule for a single file
# to be processed.
@@ -222,3 +223,8 @@ define SetupTextFileProcessingBody
endif
endif
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/Utils.gmk b/make/common/Utils.gmk
index 26d05ed91be..03009ec3ca4 100644
--- a/make/common/Utils.gmk
+++ b/make/common/Utils.gmk
@@ -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
@@ -23,14 +23,11 @@
# questions.
#
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including Utils.gmk)
-endif
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
-#
# Basic utility functions available to MakeBase.gmk itself
-#
################################################################################
# String equals
@@ -398,3 +395,8 @@ FilterExcludedTranslations = \
), \
$1 \
))
+
+################################################################################
+
+include MakeIncludeEnd.gmk
+endif # include guard
diff --git a/make/common/ZipArchive.gmk b/make/common/ZipArchive.gmk
index 22fd6722fa2..e6bc99eb4c1 100644
--- a/make/common/ZipArchive.gmk
+++ b/make/common/ZipArchive.gmk
@@ -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
@@ -23,15 +23,13 @@
# questions.
#
-ifndef _ZIP_ARCHIVE_GMK
-_ZIP_ARCHIVE_GMK := 1
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# Depends on build tools for MakeZipReproducible
-include ../ToolsJdk.gmk
-
-ifeq ($(_MAKEBASE_GMK), )
- $(error You must include MakeBase.gmk prior to including ZipArchive.gmk)
-endif
+include $(TOPDIR)/make/ToolsJdk.gmk
# Setup make rules for creating a zip archive.
#
@@ -192,4 +190,7 @@ define SetupZipArchiveBody
$1 += $$($1_ZIP)
endef
-endif # _ZIP_ARCHIVE_GMK
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/modules/CopyCommon.gmk b/make/common/modules/CopyCommon.gmk
index f4df1ce3a30..9dc03f08e59 100644
--- a/make/common/modules/CopyCommon.gmk
+++ b/make/common/modules/CopyCommon.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
include CopyFiles.gmk
LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
@@ -88,3 +93,8 @@ define SetupCopyLegalFilesBody
) \
)
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/modules/GendataCommon.gmk b/make/common/modules/GendataCommon.gmk
index 0d5d39ea973..ad1d1c7f7a5 100644
--- a/make/common/modules/GendataCommon.gmk
+++ b/make/common/modules/GendataCommon.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2020, 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
@@ -23,6 +23,15 @@
# questions.
#
-include JavaCompilation.gmk
-include ToolsJdk.gmk
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+################################################################################
+
+include JavaCompilation.gmk
+include $(TOPDIR)/make/ToolsJdk.gmk
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/modules/GensrcCommon.gmk b/make/common/modules/GensrcCommon.gmk
index b14e96293ba..64d1f71d82e 100644
--- a/make/common/modules/GensrcCommon.gmk
+++ b/make/common/modules/GensrcCommon.gmk
@@ -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
@@ -23,9 +23,14 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
include Execute.gmk
include TextFileProcessing.gmk
-include ToolsJdk.gmk
+include $(TOPDIR)/make/ToolsJdk.gmk
################################################################################
# Sets up a rule that creates a version.properties file in the gensrc output
@@ -41,3 +46,8 @@ define SetupVersionProperties
$$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/modules/GensrcModuleInfo.gmk b/make/common/modules/GensrcModuleInfo.gmk
index 56b5fb54eb8..f2097c34766 100644
--- a/make/common/modules/GensrcModuleInfo.gmk
+++ b/make/common/modules/GensrcModuleInfo.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,6 +23,8 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# This file makes modifications to module-info.java files based on the build
# configuration.
@@ -41,13 +43,8 @@
#
# The modified module-info.java files are put in the gensrc directory where
# they will automatically override the static versions in the src tree.
-#
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
include Modules.gmk
################################################################################
@@ -101,4 +98,4 @@ endif
################################################################################
-all: $(TARGETS)
+include MakeFileEnd.gmk
diff --git a/make/common/modules/GensrcProperties.gmk b/make/common/modules/GensrcProperties.gmk
index 5db10af27b1..4d4fc0460f0 100644
--- a/make/common/modules/GensrcProperties.gmk
+++ b/make/common/modules/GensrcProperties.gmk
@@ -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
@@ -23,8 +23,13 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# This file defines macros that sets up rules for generating java classes
# from resource bundle properties files.
+################################################################################
include JavaCompilation.gmk
@@ -142,3 +147,8 @@ define SetupCompilePropertiesBody
$1 += $$($1_JAVAS) $$($1_TARGET) $$($1_HK)
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/modules/LauncherCommon.gmk b/make/common/modules/LauncherCommon.gmk
index 38485283dcb..700c0de74d5 100644
--- a/make/common/modules/LauncherCommon.gmk
+++ b/make/common/modules/LauncherCommon.gmk
@@ -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
@@ -23,11 +23,16 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
include CopyFiles.gmk
include JdkNativeCompilation.gmk
include Modules.gmk
include ProcessMarkdown.gmk
-include ToolsJdk.gmk
+include $(TOPDIR)/make/ToolsJdk.gmk
LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher
LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
@@ -48,21 +53,18 @@ JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
# used as the name of the executable.
#
# Remaining parameters are named arguments. These include:
-# MAIN_MODULE The module of the main class to launch if different from the
-# current module
# MAIN_CLASS The Java main class to launch
-# JAVA_ARGS Processed into a -DJAVA_ARGS and added to CFLAGS
-# EXTRA_JAVA_ARGS Processed into a -DEXTRA_JAVA_ARGS and is prepended
-# before JAVA_ARGS to CFLAGS, primarily to allow long string literal
-# compile time defines exceeding Visual Studio 2013 limitations.
-# CFLAGS Additional CFLAGS
-# CFLAGS_windows Additional CFLAGS_windows
+# JAVA_ARGS Additional arguments to pass to Java when launching the main class
+# EXPAND_CLASSPATH_WILDCARDS Set to true to pass EXPAND_CLASSPATH_WILDCARDS
+# ENABLE_ARG_FILES Set to true to pass ENABLE_ARG_FILES
+# WINDOWS_JAVAW Set to true to pass JAVAW on Windows
# EXTRA_RCFLAGS Additional EXTRA_RCFLAGS
# MACOSX_PRIVILEGED On macosx, allow to access other processes
# OPTIMIZATION Override default optimization level (LOW)
# OUTPUT_DIR Override default output directory
# VERSION_INFO_RESOURCE Override default Windows resource file
# STATIC_LAUNCHER If true, will use settings for building a static launcher
+# LIBS Additional libraries to pass as LIBS argument to SetupJdkExecutable
SetupBuildLauncher = $(NamedParamsMacroTemplate)
define SetupBuildLauncherBody
# Setup default values (unless overridden)
@@ -70,19 +72,25 @@ define SetupBuildLauncherBody
$1_OPTIMIZATION := LOW
endif
- ifeq ($$($1_MAIN_MODULE), )
- $1_MAIN_MODULE := $(MODULE)
- endif
+ $1_MAIN_MODULE := $(MODULE)
ifneq ($$($1_MAIN_CLASS), )
$1_JAVA_ARGS += -Xms8m
$1_LAUNCHER_CLASS := -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS)
endif
- ifneq ($$($1_EXTRA_JAVA_ARGS), )
- $1_EXTRA_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
- $$(addprefix -J, $$($1_EXTRA_JAVA_ARGS)), "$$a"$(COMMA) )) }'
- $1_CFLAGS += -DEXTRA_JAVA_ARGS=$$($1_EXTRA_JAVA_ARGS_STR)
+ ifeq ($$($1_EXPAND_CLASSPATH_WILDCARDS), true)
+ $1_CFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
+ endif
+
+ ifeq ($$($1_ENABLE_ARG_FILES), true)
+ $1_CFLAGS += -DENABLE_ARG_FILES
+ endif
+
+ ifeq ($(call isTargetOs, windows), true)
+ ifeq ($$($1_WINDOWS_JAVAW), true)
+ $1_CFLAGS += -DJAVAW
+ endif
endif
ifneq ($$($1_JAVA_ARGS), )
@@ -143,8 +151,8 @@ define SetupBuildLauncherBody
-DLAUNCHER_NAME='"$$(LAUNCHER_NAME)"' \
-DPROGNAME='"$1"' \
$$($1_CFLAGS), \
- CFLAGS_windows := $$($1_CFLAGS_windows), \
EXTRA_HEADER_DIRS := java.base:libjvm, \
+ JAVA_HEADERS := false, \
DISABLED_WARNINGS_gcc := unused-function unused-variable, \
DISABLED_WARNINGS_clang := unused-function, \
LDFLAGS := $$($1_LDFLAGS), \
@@ -154,12 +162,6 @@ define SetupBuildLauncherBody
JDK_LIBS := $$($1_JDK_LIBS), \
JDK_LIBS_windows := $$($1_JDK_LIBS_windows), \
LIBS := $$($1_LIBS), \
- LIBS_unix := $(LIBZ_LIBS), \
- LIBS_linux := $(LIBDL) -lpthread, \
- LIBS_macosx := \
- -framework ApplicationServices \
- -framework Cocoa \
- -framework Security, \
LINK_TYPE := $$($1_LINK_TYPE), \
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
OBJECT_DIR := $$($1_OBJECT_DIR), \
@@ -237,3 +239,8 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher)
endif
endif
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/modules/LibCommon.gmk b/make/common/modules/LibCommon.gmk
index 4e3570d9cd7..0320450c934 100644
--- a/make/common/modules/LibCommon.gmk
+++ b/make/common/modules/LibCommon.gmk
@@ -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
@@ -23,4 +23,14 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
include JdkNativeCompilation.gmk
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/native/CompileFile.gmk b/make/common/native/CompileFile.gmk
index 0c67a337acf..9c3d39d6edf 100644
--- a/make/common/native/CompileFile.gmk
+++ b/make/common/native/CompileFile.gmk
@@ -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
@@ -23,11 +23,15 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains functionality related to compiling a single native source
# file (C, C++ or Objective-C) into an object file. It also harbours related
# functionality for generating PCH (precompiled headers) and Windows resource
# files.
+################################################################################
################################################################################
# Creates a recipe that creates a compile_commands.json fragment. Remove any
@@ -253,11 +257,13 @@ define CreatePrecompiledHeader
$$(eval $$(call CreateCompiledNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
FILE := $$($1_GENERATED_PCH_SRC), \
BASE := $1, \
- EXTRA_CXXFLAGS := -Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
+ EXTRA_CXXFLAGS := -I$$(dir $$($1_PRECOMPILED_HEADER)) -Fp$$($1_PCH_FILE) \
+ -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
))
$1_USE_PCH_FLAGS := \
- -Fp$$($1_PCH_FILE) -Yu$$(notdir $$($1_PRECOMPILED_HEADER))
+ -FI$$(notdir $$($1_PRECOMPILED_HEADER)) -Fp$$($1_PCH_FILE) \
+ -Yu$$(notdir $$($1_PRECOMPILED_HEADER))
$$($1_ALL_OBJS): $$($1_GENERATED_PCH_OBJ)
@@ -271,7 +277,8 @@ define CreatePrecompiledHeader
else ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
ifeq ($(TOOLCHAIN_TYPE), gcc)
$1_PCH_FILE := $$($1_OBJECT_DIR)/precompiled/$$(notdir $$($1_PRECOMPILED_HEADER)).gch
- $1_USE_PCH_FLAGS := -I$$($1_OBJECT_DIR)/precompiled
+ $1_USE_PCH_FLAGS := -I$$($1_OBJECT_DIR)/precompiled \
+ -include $$(notdir $$($1_PRECOMPILED_HEADER))
else ifeq ($(TOOLCHAIN_TYPE), clang)
$1_PCH_FILE := $$($1_OBJECT_DIR)/precompiled/$$(notdir $$($1_PRECOMPILED_HEADER)).pch
$1_USE_PCH_FLAGS := -include-pch $$($1_PCH_FILE)
@@ -349,3 +356,8 @@ define CreateWindowsResourceFile
> $$($1_RES_DEPS_TARGETS_FILE)
endif
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/native/DebugSymbols.gmk b/make/common/native/DebugSymbols.gmk
index f7a5a4021e2..7f21fd8cbf3 100644
--- a/make/common/native/DebugSymbols.gmk
+++ b/make/common/native/DebugSymbols.gmk
@@ -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
@@ -23,8 +23,12 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains functionality related to native debug symbol handling.
+################################################################################
################################################################################
define CreateDebugSymbols
@@ -98,3 +102,8 @@ define CreateDebugSymbols
endif # $1_DEBUG_SYMBOLS != false
endif # COPY_DEBUG_SYMBOLS
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/native/Flags.gmk b/make/common/native/Flags.gmk
index daa9a83d62b..747e090b816 100644
--- a/make/common/native/Flags.gmk
+++ b/make/common/native/Flags.gmk
@@ -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
@@ -23,10 +23,14 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains functionality related to setting up compiler and linker
# flags, based on various more abstract sources of compilation description,
# like optimization level.
+################################################################################
################################################################################
# $1 is the prefix of the file to be compiled
@@ -223,3 +227,8 @@ define SetupLinkerFlags
$1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \
$$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/native/Link.gmk b/make/common/native/Link.gmk
index 1461f7302dc..e888edfcc4c 100644
--- a/make/common/native/Link.gmk
+++ b/make/common/native/Link.gmk
@@ -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
@@ -23,9 +23,13 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains functionality related to linking a native binary;
# creating either a dynamic library, a static library or an executable.
+################################################################################
################################################################################
# GetEntitlementsFile
@@ -199,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
@@ -212,3 +220,8 @@ define CreateDynamicLibraryOrExecutable
$$(ECHO) $$($1_ALL_LD_ARGS) > $$@
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/native/LinkMicrosoft.gmk b/make/common/native/LinkMicrosoft.gmk
index 7c895a9507d..a53afba4001 100644
--- a/make/common/native/LinkMicrosoft.gmk
+++ b/make/common/native/LinkMicrosoft.gmk
@@ -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
@@ -23,9 +23,13 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains functionality related to linking a native binary;
# creating either a dynamic library, a static library or an executable.
+################################################################################
################################################################################
define CreateLinkedResultMicrosoft
@@ -113,4 +117,13 @@ 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
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/common/native/Paths.gmk b/make/common/native/Paths.gmk
index e021a390289..ee097b2e134 100644
--- a/make/common/native/Paths.gmk
+++ b/make/common/native/Paths.gmk
@@ -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
@@ -23,6 +23,9 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file contains functionality related to handling paths for source files
# and object files. This is complicated by the fact that we usually, but not
@@ -31,6 +34,7 @@
# "@-files", which we normally use to avoid hitting command line length limits.
# Finally this file contains functionality for locating all source code files
# that should be included in the compilation.
+################################################################################
################################################################################
# When absolute paths are not allowed in the output, and the compiler does not
@@ -240,3 +244,8 @@ define SetupObjectFileList
endif
endif
endef
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/conf/github-actions.conf b/make/conf/github-actions.conf
index a6b383daa8f..c25e51a48e4 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_aarch64_alpine-linux_hotspot_24_36.tar.gz
+ALPINE_LINUX_X64_BOOT_JDK_SHA256=4a673456aa6e726b86108a095a21868b7ebcdde050a92b3073d50105ff92f07f
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 e6204d2995e..02474f3dccb 100644
--- a/make/conf/jib-profiles.js
+++ b/make/conf/jib-profiles.js
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -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.
@@ -390,8 +391,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" : "");
@@ -1092,9 +1093,9 @@ var getJibProfilesDependencies = function (input, common) {
windows_x64: "VS2022-17.6.5+1.0",
linux_aarch64: "gcc13.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",
- linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
- linux_s390x: "gcc8.2.0-Fedora27+1.0",
- linux_riscv64: "gcc11.3.0-Fedora_rawhide_68692+1.1"
+ 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"
};
var devkit_platform = (input.target_cpu == "x86"
@@ -1186,9 +1187,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 +1237,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/module-loader-map.conf b/make/conf/module-loader-map.conf
index b628bfbf2da..92bffc0e9bc 100644
--- a/make/conf/module-loader-map.conf
+++ b/make/conf/module-loader-map.conf
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -103,6 +103,7 @@ NATIVE_ACCESS_MODULES= \
java.smartcardio \
jdk.accessibility \
jdk.attach \
+ jdk.compiler \
jdk.crypto.cryptoki \
jdk.crypto.mscapi \
jdk.hotspot.agent \
diff --git a/make/conf/version-numbers.conf b/make/conf/version-numbers.conf
index 383b7533dee..ce9e32315a9 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 99bd0beafbb..9065fe54d8b 100644
--- a/make/data/cldr/LICENSE
+++ b/make/data/cldr/LICENSE
@@ -1,8 +1,8 @@
-UNICODE LICENSE V3
+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 bb51229ede1..d8c29685cad 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 efe1565f53d..4ef94ba67ca 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 ee03c2275cc..973251f2f69 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 d55d3f40728..3abe9785334 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 6716f017f62..b7c64ddb38d 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 bb823863fa4..3ff6fb6dd06 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 00000000000..e96913cb575
--- /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 2b2ece15549..47b0c97a132 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 e0a78572fb7..6294b401369 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 c5bd77f0004..de95149f382 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 8469b5eccbd..2954f553cf4 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 2da80b51ca7..d4d325ef67c 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 d8967d4d32e..48f8dff2932 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 bb034325375..90189dfc452 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 461a309c8e6..63b142124c3 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 41dfaf5a2bc..ce49f3fb1a1 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 9dc9d40e06c..8252ebc2c7e 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 16cec039043..2ebe3630383 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 f4a944bcf93..96b3da01929 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 00000000000..c4f5bb4d5ac
--- /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 d386b4c4eae..2cfb4d16073 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 d6b56c0fedd..0a0cba9b2e8 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 d898ad0a4a3..a19e6779d87 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 69206ac3569..3c106149481 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 e983ecb3852..8b87d7e23d7 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 65b2d6819ea..1c9a5a0c62e 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 a4011a09aa4..d8e5052adef 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/devkit/Tools.gmk b/make/devkit/Tools.gmk
index 300501f5f35..249eaa66247 100644
--- a/make/devkit/Tools.gmk
+++ b/make/devkit/Tools.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -63,18 +63,14 @@ ifeq ($(BASE_OS), OL)
LINUX_VERSION := OL6.4
endif
else ifeq ($(BASE_OS), Fedora)
+ DEFAULT_OS_VERSION := 41
+ ifeq ($(BASE_OS_VERSION), )
+ BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
+ endif
ifeq ($(ARCH), riscv64)
- DEFAULT_OS_VERSION := rawhide/68692
- ifeq ($(BASE_OS_VERSION), )
- BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
- endif
- BASE_URL := http://fedora.riscv.rocks/repos-dist/$(BASE_OS_VERSION)/$(ARCH)/Packages/
+ BASE_URL := http://fedora.riscv.rocks/repos-dist/f$(BASE_OS_VERSION)/latest/$(ARCH)/Packages/
else
- DEFAULT_OS_VERSION := 27
LATEST_ARCHIVED_OS_VERSION := 35
- ifeq ($(BASE_OS_VERSION), )
- BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
- endif
ifeq ($(filter x86_64 armhfp, $(ARCH)), )
FEDORA_TYPE := fedora-secondary
else
@@ -203,7 +199,7 @@ RPM_LIST := \
glibc glibc-headers glibc-devel \
cups-libs cups-devel \
libX11 libX11-devel \
- xorg-x11-proto-devel \
+ libxcb xorg-x11-proto-devel \
alsa-lib alsa-lib-devel \
libXext libXext-devel \
libXtst libXtst-devel \
@@ -441,8 +437,9 @@ $(gcc) \
# wants.
$(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
-ifneq ($(ARCH), riscv64)
- # gold is not available for riscv64 for some reason,
+ifeq ($(filter $(ARCH), s390x riscv64 ppc64le), )
+ # gold compiles but cannot link properly on s390x @ gcc 13.2 and Fedore 41
+ # gold is not available for riscv64 and ppc64le,
# and subsequent linking will fail if we try to enable it.
LINKER_CONFIG := --enable-gold=default
endif
diff --git a/make/hotspot/CopyToExplodedJdk.gmk b/make/hotspot/CopyToExplodedJdk.gmk
index 21d68c7b06f..2848ed24b93 100644
--- a/make/hotspot/CopyToExplodedJdk.gmk
+++ b/make/hotspot/CopyToExplodedJdk.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
include CopyFiles.gmk
# Copy all built libraries into exploded jdk
@@ -57,3 +62,8 @@ else
TARGETS += $(COPY_LIBS) $(LINK_LIBS)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/HotspotCommon.gmk b/make/hotspot/HotspotCommon.gmk
index 3aacdf30c4c..661af26221c 100644
--- a/make/hotspot/HotspotCommon.gmk
+++ b/make/hotspot/HotspotCommon.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
ifeq ($(JVM_VARIANT), )
$(error This makefile must be called with JVM_VARIANT set)
endif
@@ -46,3 +51,8 @@ check-jvm-feature = \
$(if $(filter-out $(VALID_JVM_FEATURES), $1), \
$(error Internal error: Invalid feature tested: $1)) \
$(if $(filter $1, $(JVM_FEATURES_$(JVM_VARIANT))), true, false))
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/gensrc/GenerateSources.gmk b/make/hotspot/gensrc/GenerateSources.gmk
index 48fe7e25507..48715c8e71a 100644
--- a/make/hotspot/gensrc/GenerateSources.gmk
+++ b/make/hotspot/gensrc/GenerateSources.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,17 +23,16 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
include Execute.gmk
+include HotspotCommon.gmk
include JavaCompilation.gmk
include JdkNativeCompilation.gmk
include TextFileProcessing.gmk
-include HotspotCommon.gmk
-
# The real work is done in these files
include gensrc/GensrcJfr.gmk
@@ -41,8 +40,6 @@ include gensrc/GensrcAdlc.gmk
include gensrc/GensrcDtrace.gmk
include gensrc/GensrcJvmti.gmk
-$(eval $(call IncludeCustomExtension, hotspot/gensrc/GenerateSources.gmk))
-
# While technically the rules below are "gendata" which can be done in parallel
# with native compilation, let's keep it here for simplicity.
@@ -63,6 +60,6 @@ $(CHMOD_HOTSPOT_LAUNCHER): $(CREATE_HOTSPOT_LAUNCHER)
TARGETS += $(CREATE_HOTSPOT_LAUNCHER) $(CHMOD_HOTSPOT_LAUNCHER)
-all: $(TARGETS)
+################################################################################
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/hotspot/gensrc/GensrcAdlc.gmk b/make/hotspot/gensrc/GensrcAdlc.gmk
index d43a8b8d3ab..4cecc3070e7 100644
--- a/make/hotspot/gensrc/GensrcAdlc.gmk
+++ b/make/hotspot/gensrc/GensrcAdlc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,7 +23,10 @@
# questions.
#
-$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcAdlc.gmk))
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
ifeq ($(call check-jvm-feature, compiler2), true)
@@ -37,13 +40,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
ifeq ($(call isBuildOs, linux), true)
ADLC_CFLAGS := -fno-exceptions -DLINUX
else ifeq ($(call isBuildOs, aix), true)
- ifeq ($(TOOLCHAIN_TYPE), clang)
- ADLC_LDFLAGS += -m64
- ADLC_CFLAGS := -fno-rtti -fexceptions -ffunction-sections -m64 -DAIX -mcpu=pwr8
- else
- ADLC_LDFLAGS += -q64
- ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
- endif
+ ADLC_LDFLAGS += -m64
+ ADLC_CFLAGS := -fno-rtti -fexceptions -ffunction-sections -m64 -DAIX -mcpu=pwr8
else ifeq ($(call isBuildOs, windows), true)
ADLC_CFLAGS := -nologo -EHsc
ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
@@ -265,3 +263,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
TARGETS += $(ADLC_GENERATED_FILES)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/gensrc/GensrcDtrace.gmk b/make/hotspot/gensrc/GensrcDtrace.gmk
index 0cc0ff11093..e71c3cb961d 100644
--- a/make/hotspot/gensrc/GensrcDtrace.gmk
+++ b/make/hotspot/gensrc/GensrcDtrace.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,8 +23,12 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# Gensrc support for dtrace. The files generated here are included by dtrace.hpp
+################################################################################
ifeq ($(call check-jvm-feature, dtrace), true)
@@ -43,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:
@@ -52,3 +56,8 @@ ifeq ($(call check-jvm-feature, dtrace), true)
$(DTRACE_GENSRC_DIR)/%.h, $(wildcard $(DTRACE_SOURCE_DIR)/*.d))
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/gensrc/GensrcJfr.gmk b/make/hotspot/gensrc/GensrcJfr.gmk
index 545c6876ad6..d1d9eb5ec77 100644
--- a/make/hotspot/gensrc/GensrcJfr.gmk
+++ b/make/hotspot/gensrc/GensrcJfr.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,9 +23,12 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# Setup make rules for JFR gensrc file generation.
-#
+################################################################################
include $(TOPDIR)/make/ToolsHotspot.gmk
@@ -44,3 +47,8 @@ $(eval $(call SetupExecute, jfr_gen_headers, \
))
TARGETS += $(jfr_gen_headers)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/gensrc/GensrcJvmti.gmk b/make/hotspot/gensrc/GensrcJvmti.gmk
index b9c2e38b820..19eb4540947 100644
--- a/make/hotspot/gensrc/GensrcJvmti.gmk
+++ b/make/hotspot/gensrc/GensrcJvmti.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,12 +23,14 @@
# questions.
#
-include CopyFiles.gmk
-
-$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk))
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
# Build tools needed for the JVMTI source code generation
+################################################################################
+
+include CopyFiles.gmk
# FIXME: jvmtiGen.java should move to make/src, jvmtiEnvFill.java should be removed.
JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims
@@ -120,3 +122,8 @@ ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS)))
TARGETS += $(COPY_JVMTI_H)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/lib/CompileGtest.gmk b/make/hotspot/lib/CompileGtest.gmk
index 8e55c9b669b..d2cdc7685c9 100644
--- a/make/hotspot/lib/CompileGtest.gmk
+++ b/make/hotspot/lib/CompileGtest.gmk
@@ -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
@@ -22,8 +22,10 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
-$(eval $(call IncludeCustomExtension, hotspot/lib/CompileGtest.gmk))
+################################################################################
GTEST_TEST_SRC += $(TOPDIR)/test/hotspot/gtest
@@ -102,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, \
@@ -159,3 +162,6 @@ $(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
TARGETS += $(BUILD_GTEST_LAUNCHER)
################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
index ff4c7fd3af3..6b5edc85b23 100644
--- a/make/hotspot/lib/CompileJvm.gmk
+++ b/make/hotspot/lib/CompileJvm.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
include CopyFiles.gmk
# Include support files that will setup compiler flags due to the selected
@@ -84,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)"' \
#
################################################################################
@@ -125,9 +131,7 @@ else ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, aarch64)),
endif
endif
-ifeq ($(call isTargetOs, linux macosx windows), true)
- JVM_PRECOMPILED_HEADER := $(TOPDIR)/src/hotspot/share/precompiled/precompiled.hpp
-endif
+JVM_PRECOMPILED_HEADER := $(TOPDIR)/src/hotspot/share/precompiled/precompiled.hpp
ifeq ($(call isTargetCpu, x86), true)
JVM_EXCLUDE_PATTERNS += x86_64
@@ -361,3 +365,8 @@ ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
$(foreach o, $(BUILD_LIBJVM_ALL_OBJS), $(eval $(call SetupOperatorNewDeleteCheck,$o)))
endif
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/lib/CompileLibraries.gmk b/make/hotspot/lib/CompileLibraries.gmk
index 03ba95cac3c..9563c36eec6 100644
--- a/make/hotspot/lib/CompileLibraries.gmk
+++ b/make/hotspot/lib/CompileLibraries.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,14 +23,12 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
-include JdkNativeCompilation.gmk
+################################################################################
include HotspotCommon.gmk
-
+include JdkNativeCompilation.gmk
include lib/CompileJvm.gmk
ifneq ($(GTEST_FRAMEWORK_SRC), )
@@ -41,6 +39,6 @@ endif
include CopyToExplodedJdk.gmk
-all: $(TARGETS)
+################################################################################
-.PHONY: all
+include MakeFileEnd.gmk
diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk
index 09a48508eff..0a897230f83 100644
--- a/make/hotspot/lib/JvmFeatures.gmk
+++ b/make/hotspot/lib/JvmFeatures.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,11 +23,15 @@
# questions.
#
-$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFeatures.gmk))
+################################################################################
+
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
# Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which
# jvm features are selected for this jvm variant.
+################################################################################
ifeq ($(call check-jvm-feature, compiler1), true)
JVM_CFLAGS_FEATURES += -DCOMPILER1
@@ -220,11 +224,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 \
@@ -242,7 +244,6 @@ ifeq ($(call check-jvm-feature, opt-size), true)
linkResolver.cpp \
klass.cpp \
klassVtable.cpp \
- markSweep.cpp \
memRegion.cpp \
memoryPool.cpp \
method.cpp \
@@ -280,3 +281,8 @@ ifeq ($(call check-jvm-feature, opt-size), true)
BUILD_LIBJVM_systemDictionary.cpp_CXXFLAGS := -fno-optimize-sibling-calls
endif
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/lib/JvmFlags.gmk b/make/hotspot/lib/JvmFlags.gmk
index e5929ab994b..57b632ee532 100644
--- a/make/hotspot/lib/JvmFlags.gmk
+++ b/make/hotspot/lib/JvmFlags.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,10 +23,12 @@
# questions.
#
-$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFlags.gmk))
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
# Setup JVM_CFLAGS. These are shared between GensrcDtrace.gmk and CompileJvm.gmk.
+################################################################################
# This variable may be added to by a custom extension
JVM_SRC_ROOTS += $(TOPDIR)/src/hotspot
@@ -43,7 +45,6 @@ JVM_SRC_DIRS += $(call uniq, $(wildcard $(foreach d, $(JVM_SRC_ROOTS), \
JVM_CFLAGS_INCLUDES += \
$(patsubst %,-I%,$(JVM_SRC_DIRS)) \
- -I$(TOPDIR)/src/hotspot/share/precompiled \
-I$(TOPDIR)/src/hotspot/share/include \
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
@@ -90,14 +91,8 @@ JVM_CFLAGS += \
$(JVM_CFLAGS_TARGET_DEFINES) \
$(JVM_CFLAGS_FEATURES) \
$(JVM_CFLAGS_INCLUDES) \
- $(EXTRA_CFLAGS) \
#
-# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
-ifeq ($(USE_PRECOMPILED_HEADER), false)
- JVM_CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
-endif
-
ifneq ($(HOTSPOT_OVERRIDE_LIBPATH), )
JVM_CFLAGS += -DOVERRIDE_LIBPATH='"$(HOTSPOT_OVERRIDE_LIBPATH)"'
endif
@@ -105,3 +100,8 @@ endif
ifeq ($(ENABLE_COMPATIBLE_CDS_ALIGNMENT), true)
JVM_CFLAGS += -DCOMPATIBLE_CDS_ALIGNMENT
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk
index 6a513e10c61..3eedb64a597 100644
--- a/make/hotspot/lib/JvmOverrideFiles.gmk
+++ b/make/hotspot/lib/JvmOverrideFiles.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,11 +23,13 @@
# questions.
#
-$(eval $(call IncludeCustomExtension, hotspot/lib/JvmOverrideFiles.gmk))
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
# This file contains explicit overrides of CFLAGS and/or precompiled header
# status for individual files on specific platforms.
+################################################################################
ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments
@@ -52,16 +54,14 @@ ifneq ($(FDLIBM_CFLAGS), )
endif
ifeq ($(call isTargetOs, linux), true)
- BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
- BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
+ BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
+ BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
- ifeq ($(TOOLCHAIN_TYPE), clang)
- JVM_PRECOMPILED_HEADER_EXCLUDE := \
- sharedRuntimeTrig.cpp \
- sharedRuntimeTrans.cpp \
- $(OPT_SPEED_SRC) \
- #
- endif
+ JVM_PRECOMPILED_HEADER_EXCLUDE := \
+ sharedRuntimeTrig.cpp \
+ sharedRuntimeTrans.cpp \
+ $(OPT_SPEED_SRC) \
+ #
ifeq ($(call isTargetCpu, x86), true)
# Performance measurements show that by compiling GC related code, we could
@@ -110,11 +110,7 @@ else ifeq ($(call isTargetOs, macosx), true)
endif
else ifeq ($(call isTargetOs, aix), true)
- ifeq ($(TOOLCHAIN_TYPE), clang)
- BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -fno-inline
- else
- BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
- endif
+ BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -fno-inline
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
# Disable aggressive optimizations for functions in sharedRuntimeTrig.cpp
# and sharedRuntimeTrans.cpp on ppc64.
@@ -128,28 +124,32 @@ else ifeq ($(call isTargetOs, aix), true)
# mode, so don't optimize sharedRuntimeTrig.cpp at all.
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
- ifneq ($(DEBUG_LEVEL), slowdebug)
- # Compiling jvmtiEnterTrace.cpp with full optimization needs more than 30min
- # (mostly because of '-qhot=level=1' and the more than 1300 'log_trace' calls
- # which cause a lot of template expansion).
- BUILD_LIBJVM_jvmtiEnterTrace.cpp_OPTIMIZATION := LOW
- endif
-
# Disable ELF decoder on AIX (AIX uses XCOFF).
JVM_EXCLUDE_PATTERNS += elf
+ JVM_PRECOMPILED_HEADER_EXCLUDE := \
+ sharedRuntimeTrig.cpp \
+ sharedRuntimeTrans.cpp \
+ synchronizer.cpp \
+ $(OPT_SPEED_SRC) \
+ #
+
else ifeq ($(call isTargetOs, windows), true)
JVM_PRECOMPILED_HEADER_EXCLUDE := \
- bytecodeInterpreter.cpp \
- bytecodeInterpreterWithChecks.cpp \
opcodes.cpp \
os_windows.cpp \
os_windows_x86.cpp \
osThread_windows.cpp \
jvmciCompilerToVMInit.cpp \
+ $(OPT_SPEED_SRC) \
#
# Workaround for jvmciCompilerToVM.cpp long compilation time
BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_OPTIMIZATION := NONE
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/hotspot/test/GtestImage.gmk b/make/hotspot/test/GtestImage.gmk
index 3d6290837ee..524c0b36be8 100644
--- a/make/hotspot/test/GtestImage.gmk
+++ b/make/hotspot/test/GtestImage.gmk
@@ -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
@@ -23,10 +23,9 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
@@ -70,4 +69,6 @@ ifeq ($(call isTargetOs, windows), true)
)
endif
-all: $(TARGETS)
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/ide/eclipse/CreateWorkspace.gmk b/make/ide/eclipse/CreateWorkspace.gmk
index 50d04ad87af..052693dbb2d 100644
--- a/make/ide/eclipse/CreateWorkspace.gmk
+++ b/make/ide/eclipse/CreateWorkspace.gmk
@@ -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
@@ -23,13 +23,13 @@
# questions.
#
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
+
+include Modules.gmk
include TextFileProcessing.gmk
include Utils.gmk
-include Modules.gmk
JVM_VARIANT := $(JVM_VARIANT_MAIN)
include hotspot/HotspotCommon.gmk
@@ -356,4 +356,6 @@ else
))
endif
-all: $(TARGETS)
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/ide/idea/jdk/idea.gmk b/make/ide/idea/jdk/IdeaGenConfig.gmk
similarity index 61%
rename from make/ide/idea/jdk/idea.gmk
rename to make/ide/idea/jdk/IdeaGenConfig.gmk
index b27de609c49..5f8afc47117 100644
--- a/make/ide/idea/jdk/idea.gmk
+++ b/make/ide/idea/jdk/IdeaGenConfig.gmk
@@ -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
@@ -23,36 +23,38 @@
# questions.
#
-include Makefile
-include make/MainSupport.gmk
+include MakeFileStart.gmk
-.PHONY: idea
+################################################################################
-ifeq ($(SPEC), )
- ifneq ($(words $(SPECS)), 1)
- @echo "Error: Multiple build specification files found. Please select one explicitly."
- @exit 2
- endif
- idea:
- @cd $(topdir)
- @$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/ide/idea/jdk/idea.gmk SPEC=$(SPECS) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) MODULES="$(MODULES)" idea
-else #with SPEC
- include make/common/Modules.gmk
+include Modules.gmk
- ifeq ($(MODULES), )
- SEL_MODULES := $(call FindAllModules)
- else
- SEL_MODULES := $(MODULES)
- endif
+# MODULES and IDEA_OUTPUT is passed on the command line
+ifeq ($(MODULES), )
+ override MODULES := $(call FindAllModules)
+endif
- idea:
+ifeq ($(IDEA_OUTPUT), )
+ override IDEA_OUTPUT := $(WORKSPACE_ROOT)/.idea
+endif
+
+OUT := $(IDEA_OUTPUT)/env.cfg
+
+idea:
+ $(RM) $(OUT)
$(ECHO) "SUPPORT=$(SUPPORT_OUTPUTDIR)" >> $(OUT)
- $(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindModuleSrcDirs, $(mod)))\"" >> $(OUT)
- $(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT)
- $(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT)
+ $(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(MODULES), $(call FindModuleSrcDirs, $(mod)))\"" >> $(OUT)
+ $(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(MODULES), $(mod)))\"" >> $(OUT)
+ $(ECHO) "SEL_MODULES=\"$(MODULES)\"" >> $(OUT)
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
$(ECHO) "CYGPATH=\"$(PATHTOOL)\"" >> $(OUT)
$(ECHO) "SPEC=\"$(SPEC)\"" >> $(OUT)
$(ECHO) "JT_HOME=\"$(JT_HOME)\"" >> $(OUT)
-endif
+all: idea
+
+.PHONY: idea
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/ide/visualstudio/hotspot/CreateVSProject.gmk b/make/ide/visualstudio/hotspot/CreateVSProject.gmk
index db48cdea9f7..b2afbe2b9bc 100644
--- a/make/ide/visualstudio/hotspot/CreateVSProject.gmk
+++ b/make/ide/visualstudio/hotspot/CreateVSProject.gmk
@@ -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
@@ -23,13 +23,12 @@
# questions.
#
-# This must be the first rule
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
include Execute.gmk
+include JavaCompilation.gmk
ifeq ($(call isTargetOs, windows), true)
# The next part is a bit hacky. We include the CompileJvm.gmk to be
@@ -144,11 +143,11 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(vcproj_file_TARGET)
- all: $(TARGETS)
-
else
all:
$(info Hotspot Visual Studio generation only supported on Windows)
endif
-.PHONY: all
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/ide/vscode/hotspot/CreateVSCodeProject.gmk b/make/ide/vscode/hotspot/CreateVSCodeProject.gmk
index 54c98a3eeb6..11f25c152f6 100644
--- a/make/ide/vscode/hotspot/CreateVSCodeProject.gmk
+++ b/make/ide/vscode/hotspot/CreateVSCodeProject.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2019, 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
@@ -23,11 +23,7 @@
# questions.
#
-# This must be the first rule
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
+include MakeFileStart.gmk
################################################################################
# SedEscape
@@ -115,6 +111,8 @@ $(OUTPUTDIR)/.vscode/launch.json:
TARGETS := $(OUTPUTDIR)/jdk.code-workspace $(OUTPUTDIR)/.vscode/tasks.json \
$(OUTPUTDIR)/.vscode/launch.json
-all: $(TARGETS)
+.PHONY: $(TARGETS)
-.PHONY: all $(TARGETS)
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/ide/vscode/hotspot/indexers/ccls-settings.txt b/make/ide/vscode/hotspot/indexers/ccls-settings.txt
index 53fad0df8d4..bacc49c6112 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 03339540291..2a5b5e4a8cb 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 b19e6869b6c..75727ae17f1 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/ide/xcode/hotspot/CreateXcodeProject.gmk b/make/ide/xcode/hotspot/CreateXcodeProject.gmk
index 1f92ba0716f..3476078b243 100644
--- a/make/ide/xcode/hotspot/CreateXcodeProject.gmk
+++ b/make/ide/xcode/hotspot/CreateXcodeProject.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,11 +23,10 @@
# questions.
#
-# This must be the first rule
-default: all
+include MakeFileStart.gmk
+
+################################################################################
-include $(SPEC)
-include MakeBase.gmk
include CopyFiles.gmk
include Execute.gmk
include JavaCompilation.gmk
@@ -100,8 +99,6 @@ ifeq ($(call isTargetOs, macosx), true)
build: $(build_xcode_project) $(copy_xcode_project)
open: $(open_xcode_project)
-
- all: $(TARGETS)
else
build:
open:
@@ -109,4 +106,8 @@ else
$(info Xcode projects are only supported on macOS)
endif
-.PHONY: default all build open
+.PHONY: build open
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java b/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
index 61395f982b2..d8752bca142 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 @@ class Bundle {
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 d2d7e94fc98..6d5dde0d181 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 @@ class LDMLParseHandler extends AbstractLDMLHandler {
}
@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/modules/java.base/Copy.gmk b/make/modules/java.base/Copy.gmk
index 7e3a0e9c3ab..e33676529cd 100644
--- a/make/modules/java.base/Copy.gmk
+++ b/make/modules/java.base/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,15 +23,12 @@
# questions.
#
+################################################################################
+
include CopyCommon.gmk
include Modules.gmk
include TextFileProcessing.gmk
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, modules/java.base/Copy.gmk))
-
-################################################################################
-
ifeq ($(call isTargetOs, aix), true)
TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
diff --git a/make/modules/java.base/Gendata.gmk b/make/modules/java.base/Gendata.gmk
index 9e5cfe2d0fc..edb8e050bbf 100644
--- a/make/modules/java.base/Gendata.gmk
+++ b/make/modules/java.base/Gendata.gmk
@@ -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
@@ -23,17 +23,14 @@
# questions.
#
+################################################################################
+
include GendataCommon.gmk
-
-include gendata/GendataBreakIterator.gmk
-
-include gendata/GendataTZDB.gmk
-
include gendata/GendataBlockedCerts.gmk
-
+include gendata/GendataBreakIterator.gmk
include gendata/GendataCryptoPolicy.gmk
-
include gendata/GendataPublicSuffixList.gmk
+include gendata/GendataTZDB.gmk
################################################################################
diff --git a/make/modules/java.base/Gensrc.gmk b/make/modules/java.base/Gensrc.gmk
index 6eae7edd078..3a482388bec 100644
--- a/make/modules/java.base/Gensrc.gmk
+++ b/make/modules/java.base/Gensrc.gmk
@@ -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
@@ -23,18 +23,20 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
-include gensrc/GensrcCharacterData.gmk
-include gensrc/GensrcMisc.gmk
-include gensrc/GensrcCharsetMapping.gmk
-include gensrc/GensrcCharsetCoder.gmk
include gensrc/GensrcBuffer.gmk
+include gensrc/GensrcCharacterData.gmk
+include gensrc/GensrcCharsetCoder.gmk
+include gensrc/GensrcCharsetMapping.gmk
include gensrc/GensrcExceptions.gmk
-include gensrc/GensrcVarHandles.gmk
+include gensrc/GensrcMisc.gmk
include gensrc/GensrcModuleLoaderMap.gmk
-include gensrc/GensrcScopedMemoryAccess.gmk
include gensrc/GensrcRegex.gmk
+include gensrc/GensrcScopedMemoryAccess.gmk
+include gensrc/GensrcVarHandles.gmk
################################################################################
@@ -78,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)
################################################################################
@@ -113,3 +116,5 @@ $(INTPOLY_GEN_DONE): $(INTPLOY_HEADER) $(BUILD_TOOLS_JDK)
$(TOUCH) $@
TARGETS += $(INTPOLY_GEN_DONE)
+
+################################################################################
diff --git a/make/modules/java.base/Java.gmk b/make/modules/java.base/Java.gmk
index 5820c280fe9..84344f93409 100644
--- a/make/modules/java.base/Java.gmk
+++ b/make/modules/java.base/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
# The base module should be built with all warnings enabled. When a
# new warning is added to javac, it can be temporarily added to the
# disabled warnings list.
@@ -57,3 +59,5 @@ ifeq ($(call isTargetOs, windows), true)
sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
#
endif
+
+################################################################################
diff --git a/make/modules/java.base/Launcher.gmk b/make/modules/java.base/Launcher.gmk
index 024c1c4731b..c249656f188 100644
--- a/make/modules/java.base/Launcher.gmk
+++ b/make/modules/java.base/Launcher.gmk
@@ -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
@@ -23,10 +23,9 @@
# questions.
#
-include LauncherCommon.gmk
+################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, modules/java.base/Launcher.gmk))
+include LauncherCommon.gmk
JAVA_VERSION_INFO_RESOURCE := \
$(TOPDIR)/src/java.base/windows/native/launcher/java.rc
@@ -38,7 +37,8 @@ JAVA_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
################################################################################
$(eval $(call SetupBuildLauncher, java, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
+ ENABLE_ARG_FILES := true, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
OPTIMIZATION := HIGH, \
@@ -50,7 +50,9 @@ $(eval $(call SetupBuildLauncher, java, \
ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupBuildLauncher, javaw, \
- CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
+ ENABLE_ARG_FILES := true, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
+ WINDOWS_JAVAW := true, \
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
))
@@ -100,3 +102,5 @@ ifeq ($(call isTargetOsType, unix), true)
TARGETS += $(BUILD_JSPAWNHELPER)
endif
+
+################################################################################
diff --git a/make/modules/java.base/Lib.gmk b/make/modules/java.base/Lib.gmk
index 2c3df4622b1..84ee309dadd 100644
--- a/make/modules/java.base/Lib.gmk
+++ b/make/modules/java.base/Lib.gmk
@@ -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
@@ -23,12 +23,11 @@
# questions.
#
+################################################################################
+
include CopyFiles.gmk
include LibCommon.gmk
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, modules/java.base/Lib.gmk))
-
# Prepare the find cache.
$(call FillFindCache, $(wildcard $(TOPDIR)/src/java.base/*/native))
@@ -82,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 \
@@ -125,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)
@@ -200,3 +200,5 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2)
TARGETS += $(BUILD_LIBSIMD_SORT)
endif
+
+################################################################################
diff --git a/make/modules/java.base/gendata/GendataBlockedCerts.gmk b/make/modules/java.base/gendata/GendataBlockedCerts.gmk
index b6149b457cd..c26b4cdeed7 100644
--- a/make/modules/java.base/gendata/GendataBlockedCerts.gmk
+++ b/make/modules/java.base/gendata/GendataBlockedCerts.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENDATA_BLOCKED_CERTS_SRC += $(MODULE_SRC)/share/data/blockedcertsconverter/blocked.certs.pem
GENDATA_BLOCKED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blocked.certs
@@ -32,3 +37,8 @@ $(GENDATA_BLOCKED_CERTS): $(BUILD_TOOLS_JDK) $(GENDATA_BLOCKED_CERTS_SRC)
($(CAT) $(GENDATA_BLOCKED_CERTS_SRC) | $(TOOL_BLOCKED_CERTS) > $@) || exit 1
TARGETS += $(GENDATA_BLOCKED_CERTS)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gendata/GendataBreakIterator.gmk b/make/modules/java.base/gendata/GendataBreakIterator.gmk
index 857ce2b7c34..7aa26d5490b 100644
--- a/make/modules/java.base/gendata/GendataBreakIterator.gmk
+++ b/make/modules/java.base/gendata/GendataBreakIterator.gmk
@@ -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
@@ -23,9 +23,12 @@
# questions.
#
-#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# Make file for generating BreakIterator data files.
-#
+################################################################################
# input
#
@@ -111,3 +114,8 @@ $(LD_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS_JDK) $(UNICODEDATA) \
$(TOUCH) $@
TARGETS += $(BIFILES) $(BIFILES_TH)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gendata/GendataCryptoPolicy.gmk b/make/modules/java.base/gendata/GendataCryptoPolicy.gmk
index c63b36fe058..f4774cb1f28 100644
--- a/make/modules/java.base/gendata/GendataCryptoPolicy.gmk
+++ b/make/modules/java.base/gendata/GendataCryptoPolicy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
#
# In pre-JDK9 releases, Oracle JDK has had a separately downloadable set
# of policy files which has been a nightmare for deployment.
@@ -37,12 +42,6 @@
# determines the default directory/policy.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-
################################################################################
POLICY_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/java.base/security/policy
LIMITED_POLICY_DIR := $(POLICY_DIR)/limited
@@ -70,3 +69,6 @@ TARGETS += \
$(UNLIMITED_POLICY_DIR)/default_local.policy \
################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gendata/GendataPublicSuffixList.gmk b/make/modules/java.base/gendata/GendataPublicSuffixList.gmk
index 189fccf0c0d..563b728c38d 100644
--- a/make/modules/java.base/gendata/GendataPublicSuffixList.gmk
+++ b/make/modules/java.base/gendata/GendataPublicSuffixList.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, 2022, 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
@@ -23,7 +23,10 @@
# questions.
#
-include $(SPEC)
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
GENDATA_PUBLICSUFFIXLIST_SRC += $(MODULE_SRC)/share/data/publicsuffixlist/public_suffix_list.dat
GENDATA_PUBLICSUFFIXLIST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/public_suffix_list.dat
@@ -36,3 +39,8 @@ $(GENDATA_PUBLICSUFFIXLIST): $(GENDATA_PUBLICSUFFIXLIST_SRC) $(BUILD_TOOLS_JDK)
$(CHMOD) 444 $@
TARGETS += $(GENDATA_PUBLICSUFFIXLIST)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gendata/GendataTZDB.gmk b/make/modules/java.base/gendata/GendataTZDB.gmk
index fbdd9ff3749..4674c687a24 100644
--- a/make/modules/java.base/gendata/GendataTZDB.gmk
+++ b/make/modules/java.base/gendata/GendataTZDB.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2022, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENDATA_TZDB :=
#
@@ -40,3 +45,8 @@ $(GENDATA_TZDB_DAT): $(TZDATA_TZFILES)
$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
TARGETS += $(GENDATA_TZDB_DAT)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcBuffer.gmk b/make/modules/java.base/gensrc/GensrcBuffer.gmk
index fe417e9c423..f769a8e61e0 100644
--- a/make/modules/java.base/gensrc/GensrcBuffer.gmk
+++ b/make/modules/java.base/gensrc/GensrcBuffer.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENSRC_BUFFER :=
GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
@@ -380,3 +385,8 @@ $(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF), type := d
$(GENSRC_BUFFER): $(BUILD_TOOLS_JDK)
TARGETS += $(GENSRC_BUFFER)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcCharacterData.gmk b/make/modules/java.base/gensrc/GensrcCharacterData.gmk
index beee18000f1..c05b126299b 100644
--- a/make/modules/java.base/gensrc/GensrcCharacterData.gmk
+++ b/make/modules/java.base/gensrc/GensrcCharacterData.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2023, 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
@@ -23,9 +23,12 @@
# questions.
#
-#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/lang/CharacterData*.java
-#
+################################################################################
GENSRC_CHARACTERDATA :=
@@ -66,3 +69,8 @@ $(eval $(call SetupCharacterData,CharacterData0E, -string -plane 14, 11 4 1))
$(GENSRC_CHARACTERDATA): $(BUILD_TOOLS_JDK)
TARGETS += $(GENSRC_CHARACTERDATA)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk b/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk
index 2940ba42319..3e654d0b7a8 100644
--- a/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk
+++ b/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENSRC_CHARSETCODER :=
GENSRC_CHARSETCODER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset
@@ -108,3 +113,8 @@ GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
$(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK)
TARGETS += $(GENSRC_CHARSETCODER)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk b/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk
index b9a8f269a7d..8a9b9dfee5c 100644
--- a/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk
+++ b/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2020, 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
@@ -23,11 +23,14 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
-#
# Generate StandardCharsets.java and individul sun.nio.cs charset class using
# the charsetmapping tool
-#
+################################################################################
+
CHARSET_DATA_DIR := $(TOPDIR)/make/data/charsetmapping
CHARSET_EXTSRC_DIR := $(TOPDIR)/src/jdk.charsets/share/classes/sun/nio/cs/ext
CHARSET_GENSRC_JAVA_DIR_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
@@ -54,3 +57,8 @@ $(CHARSET_DONE_BASE)-stdcs: $(CHARSET_DATA_DIR)/charsets \
$(TOUCH) '$@'
TARGETS += $(CHARSET_DONE_BASE)-stdcs
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcExceptions.gmk b/make/modules/java.base/gensrc/GensrcExceptions.gmk
index 9fa5d48009b..baa61596d6b 100644
--- a/make/modules/java.base/gensrc/GensrcExceptions.gmk
+++ b/make/modules/java.base/gensrc/GensrcExceptions.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENSRC_EXCEPTIONS :=
GENSRC_EXCEPTIONS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
@@ -45,3 +50,8 @@ GENSRC_EXCEPTIONS += $(foreach D, $(GENSRC_EXCEPTIONS_SRC_DIRS), $(GENSRC_EXCEPT
$(GENSRC_EXCEPTIONS): $(BUILD_TOOLS_JDK)
TARGETS += $(GENSRC_EXCEPTIONS)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcMisc.gmk b/make/modules/java.base/gensrc/GensrcMisc.gmk
index a5bbd37321c..edb5e8bc58e 100644
--- a/make/modules/java.base/gensrc/GensrcMisc.gmk
+++ b/make/modules/java.base/gensrc/GensrcMisc.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
################################################################################
# Install the launcher name, release version string, full version
# string and the runtime name into the VersionProps.java file.
@@ -154,3 +159,8 @@ ifneq ($(wildcard $(TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity
TARGETS += $(BUILD_JCESECURITY_JAVA)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk b/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk
index ce91cdc861c..13b985df3ef 100644
--- a/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk
+++ b/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
include Modules.gmk
$(eval $(call ReadImportMetaData))
@@ -58,3 +63,6 @@ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java:
TARGETS += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java
################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcRegex.gmk b/make/modules/java.base/gensrc/GensrcRegex.gmk
index 6384d36de59..c46a029e2c2 100644
--- a/make/modules/java.base/gensrc/GensrcRegex.gmk
+++ b/make/modules/java.base/gensrc/GensrcRegex.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,10 +23,13 @@
# questions.
#
-#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# Rules to create java files under
# $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/
-#
+################################################################################
GENSRC_INDICCONJUNCTBREAK := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/IndicConjunctBreak.java
@@ -44,3 +47,8 @@ $(GENSRC_INDICCONJUNCTBREAK): $(BUILD_TOOLS_JDK) $(INDICCONJUNCTBREAKTEMP) $(IND
$(INDICCONJUNCTBREAKPARAMS)
TARGETS += $(GENSRC_INDICCONJUNCTBREAK)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk b/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk
index 54fea77571e..00fba64394b 100644
--- a/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk
+++ b/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
SCOPED_MEMORY_ACCESS_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/misc
SCOPED_MEMORY_ACCESS_SRC_DIR := $(MODULE_SRC)/share/classes/jdk/internal/misc
SCOPED_MEMORY_ACCESS_TEMPLATE := $(SCOPED_MEMORY_ACCESS_SRC_DIR)/X-ScopedMemoryAccess.java.template
@@ -37,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)
@@ -45,6 +61,7 @@ define GenerateScopedOp
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+ $1_ARGS += -KCAS
$1_ARGS += -Kbyte
endif
@@ -55,6 +72,8 @@ define GenerateScopedOp
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -KCAS
$1_ARGS += -KUnaligned
endif
@@ -65,6 +84,8 @@ define GenerateScopedOp
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
+
+ $1_ARGS += -KCAS
$1_ARGS += -KUnaligned
endif
@@ -77,8 +98,6 @@ define GenerateScopedOp
$1_RawBoxType := $$($1_BoxType)
$1_ARGS += -KCAS
- $1_ARGS += -KAtomicAdd
- $1_ARGS += -KBitwise
$1_ARGS += -KUnaligned
endif
@@ -91,8 +110,6 @@ define GenerateScopedOp
$1_RawBoxType := $$($1_BoxType)
$1_ARGS += -KCAS
- $1_ARGS += -KAtomicAdd
- $1_ARGS += -KBitwise
$1_ARGS += -KUnaligned
endif
@@ -128,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
@@ -136,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)))
@@ -149,3 +166,8 @@ $(SCOPED_MEMORY_ACCESS_DEST): $(BUILD_TOOLS_JDK) $(SCOPED_MEMORY_ACCESS_TEMPLATE
$(PRINTF) "}\n" >> $(SCOPED_MEMORY_ACCESS_DEST)
TARGETS += $(SCOPED_MEMORY_ACCESS_DEST)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/gensrc/GensrcVarHandles.gmk b/make/modules/java.base/gensrc/GensrcVarHandles.gmk
index fe4c4e97648..899f827462c 100644
--- a/make/modules/java.base/gensrc/GensrcVarHandles.gmk
+++ b/make/modules/java.base/gensrc/GensrcVarHandles.gmk
@@ -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.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENSRC_VARHANDLES :=
VARHANDLES_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/invoke
@@ -169,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)
@@ -178,6 +195,7 @@ define GenerateVarHandleMemorySegment
$1_RawBoxType := $$($1_BoxType)
$1_ARGS += -Kbyte
+ $1_ARGS += -KShorterThanInt
endif
ifeq ($$($1_Type), Short)
@@ -187,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)
@@ -196,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)
@@ -272,8 +294,13 @@ $(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)))
TARGETS += $(GENSRC_VARHANDLES)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk
index 61ac495968a..316103be4cd 100644
--- a/make/modules/java.base/lib/CoreLibraries.gmk
+++ b/make/modules/java.base/lib/CoreLibraries.gmk
@@ -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
@@ -23,18 +23,18 @@
# questions.
#
+include MakeIncludeStart.gmk
+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, \
@@ -167,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, \
@@ -182,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 \
@@ -192,3 +200,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
))
TARGETS += $(BUILD_LIBJLI)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.compiler/Java.gmk b/make/modules/java.compiler/Java.gmk
index 04f31a9bc66..cb720672639 100644
--- a/make/modules/java.compiler/Java.gmk
+++ b/make/modules/java.compiler/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
# To the extent technically possible, this module should be built with
# -Werror and all lint warnings enabled. In particular,
# DISABLED_WARNINGS_java should not be augmented.
@@ -31,3 +33,5 @@ DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
EXCLUDES += javax/tools/snippet-files
+
+################################################################################
diff --git a/make/modules/java.datatransfer/Java.gmk b/make/modules/java.datatransfer/Java.gmk
index 6c5332f6457..47eb6e26577 100644
--- a/make/modules/java.datatransfer/Java.gmk
+++ b/make/modules/java.datatransfer/Java.gmk
@@ -1,5 +1,5 @@
#
-# 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
@@ -23,8 +23,12 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
COPY += flavormap.properties
+
+################################################################################
diff --git a/make/modules/java.desktop/Copy.gmk b/make/modules/java.desktop/Copy.gmk
index 4232e62552c..9acca9f688c 100644
--- a/make/modules/java.desktop/Copy.gmk
+++ b/make/modules/java.desktop/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,11 +23,11 @@
# questions.
#
+################################################################################
+
include CopyCommon.gmk
include Modules.gmk
-################################################################################
-
$(CONF_DST_DIR)/sound.properties: $(TOPDIR)/src/java.desktop/share/conf/sound.properties
$(call install-file)
diff --git a/make/modules/java.desktop/Gendata.gmk b/make/modules/java.desktop/Gendata.gmk
index a3f0c926ca6..3df4610bd1d 100644
--- a/make/modules/java.desktop/Gendata.gmk
+++ b/make/modules/java.desktop/Gendata.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2020, 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
@@ -23,8 +23,10 @@
# questions.
#
+################################################################################
+
include GendataCommon.gmk
-
include gendata/GendataFontConfig.gmk
-
include gendata/GendataHtml32dtd.gmk
+
+################################################################################
diff --git a/make/modules/java.desktop/Gensrc.gmk b/make/modules/java.desktop/Gensrc.gmk
index f7609107973..ceeade7a96d 100644
--- a/make/modules/java.desktop/Gensrc.gmk
+++ b/make/modules/java.desktop/Gensrc.gmk
@@ -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
@@ -23,10 +23,9 @@
# questions.
#
-include GensrcCommon.gmk
+################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, modules/java.desktop/Gensrc.gmk))
+include GensrcCommon.gmk
ifeq ($(call isTargetOs, windows), false)
include gensrc/GensrcIcons.gmk
@@ -77,3 +76,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
))
TARGETS += $(COMPILE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/java.desktop/Java.gmk b/make/modules/java.desktop/Java.gmk
index a13b4b1ba35..61c7fa44e0e 100644
--- a/make/modules/java.desktop/Java.gmk
+++ b/make/modules/java.desktop/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
@@ -139,3 +141,5 @@ EXCLUDE_FILES += \
javax/swing/plaf/nimbus/SplitPanePainter.java \
javax/swing/plaf/nimbus/TabbedPanePainter.java \
#
+
+################################################################################
diff --git a/make/modules/java.desktop/Lib.gmk b/make/modules/java.desktop/Lib.gmk
index 18f386ae6b4..830e0553c39 100644
--- a/make/modules/java.desktop/Lib.gmk
+++ b/make/modules/java.desktop/Lib.gmk
@@ -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
@@ -23,12 +23,11 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
include Execute.gmk
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, modules/java.desktop/Lib.gmk))
-
# Prepare the find cache.
$(call FillFindCache, $(wildcard $(TOPDIR)/src/java.desktop/*/native))
@@ -131,3 +130,5 @@ ifeq ($(call isTargetOs, macosx), true)
TARGETS += $(BUILD_LIBOSX)
endif
+
+################################################################################
diff --git a/make/modules/java.desktop/gendata/GendataFontConfig.gmk b/make/modules/java.desktop/gendata/GendataFontConfig.gmk
index 92a64b986e1..572adb4376e 100644
--- a/make/modules/java.desktop/gendata/GendataFontConfig.gmk
+++ b/make/modules/java.desktop/gendata/GendataFontConfig.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
FONTCONFIG_DATA_DIR := $(MODULE_SRC)/$(OPENJDK_TARGET_OS)/data/fontconfig
FONTCONFIG_SRC_FILE := $(FONTCONFIG_DATA_DIR)/fontconfig.properties
@@ -55,3 +60,8 @@ ifneq ($(wildcard $(FONTCONFIG_SRC_FILE)), )
TARGETS += $(FONTCONFIG_OUT_BIN_FILE)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk b/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk
index bf3e0a1b4ed..2c5899c91c2 100644
--- a/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk
+++ b/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, 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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENDATA_HTML32DTD :=
HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd
@@ -33,3 +38,8 @@ $(HTML32DTD): $(BUILD_TOOLS_JDK)
($(TOOL_DTDBUILDER) html32 > $@) || exit 1
TARGETS += $(HTML32DTD)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.desktop/gensrc/GensrcIcons.gmk b/make/modules/java.desktop/gensrc/GensrcIcons.gmk
index 4e572211334..bc7f580fe76 100644
--- a/make/modules/java.desktop/gensrc/GensrcIcons.gmk
+++ b/make/modules/java.desktop/gensrc/GensrcIcons.gmk
@@ -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
@@ -23,6 +23,11 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
+
GENSRC_AWT_ICONS :=
GENSRC_AWT_ICONS_SRC :=
GENSRC_AWT_ICONS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
@@ -108,3 +113,8 @@ ifeq ($(call isTargetOs, macosx), true)
TARGETS += $(GENSRC_OSX_ICONS)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.desktop/gensrc/GensrcSwing.gmk b/make/modules/java.desktop/gensrc/GensrcSwing.gmk
index abd428f3641..a59499e9b1a 100644
--- a/make/modules/java.desktop/gensrc/GensrcSwing.gmk
+++ b/make/modules/java.desktop/gensrc/GensrcSwing.gmk
@@ -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
@@ -23,9 +23,13 @@
# questions.
#
-#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# Generate java files for javax.swing.plaf package
-#
+################################################################################
+
NIMBUS_PACKAGE = javax.swing.plaf
NIMBUS_GENSRC_DIR = $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/nimbus
NIMBUS_SKIN_FILE = $(MODULE_SRC)/share/classes/javax/swing/plaf/nimbus/skin.laf
@@ -41,3 +45,8 @@ $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FI
GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus
TARGETS += $(GENSRC_SWING_NIMBUS)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk b/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk
index 25402ad035a..fa271fc55ff 100644
--- a/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk
+++ b/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2022, 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
@@ -23,8 +23,13 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
+################################################################################
# Generate java sources using the X11 offsets that are precalculated in files
# src/java.desktop/unix/data/x11wrappergen/sizes-.txt.
+################################################################################
# Put the generated Java classes used to interface X11 from awt here.
GENSRC_X11WRAPPERS_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
@@ -45,3 +50,8 @@ $(eval $(call SetupExecute, gen_x11wrappers, \
))
TARGETS += $(gen_x11wrappers_TARGET)
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.desktop/lib/AwtLibraries.gmk b/make/modules/java.desktop/lib/AwtLibraries.gmk
index 5ba7c819008..5414c93c908 100644
--- a/make/modules/java.desktop/lib/AwtLibraries.gmk
+++ b/make/modules/java.desktop/lib/AwtLibraries.gmk
@@ -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
@@ -23,12 +23,16 @@
# questions.
#
-include CopyFiles.gmk
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
################################################################################
# This file will build all AWT/2D native libraries with "awt" in the name.
# Note that this does not imply that the code they bring in belong to AWT.
# This split is purely made to keep the size of the Makefiles reasonable.
+################################################################################
+
+include CopyFiles.gmk
LIBAWT_DEFAULT_HEADER_DIRS := \
common/awt/utility \
@@ -91,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, \
@@ -136,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)
@@ -216,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
@@ -281,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), \
))
@@ -437,3 +456,8 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(COPY_JAWT_LIB)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.desktop/lib/ClientLibraries.gmk b/make/modules/java.desktop/lib/ClientLibraries.gmk
index 41f3040222c..a9511fba58b 100644
--- a/make/modules/java.desktop/lib/ClientLibraries.gmk
+++ b/make/modules/java.desktop/lib/ClientLibraries.gmk
@@ -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
@@ -23,11 +23,15 @@
# questions.
#
+include MakeIncludeStart.gmk
+ifeq ($(INCLUDE), true)
+
################################################################################
# This file will build all AWT/2D native libraries that does not have "awt" in
# the name. Note that this does not imply anything about the logical ownership
# of the code they compile.
# This split is purely made to keep the size of the Makefiles reasonable.
+################################################################################
################################################################################
## Build libmlib_image
@@ -63,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)
@@ -222,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, \
@@ -242,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 := \
@@ -252,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), \
))
@@ -327,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+.
@@ -360,8 +366,6 @@ else
LIBFONTMANAGER_JDK_LIBS += libfreetype
endif
-LIBFONTMANAGER_OPTIMIZATION := HIGHEST
-
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
# gcc (and to an extent clang) is particularly bad at optimizing these files,
# causing a massive spike in compile time. We don't care about these
@@ -372,7 +376,6 @@ endif
ifeq ($(call isTargetOs, windows), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c
- LIBFONTMANAGER_OPTIMIZATION := HIGHEST
else ifeq ($(call isTargetOs, macosx), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c \
fontpath.c lcdglyph.c
@@ -393,7 +396,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
AccelGlyphCache.c, \
CFLAGS := $(LIBFONTMANAGER_CFLAGS), \
CXXFLAGS := $(LIBFONTMANAGER_CFLAGS), \
- OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
+ OPTIMIZATION := HIGHEST, \
CFLAGS_windows = -DCC_NOEX, \
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
EXTRA_SRC := $(LIBFONTMANAGER_EXTRA_SRC), \
@@ -406,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 := \
@@ -470,3 +474,8 @@ ifeq ($(call isTargetOs, macosx), true)
$(BUILD_LIBOSXUI): $(SHADERS_LIB)
endif
+
+################################################################################
+
+endif # include guard
+include MakeIncludeEnd.gmk
diff --git a/make/modules/java.instrument/Java.gmk b/make/modules/java.instrument/Java.gmk
index f49e425718e..6e5ea0e2c73 100644
--- a/make/modules/java.instrument/Java.gmk
+++ b/make/modules/java.instrument/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 2021, 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
@@ -23,5 +23,9 @@
# questions.
#
+################################################################################
+
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
+
+################################################################################
diff --git a/make/modules/java.instrument/Lib.gmk b/make/modules/java.instrument/Lib.gmk
index 675c1d8ccd3..609814c86ed 100644
--- a/make/modules/java.instrument/Lib.gmk
+++ b/make/modules/java.instrument/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -33,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, \
@@ -48,3 +53,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \
))
TARGETS += $(BUILD_LIBINSTRUMENT)
+
+################################################################################
diff --git a/make/modules/java.logging/Copy.gmk b/make/modules/java.logging/Copy.gmk
index 8c9e677b861..36d70ed5555 100644
--- a/make/modules/java.logging/Copy.gmk
+++ b/make/modules/java.logging/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,10 +23,10 @@
# questions.
#
-include CopyCommon.gmk
-
################################################################################
+include CopyCommon.gmk
+
LOGGING_LIB_SRC := $(TOPDIR)/src/java.logging/share/conf
$(CONF_DST_DIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
diff --git a/make/modules/java.logging/Gensrc.gmk b/make/modules/java.logging/Gensrc.gmk
index c28edd822b6..3b166e0f0a6 100644
--- a/make/modules/java.logging/Gensrc.gmk
+++ b/make/modules/java.logging/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,10 +23,9 @@
# questions.
#
-include GensrcCommon.gmk
-
################################################################################
+include GensrcCommon.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
@@ -35,3 +34,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
))
TARGETS += $(COMPILE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/java.logging/Java.gmk b/make/modules/java.logging/Java.gmk
index 781370b2e18..ab4e1b6144e 100644
--- a/make/modules/java.logging/Java.gmk
+++ b/make/modules/java.logging/Java.gmk
@@ -1,5 +1,5 @@
#
-# 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
@@ -23,7 +23,11 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
+
+################################################################################
diff --git a/make/modules/java.management.rmi/Java.gmk b/make/modules/java.management.rmi/Java.gmk
index 4579fea6843..11f99c26bd3 100644
--- a/make/modules/java.management.rmi/Java.gmk
+++ b/make/modules/java.management.rmi/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,5 +23,9 @@
# questions.
#
+################################################################################
+
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:javax.*'
+
+################################################################################
diff --git a/make/modules/java.management/Java.gmk b/make/modules/java.management/Java.gmk
index 7a337946cd7..44e3f328c7f 100644
--- a/make/modules/java.management/Java.gmk
+++ b/make/modules/java.management/Java.gmk
@@ -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
@@ -23,7 +23,11 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
+
+################################################################################
diff --git a/make/modules/java.management/Lib.gmk b/make/modules/java.management/Lib.gmk
index b9f79da4516..89c99266fcc 100644
--- a/make/modules/java.management/Lib.gmk
+++ b/make/modules/java.management/Lib.gmk
@@ -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
@@ -23,25 +23,22 @@
# questions.
#
+################################################################################
+
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, \
))
TARGETS += $(BUILD_LIBMANAGEMENT)
+
+################################################################################
diff --git a/make/modules/java.naming/Java.gmk b/make/modules/java.naming/Java.gmk
index 207329f5944..1c7a2a1668a 100644
--- a/make/modules/java.naming/Java.gmk
+++ b/make/modules/java.naming/Java.gmk
@@ -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
@@ -23,8 +23,12 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
CLEAN += jndiprovider.properties
+
+################################################################################
diff --git a/make/modules/java.prefs/Java.gmk b/make/modules/java.prefs/Java.gmk
index e124e8844d3..6e5ea0e2c73 100644
--- a/make/modules/java.prefs/Java.gmk
+++ b/make/modules/java.prefs/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,5 +23,9 @@
# questions.
#
+################################################################################
+
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
+
+################################################################################
diff --git a/make/modules/java.prefs/Lib.gmk b/make/modules/java.prefs/Lib.gmk
index 033768ffa1d..7590a5431b1 100644
--- a/make/modules/java.prefs/Lib.gmk
+++ b/make/modules/java.prefs/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -46,3 +48,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBPREFS, \
))
TARGETS += $(BUILD_LIBPREFS)
+
+################################################################################
diff --git a/make/modules/java.rmi/Java.gmk b/make/modules/java.rmi/Java.gmk
index 6c607bd0572..4f24edb6f67 100644
--- a/make/modules/java.rmi/Java.gmk
+++ b/make/modules/java.rmi/Java.gmk
@@ -1,5 +1,5 @@
#
-# 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
DOCLINT += -Xdoclint:all/protected \
@@ -32,3 +34,5 @@ CLEAN_FILES += $(wildcard \
$(TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties)
TARGETS += $(call CreateHkTargets, $(CLEAN_FILES))
+
+################################################################################
diff --git a/make/modules/java.rmi/Launcher.gmk b/make/modules/java.rmi/Launcher.gmk
index 8c335711da0..a72c107981c 100644
--- a/make/modules/java.rmi/Launcher.gmk
+++ b/make/modules/java.rmi/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -32,3 +34,5 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, rmiregistry, \
MAIN_CLASS := sun.rmi.registry.RegistryImpl, \
))
+
+################################################################################
diff --git a/make/modules/java.rmi/Lib.gmk b/make/modules/java.rmi/Lib.gmk
index 3f4a5bed893..0520af6b702 100644
--- a/make/modules/java.rmi/Lib.gmk
+++ b/make/modules/java.rmi/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -37,3 +39,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBRMI, \
))
TARGETS += $(BUILD_LIBRMI)
+
+################################################################################
diff --git a/make/modules/java.scripting/Java.gmk b/make/modules/java.scripting/Java.gmk
index c9060b5fa46..1909ec1a2df 100644
--- a/make/modules/java.scripting/Java.gmk
+++ b/make/modules/java.scripting/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,7 +23,11 @@
# questions.
#
+################################################################################
+
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
COPY += .js
CLEAN += .properties
+
+################################################################################
diff --git a/make/modules/java.scripting/Launcher.gmk b/make/modules/java.scripting/Launcher.gmk
index a969b567d1e..ee6b93fbf2c 100644
--- a/make/modules/java.scripting/Launcher.gmk
+++ b/make/modules/java.scripting/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -33,3 +35,5 @@ $(eval $(call SetupBuildLauncher, jrunscript, \
MAIN_CLASS := com.sun.tools.script.shell.Main, \
JAVA_ARGS := --add-modules ALL-DEFAULT, \
))
+
+################################################################################
diff --git a/make/modules/java.security.jgss/Java.gmk b/make/modules/java.security.jgss/Java.gmk
index 7a337946cd7..44e3f328c7f 100644
--- a/make/modules/java.security.jgss/Java.gmk
+++ b/make/modules/java.security.jgss/Java.gmk
@@ -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
@@ -23,7 +23,11 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
+
+################################################################################
diff --git a/make/modules/java.security.jgss/Launcher.gmk b/make/modules/java.security.jgss/Launcher.gmk
index b0e2fdcffd1..40a93859378 100644
--- a/make/modules/java.security.jgss/Launcher.gmk
+++ b/make/modules/java.security.jgss/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
ifeq ($(call isTargetOs, windows), true)
@@ -50,3 +52,5 @@ ifeq ($(call isTargetOs, windows), true)
MAIN_CLASS := sun.security.krb5.internal.tools.Ktab, \
))
endif
+
+################################################################################
diff --git a/make/modules/java.security.jgss/Lib.gmk b/make/modules/java.security.jgss/Lib.gmk
index 2c827b84109..4b05100e6a6 100644
--- a/make/modules/java.security.jgss/Lib.gmk
+++ b/make/modules/java.security.jgss/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -94,3 +96,5 @@ ifneq ($(BUILD_CRYPTO), false)
TARGETS += $(BUILD_LIBOSXKRB5)
endif
endif
+
+################################################################################
diff --git a/make/modules/java.security.sasl/Java.gmk b/make/modules/java.security.sasl/Java.gmk
index 136b311a827..12d13b4910f 100644
--- a/make/modules/java.security.sasl/Java.gmk
+++ b/make/modules/java.security.sasl/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
+
+################################################################################
diff --git a/make/modules/java.smartcardio/Java.gmk b/make/modules/java.smartcardio/Java.gmk
index f49e425718e..6e5ea0e2c73 100644
--- a/make/modules/java.smartcardio/Java.gmk
+++ b/make/modules/java.smartcardio/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 2021, 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
@@ -23,5 +23,9 @@
# questions.
#
+################################################################################
+
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
+
+################################################################################
diff --git a/make/modules/java.smartcardio/Lib.gmk b/make/modules/java.smartcardio/Lib.gmk
index 1e647fd7e24..8d8a2aef086 100644
--- a/make/modules/java.smartcardio/Lib.gmk
+++ b/make/modules/java.smartcardio/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -41,3 +43,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \
))
TARGETS += $(BUILD_LIBJ2PCSC)
+
+################################################################################
diff --git a/make/modules/java.sql.rowset/Java.gmk b/make/modules/java.sql.rowset/Java.gmk
index 6bc30e3693d..ecfe3e6e641 100644
--- a/make/modules/java.sql.rowset/Java.gmk
+++ b/make/modules/java.sql.rowset/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments
DOCLINT += -Xdoclint:all/protected \
@@ -32,3 +34,5 @@ CLEAN_FILES += $(wildcard \
$(TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
TARGETS += $(call CreateHkTargets, $(CLEAN_FILES))
+
+################################################################################
diff --git a/make/modules/java.sql/Java.gmk b/make/modules/java.sql/Java.gmk
index 7a337946cd7..44e3f328c7f 100644
--- a/make/modules/java.sql/Java.gmk
+++ b/make/modules/java.sql/Java.gmk
@@ -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
@@ -23,7 +23,11 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
+
+################################################################################
diff --git a/make/modules/java.transaction.xa/Java.gmk b/make/modules/java.transaction.xa/Java.gmk
index 4579fea6843..11f99c26bd3 100644
--- a/make/modules/java.transaction.xa/Java.gmk
+++ b/make/modules/java.transaction.xa/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,5 +23,9 @@
# questions.
#
+################################################################################
+
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:javax.*'
+
+################################################################################
diff --git a/make/modules/java.xml.crypto/Java.gmk b/make/modules/java.xml.crypto/Java.gmk
index 9ee19c8c302..68db8ed817a 100644
--- a/make/modules/java.xml.crypto/Java.gmk
+++ b/make/modules/java.xml.crypto/Java.gmk
@@ -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
@@ -23,9 +23,13 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
COPY += .dtd .xml
CLEAN += .properties
+
+################################################################################
diff --git a/make/modules/java.xml/Copy.gmk b/make/modules/java.xml/Copy.gmk
index f242cb2ac76..f8c1896e526 100644
--- a/make/modules/java.xml/Copy.gmk
+++ b/make/modules/java.xml/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,11 +23,12 @@
# questions.
#
+################################################################################
+
include CopyCommon.gmk
include Modules.gmk
################################################################################
-#
# Copy property and template files from share/conf to CONF_DST_DIR
#
$(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \
@@ -37,4 +38,5 @@ $(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \
))
TARGETS += $(COPY_XML_MODULE_CONF)
+
################################################################################
diff --git a/make/modules/java.xml/Java.gmk b/make/modules/java.xml/Java.gmk
index 0c174f2113e..35f66238a7a 100644
--- a/make/modules/java.xml/Java.gmk
+++ b/make/modules/java.xml/Java.gmk
@@ -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
@@ -23,9 +23,13 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
javax.xml.transform javax.xml.validation javax.xml.xpath)'
COPY += .dtd .xsd .xml .ent .mod
CLEAN += .properties
+
+################################################################################
diff --git a/make/modules/jdk.accessibility/Copy.gmk b/make/modules/jdk.accessibility/Copy.gmk
index cd8aeba5a11..798b97902c6 100644
--- a/make/modules/jdk.accessibility/Copy.gmk
+++ b/make/modules/jdk.accessibility/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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,6 +24,8 @@
#
################################################################################
-# Include CopyCommon.gmk to get exported header files to be properly copied.
+# Include CopyCommon.gmk to get exported header files to be properly copied.
include CopyCommon.gmk
+
+################################################################################
diff --git a/make/modules/jdk.accessibility/Java.gmk b/make/modules/jdk.accessibility/Java.gmk
index fc8b2f832d7..7f1718a23ed 100644
--- a/make/modules/jdk.accessibility/Java.gmk
+++ b/make/modules/jdk.accessibility/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments
+
+################################################################################
diff --git a/make/modules/jdk.accessibility/Launcher.gmk b/make/modules/jdk.accessibility/Launcher.gmk
index 86ad96b3a1e..04694b10e9e 100644
--- a/make/modules/jdk.accessibility/Launcher.gmk
+++ b/make/modules/jdk.accessibility/Launcher.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
ifeq ($(call isTargetOs, windows), true)
@@ -89,3 +91,5 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(BUILD_JACCESSWALKER)
endif
+
+################################################################################
diff --git a/make/modules/jdk.accessibility/Lib.gmk b/make/modules/jdk.accessibility/Lib.gmk
index 6323049c985..6a3631bff67 100644
--- a/make/modules/jdk.accessibility/Lib.gmk
+++ b/make/modules/jdk.accessibility/Lib.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -80,3 +82,5 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(BUILD_LIBWINDOWSACCESSBRIDGE)
endif
+
+################################################################################
diff --git a/make/modules/jdk.attach/Lib.gmk b/make/modules/jdk.attach/Lib.gmk
index 8eefe7a4ec0..78437d761d2 100644
--- a/make/modules/jdk.attach/Lib.gmk
+++ b/make/modules/jdk.attach/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -46,3 +48,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBATTACH, \
))
TARGETS += $(BUILD_LIBATTACH)
+
+################################################################################
diff --git a/make/modules/jdk.charsets/Gensrc.gmk b/make/modules/jdk.charsets/Gensrc.gmk
index e93ea19219d..82dc091cbfd 100644
--- a/make/modules/jdk.charsets/Gensrc.gmk
+++ b/make/modules/jdk.charsets/Gensrc.gmk
@@ -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
@@ -23,12 +23,12 @@
# questions.
#
+################################################################################
+# Generate files using the charsetmapping tool
+################################################################################
+
include GensrcCommon.gmk
-################################################################################
-#
-# Generate files using the charsetmapping tool
-#
CHARSET_DATA_DIR := $(TOPDIR)/make/data/charsetmapping
CHARSET_GENSRC_JAVA_DIR_CS := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
@@ -82,3 +82,5 @@ TARGETS += \
$(CHARSET_DONE_CS)-euctw \
$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat \
#
+
+################################################################################
diff --git a/make/modules/jdk.charsets/Java.gmk b/make/modules/jdk.charsets/Java.gmk
index 2eb5bd45456..c5dbb1e2a60 100644
--- a/make/modules/jdk.charsets/Java.gmk
+++ b/make/modules/jdk.charsets/Java.gmk
@@ -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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
COPY += .dat
+
+################################################################################
diff --git a/make/modules/jdk.compiler/Gendata.gmk b/make/modules/jdk.compiler/Gendata.gmk
index 57487c7c842..739625a5732 100644
--- a/make/modules/jdk.compiler/Gendata.gmk
+++ b/make/modules/jdk.compiler/Gendata.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,16 +23,13 @@
# questions.
#
+################################################################################
+
include CopyFiles.gmk
include JarArchive.gmk
include JavaCompilation.gmk
include Modules.gmk
-################################################################################
-
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, modules/jdk.compiler/Gendata.gmk))
-
# This is needed to properly setup DOCS_MODULES.
$(eval $(call ReadImportMetaData))
diff --git a/make/modules/jdk.compiler/Gensrc.gmk b/make/modules/jdk.compiler/Gensrc.gmk
index 14cc4f55a2b..c6c5879745c 100644
--- a/make/modules/jdk.compiler/Gensrc.gmk
+++ b/make/modules/jdk.compiler/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
include GensrcProperties.gmk
include Execute.gmk
@@ -72,3 +74,5 @@ $(eval $(call SetupExecute, PARSEPROPERTIES, \
))
TARGETS += $(PARSEPROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.compiler/Java.gmk b/make/modules/jdk.compiler/Java.gmk
index a2dd4f60fa6..3d6d22b2782 100644
--- a/make/modules/jdk.compiler/Java.gmk
+++ b/make/modules/jdk.compiler/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
# To the extent technically possible, this module should be built with
# -Werror and all lint warnings enabled. In particular,
# DISABLED_WARNINGS_java should not be augmented.
@@ -33,3 +35,5 @@ JAVAC_FLAGS += -XDstringConcat=inline
CLEAN_FILES += $(wildcard \
$(patsubst %, $(TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
sun/tools/serialver/resources))
+
+################################################################################
diff --git a/make/modules/jdk.compiler/Launcher.gmk b/make/modules/jdk.compiler/Launcher.gmk
index e80c31bcb18..74bd6896409 100644
--- a/make/modules/jdk.compiler/Launcher.gmk
+++ b/make/modules/jdk.compiler/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -32,7 +34,7 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, javac, \
MAIN_CLASS := com.sun.tools.javac.Main, \
JAVA_ARGS := --add-modules ALL-DEFAULT, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
################################################################################
@@ -41,5 +43,7 @@ $(eval $(call SetupBuildLauncher, javac, \
$(eval $(call SetupBuildLauncher, serialver, \
MAIN_CLASS := sun.tools.serialver.SerialVer, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.crypto.cryptoki/Java.gmk b/make/modules/jdk.crypto.cryptoki/Java.gmk
index fc8b2f832d7..7f1718a23ed 100644
--- a/make/modules/jdk.crypto.cryptoki/Java.gmk
+++ b/make/modules/jdk.crypto.cryptoki/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments
+
+################################################################################
diff --git a/make/modules/jdk.crypto.cryptoki/Lib.gmk b/make/modules/jdk.crypto.cryptoki/Lib.gmk
index ec80aaf46b4..29d1422cd78 100644
--- a/make/modules/jdk.crypto.cryptoki/Lib.gmk
+++ b/make/modules/jdk.crypto.cryptoki/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -40,3 +42,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PKCS11, \
))
TARGETS += $(BUILD_LIBJ2PKCS11)
+
+################################################################################
diff --git a/make/modules/jdk.crypto.mscapi/Java.gmk b/make/modules/jdk.crypto.mscapi/Java.gmk
index 269a1195b6a..aca47fc97f7 100644
--- a/make/modules/jdk.crypto.mscapi/Java.gmk
+++ b/make/modules/jdk.crypto.mscapi/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
+
+################################################################################
diff --git a/make/modules/jdk.crypto.mscapi/Lib.gmk b/make/modules/jdk.crypto.mscapi/Lib.gmk
index 39b83a21ae9..9c78621ec0c 100644
--- a/make/modules/jdk.crypto.mscapi/Lib.gmk
+++ b/make/modules/jdk.crypto.mscapi/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
ifeq ($(call isTargetOs, windows), true)
@@ -40,3 +42,5 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(BUILD_LIBSUNMSCAPI)
endif
+
+################################################################################
diff --git a/make/modules/jdk.dev/Java.gmk b/make/modules/jdk.dev/Java.gmk
index c26b4f9c8f6..57401175314 100644
--- a/make/modules/jdk.dev/Java.gmk
+++ b/make/modules/jdk.dev/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,8 +23,12 @@
# questions.
#
+################################################################################
+
CLEAN_FILES += $(wildcard \
$(patsubst %, $(TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \
com/sun/tools/script/shell))
COPY += .js oqlhelp.html .txt
+
+################################################################################
diff --git a/make/modules/jdk.dynalink/Java.gmk b/make/modules/jdk.dynalink/Java.gmk
index 852e68c0d31..f95e59bf36e 100644
--- a/make/modules/jdk.dynalink/Java.gmk
+++ b/make/modules/jdk.dynalink/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
CLEAN += .properties
+
+################################################################################
diff --git a/make/modules/jdk.editpad/Java.gmk b/make/modules/jdk.editpad/Java.gmk
index ef2d3bcfa7c..640335dae43 100644
--- a/make/modules/jdk.editpad/Java.gmk
+++ b/make/modules/jdk.editpad/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
COPY += .properties
+
+################################################################################
diff --git a/make/modules/jdk.hotspot.agent/Gensrc.gmk b/make/modules/jdk.hotspot.agent/Gensrc.gmk
index b2bd016a512..b5cfa6d15fc 100644
--- a/make/modules/jdk.hotspot.agent/Gensrc.gmk
+++ b/make/modules/jdk.hotspot.agent/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -54,3 +54,5 @@ ifeq ($(call isTargetOs, macosx), true)
TARGETS += $(MACH_EXC_SERVER)
endif
+
+################################################################################
diff --git a/make/modules/jdk.hotspot.agent/Java.gmk b/make/modules/jdk.hotspot.agent/Java.gmk
index 333d28a5aa0..eef2ccb4bb0 100644
--- a/make/modules/jdk.hotspot.agent/Java.gmk
+++ b/make/modules/jdk.hotspot.agent/Java.gmk
@@ -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
@@ -23,6 +23,10 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += rawtypes serial cast static overrides \
dangling-doc-comments fallthrough this-escape
COPY += .gif .png .properties
+
+################################################################################
diff --git a/make/modules/jdk.hotspot.agent/Launcher.gmk b/make/modules/jdk.hotspot.agent/Launcher.gmk
index 94ad08bda0c..83e640486c2 100644
--- a/make/modules/jdk.hotspot.agent/Launcher.gmk
+++ b/make/modules/jdk.hotspot.agent/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -33,3 +35,5 @@ $(eval $(call SetupBuildLauncher, jhsdb, \
MAIN_CLASS := sun.jvm.hotspot.SALauncher, \
MACOSX_PRIVILEGED := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.hotspot.agent/Lib.gmk b/make/modules/jdk.hotspot.agent/Lib.gmk
index 12f1c1f2a90..ed8de631dc3 100644
--- a/make/modules/jdk.hotspot.agent/Lib.gmk
+++ b/make/modules/jdk.hotspot.agent/Lib.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -79,3 +81,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSAPROC, \
))
TARGETS += $(BUILD_LIBSAPROC)
+
+################################################################################
diff --git a/make/modules/jdk.httpserver/Gensrc.gmk b/make/modules/jdk.httpserver/Gensrc.gmk
index 37b51bb1d45..baeb620781a 100644
--- a/make/modules/jdk.httpserver/Gensrc.gmk
+++ b/make/modules/jdk.httpserver/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2021, 2022, 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
@@ -23,12 +23,12 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
include GensrcProperties.gmk
include Modules.gmk
-################################################################################
-
# Use wildcard so as to avoid getting non-existing directories back
SIMPLESERVER_RESOURCES_DIRS := $(wildcard $(addsuffix /sun/net/httpserver/simpleserver/resources, \
$(call FindModuleSrcDirs, jdk.httpserver)))
@@ -39,3 +39,5 @@ $(eval $(call SetupCompileProperties, SIMPLESERVER_PROPERTIES, \
))
TARGETS += $(SIMPLESERVER_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.httpserver/Java.gmk b/make/modules/jdk.httpserver/Java.gmk
index 95c0f1eb6ab..f36d09919bc 100644
--- a/make/modules/jdk.httpserver/Java.gmk
+++ b/make/modules/jdk.httpserver/Java.gmk
@@ -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
@@ -23,6 +23,10 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
COPY += .ico
+
+################################################################################
diff --git a/make/modules/jdk.httpserver/Jmod.gmk b/make/modules/jdk.httpserver/Jmod.gmk
index 9a216ef0958..72c87e19c29 100644
--- a/make/modules/jdk.httpserver/Jmod.gmk
+++ b/make/modules/jdk.httpserver/Jmod.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
JMOD_FLAGS_main_class := --main-class sun.net.httpserver.simpleserver.Main
+
+################################################################################
diff --git a/make/modules/jdk.httpserver/Launcher.gmk b/make/modules/jdk.httpserver/Launcher.gmk
index 0f0c060e6e3..d537ec1b50a 100644
--- a/make/modules/jdk.httpserver/Launcher.gmk
+++ b/make/modules/jdk.httpserver/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -32,3 +34,5 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jwebserver, \
MAIN_CLASS := sun.net.httpserver.simpleserver.JWebServer, \
))
+
+################################################################################
diff --git a/make/modules/jdk.incubator.vector/Java.gmk b/make/modules/jdk.incubator.vector/Java.gmk
index 6cd5301428f..e51ffe57cea 100644
--- a/make/modules/jdk.incubator.vector/Java.gmk
+++ b/make/modules/jdk.incubator.vector/Java.gmk
@@ -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
@@ -23,6 +23,10 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments
DOCLINT += -Xdoclint:all/protected
+
+################################################################################
diff --git a/make/modules/jdk.incubator.vector/Lib.gmk b/make/modules/jdk.incubator.vector/Lib.gmk
index 69da7ed059a..e6a05019f5f 100644
--- a/make/modules/jdk.incubator.vector/Lib.gmk
+++ b/make/modules/jdk.incubator.vector/Lib.gmk
@@ -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
@@ -23,49 +23,50 @@
# questions.
#
+################################################################################
+
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
+ ##############################################################################
+
+ ifeq ($(call isTargetOs, linux windows)+$(call isTargetCpu, x86_64), true+true)
+ $(eval $(call SetupJdkLibrary, BUILD_LIBJSVML, \
+ NAME := jsvml, \
+ LDFLAGS_windows := -defaultlib:msvcrt, \
+ ))
+
+ TARGETS += $(BUILD_LIBJSVML)
+ endif
+
+ ##############################################################################
+ ## Build libsleef
+ ##############################################################################
+
+ 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), \
+ ))
+
+ TARGETS += $(BUILD_LIBSLEEF)
+ endif
- TARGETS += $(BUILD_LIBJSVML)
endif
################################################################################
-## Build libsleef
-################################################################################
-
-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, \
- ))
-
- TARGETS += $(BUILD_LIBSLEEF)
-endif
-
-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, \
- CFLAGS := $(SVE_CFLAGS), \
- ))
-
- TARGETS += $(BUILD_LIBSLEEF)
-endif
diff --git a/make/modules/jdk.internal.jvmstat/Java.gmk b/make/modules/jdk.internal.jvmstat/Java.gmk
index 4376b7e3484..108730a0fc5 100644
--- a/make/modules/jdk.internal.jvmstat/Java.gmk
+++ b/make/modules/jdk.internal.jvmstat/Java.gmk
@@ -1,5 +1,5 @@
#
-# 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
@@ -23,6 +23,10 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
COPY += aliasmap
+
+################################################################################
diff --git a/make/modules/jdk.internal.le/Java.gmk b/make/modules/jdk.internal.le/Java.gmk
index 4c952b63574..27c6eaf5f7f 100644
--- a/make/modules/jdk.internal.le/Java.gmk
+++ b/make/modules/jdk.internal.le/Java.gmk
@@ -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
@@ -23,6 +23,10 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
COPY += .properties .caps .txt
+
+################################################################################
diff --git a/make/modules/jdk.internal.md/Java.gmk b/make/modules/jdk.internal.md/Java.gmk
index 2a850f55637..638c12413c4 100644
--- a/make/modules/jdk.internal.md/Java.gmk
+++ b/make/modules/jdk.internal.md/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
COPY += .txt
+
+################################################################################
diff --git a/make/modules/jdk.internal.opt/Java.gmk b/make/modules/jdk.internal.opt/Java.gmk
index 0c65d9ad94e..08bb3a5334a 100644
--- a/make/modules/jdk.internal.opt/Java.gmk
+++ b/make/modules/jdk.internal.opt/Java.gmk
@@ -1,5 +1,5 @@
#
-# 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
@@ -23,6 +23,10 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
COPY += .properties
+
+################################################################################
diff --git a/make/modules/jdk.internal.vm.ci/Java.gmk b/make/modules/jdk.internal.vm.ci/Java.gmk
index 6bf8ad5e74c..cb569bb8817 100644
--- a/make/modules/jdk.internal.vm.ci/Java.gmk
+++ b/make/modules/jdk.internal.vm.ci/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
# -parameters provides method's parameters information in class file,
@@ -30,3 +32,5 @@ DISABLED_WARNINGS_java += dangling-doc-comments this-escape
# Don't use Indy strings concatenation to have good JVMCI startup performance.
JAVAC_FLAGS += -parameters -XDstringConcat=inline
+
+################################################################################
diff --git a/make/modules/jdk.jartool/Gensrc.gmk b/make/modules/jdk.jartool/Gensrc.gmk
index 06fbedfa40c..7ae53d0b774 100644
--- a/make/modules/jdk.jartool/Gensrc.gmk
+++ b/make/modules/jdk.jartool/Gensrc.gmk
@@ -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.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,9 @@
# questions.
#
-include GensrcCommon.gmk
-
################################################################################
+include GensrcCommon.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
@@ -34,4 +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.jartool/Java.gmk b/make/modules/jdk.jartool/Java.gmk
index 5e06f172070..806975d1e18 100644
--- a/make/modules/jdk.jartool/Java.gmk
+++ b/make/modules/jdk.jartool/Java.gmk
@@ -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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
JAVAC_FLAGS += -XDstringConcat=inline
+
+################################################################################
diff --git a/make/modules/jdk.jartool/Jmod.gmk b/make/modules/jdk.jartool/Jmod.gmk
index 8b42113ec84..42fd1f05325 100644
--- a/make/modules/jdk.jartool/Jmod.gmk
+++ b/make/modules/jdk.jartool/Jmod.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
JMOD_FLAGS_main_class := --main-class sun.tools.jar.Main
+
+################################################################################
diff --git a/make/modules/jdk.jartool/Launcher.gmk b/make/modules/jdk.jartool/Launcher.gmk
index 3139fac45d5..f75f30d4098 100644
--- a/make/modules/jdk.jartool/Launcher.gmk
+++ b/make/modules/jdk.jartool/Launcher.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -40,3 +42,5 @@ $(eval $(call SetupBuildLauncher, jar, \
$(eval $(call SetupBuildLauncher, jarsigner, \
MAIN_CLASS := sun.security.tools.jarsigner.Main, \
))
+
+################################################################################
diff --git a/make/modules/jdk.javadoc/Copy.gmk b/make/modules/jdk.javadoc/Copy.gmk
index 031b4a91d33..1566911209c 100644
--- a/make/modules/jdk.javadoc/Copy.gmk
+++ b/make/modules/jdk.javadoc/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include CopyCommon.gmk
JDK_JAVADOC_DIR := $(JDK_OUTPUTDIR)/modules/jdk.javadoc
diff --git a/make/modules/jdk.javadoc/Gendata.gmk b/make/modules/jdk.javadoc/Gendata.gmk
index d733af65f1e..2cd812de779 100644
--- a/make/modules/jdk.javadoc/Gendata.gmk
+++ b/make/modules/jdk.javadoc/Gendata.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,13 +23,10 @@
# questions.
#
-include JavaCompilation.gmk
-include Modules.gmk
-
################################################################################
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, modules/jdk.javadoc/Gendata.gmk))
+include JavaCompilation.gmk
+include Modules.gmk
# This is needed to properly setup DOCS_MODULES.
$(eval $(call ReadImportMetaData))
@@ -115,3 +112,5 @@ $(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker: $(JDK_JAVADOC_DIR)/_element_li
TARGETS += $(JDK_JAVADOC_DIR)/_element_lists.marker \
$(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker
+
+################################################################################
diff --git a/make/modules/jdk.javadoc/Gensrc.gmk b/make/modules/jdk.javadoc/Gensrc.gmk
index 0346e3832df..e62988f883c 100644
--- a/make/modules/jdk.javadoc/Gensrc.gmk
+++ b/make/modules/jdk.javadoc/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
include GensrcProperties.gmk
@@ -37,3 +39,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
))
TARGETS += $(COMPILE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.javadoc/Java.gmk b/make/modules/jdk.javadoc/Java.gmk
index 1194797b134..f5315019f00 100644
--- a/make/modules/jdk.javadoc/Java.gmk
+++ b/make/modules/jdk.javadoc/Java.gmk
@@ -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
@@ -23,8 +23,12 @@
# questions.
#
+################################################################################
+
# To the extent technically possible, this module should be built with
# -Werror and all lint warnings enabled. In particular,
# DISABLED_WARNINGS_java should not be augmented.
COPY += .xml .css .svg .js .js.template .png .txt .woff .woff2
+
+################################################################################
diff --git a/make/modules/jdk.javadoc/Launcher.gmk b/make/modules/jdk.javadoc/Launcher.gmk
index 30d714be30d..9ed3b494117 100644
--- a/make/modules/jdk.javadoc/Launcher.gmk
+++ b/make/modules/jdk.javadoc/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -32,5 +34,7 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, javadoc, \
MAIN_CLASS := jdk.javadoc.internal.tool.Main, \
JAVA_ARGS := --add-modules ALL-DEFAULT, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jcmd/Java.gmk b/make/modules/jdk.jcmd/Java.gmk
index d19d9beb4d8..5748e62f7bc 100644
--- a/make/modules/jdk.jcmd/Java.gmk
+++ b/make/modules/jdk.jcmd/Java.gmk
@@ -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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
COPY += _options
+
+################################################################################
diff --git a/make/modules/jdk.jcmd/Launcher.gmk b/make/modules/jdk.jcmd/Launcher.gmk
index acff5a212c5..5d0da09d22b 100644
--- a/make/modules/jdk.jcmd/Launcher.gmk
+++ b/make/modules/jdk.jcmd/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -84,3 +86,5 @@ $(eval $(call SetupBuildLauncher, jstat, \
$(eval $(call SetupBuildLauncher, jcmd, \
MAIN_CLASS := sun.tools.jcmd.JCmd, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jconsole/Java.gmk b/make/modules/jdk.jconsole/Java.gmk
index 2de9321392d..d6cf8689df3 100644
--- a/make/modules/jdk.jconsole/Java.gmk
+++ b/make/modules/jdk.jconsole/Java.gmk
@@ -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
@@ -23,7 +23,11 @@
# questions.
#
+################################################################################
+
COPY += .gif .png
CLEAN_FILES += $(wildcard \
$(TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/*.properties)
+
+################################################################################
diff --git a/make/modules/jdk.jconsole/Launcher.gmk b/make/modules/jdk.jconsole/Launcher.gmk
index 3e65c3cccc3..7cb40a1b13a 100644
--- a/make/modules/jdk.jconsole/Launcher.gmk
+++ b/make/modules/jdk.jconsole/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -36,5 +38,7 @@ $(eval $(call SetupBuildLauncher, jconsole, \
--add-modules ALL-DEFAULT \
-Djconsole.showOutputViewer \
-Djdk.attach.allowAttachSelf=true, \
- CFLAGS_windows := -DJAVAW, \
+ WINDOWS_JAVAW := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jdeps/Gensrc.gmk b/make/modules/jdk.jdeps/Gensrc.gmk
index b5f1e702a75..6ae92ee830a 100644
--- a/make/modules/jdk.jdeps/Gensrc.gmk
+++ b/make/modules/jdk.jdeps/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
include GensrcProperties.gmk
@@ -40,3 +42,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
))
TARGETS += $(COMPILE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.jdeps/Java.gmk b/make/modules/jdk.jdeps/Java.gmk
index 69c7ae0433f..f2da87aeade 100644
--- a/make/modules/jdk.jdeps/Java.gmk
+++ b/make/modules/jdk.jdeps/Java.gmk
@@ -1,5 +1,5 @@
#
-# 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
@@ -23,8 +23,12 @@
# questions.
#
+################################################################################
+
COPY += .txt
CLEAN_FILES += $(wildcard \
$(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \
$(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties)
+
+################################################################################
diff --git a/make/modules/jdk.jdeps/Launcher.gmk b/make/modules/jdk.jdeps/Launcher.gmk
index 1aa54e16f45..debf36b62ae 100644
--- a/make/modules/jdk.jdeps/Launcher.gmk
+++ b/make/modules/jdk.jdeps/Launcher.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -31,7 +33,7 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, javap, \
MAIN_CLASS := com.sun.tools.javap.Main, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
################################################################################
@@ -40,7 +42,7 @@ $(eval $(call SetupBuildLauncher, javap, \
$(eval $(call SetupBuildLauncher, jdeps, \
MAIN_CLASS := com.sun.tools.jdeps.Main, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
################################################################################
@@ -49,7 +51,7 @@ $(eval $(call SetupBuildLauncher, jdeps, \
$(eval $(call SetupBuildLauncher, jdeprscan, \
MAIN_CLASS := com.sun.tools.jdeprscan.Main, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
################################################################################
@@ -58,5 +60,7 @@ $(eval $(call SetupBuildLauncher, jdeprscan, \
$(eval $(call SetupBuildLauncher, jnativescan, \
MAIN_CLASS := com.sun.tools.jnativescan.Main, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jdi/Gensrc.gmk b/make/modules/jdk.jdi/Gensrc.gmk
index 47f975064ad..57b8faee8a8 100644
--- a/make/modules/jdk.jdi/Gensrc.gmk
+++ b/make/modules/jdk.jdi/Gensrc.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
################################################################################
@@ -68,3 +70,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
))
TARGETS += $(COMPILE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.jdi/Java.gmk b/make/modules/jdk.jdi/Java.gmk
index 6577db98b0a..d31008c318f 100644
--- a/make/modules/jdk.jdi/Java.gmk
+++ b/make/modules/jdk.jdi/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments
EXCLUDES += \
@@ -33,3 +35,5 @@ EXCLUDES += \
#
EXCLUDE_FILES += jdi-overview.html
+
+################################################################################
diff --git a/make/modules/jdk.jdi/Launcher.gmk b/make/modules/jdk.jdi/Launcher.gmk
index 79be72e6ef3..a568e504b5a 100644
--- a/make/modules/jdk.jdi/Launcher.gmk
+++ b/make/modules/jdk.jdi/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -32,3 +34,5 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jdb, \
MAIN_CLASS := com.sun.tools.example.debug.tty.TTY, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jdi/Lib.gmk b/make/modules/jdk.jdi/Lib.gmk
index 80a5664289b..b59a3ab8ea4 100644
--- a/make/modules/jdk.jdi/Lib.gmk
+++ b/make/modules/jdk.jdi/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
ifeq ($(call isTargetOs, windows), true)
@@ -40,3 +42,5 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(BUILD_LIBDT_SHMEM)
endif
+
+################################################################################
diff --git a/make/modules/jdk.jdwp.agent/Copy.gmk b/make/modules/jdk.jdwp.agent/Copy.gmk
index cd8aeba5a11..798b97902c6 100644
--- a/make/modules/jdk.jdwp.agent/Copy.gmk
+++ b/make/modules/jdk.jdwp.agent/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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,6 +24,8 @@
#
################################################################################
-# Include CopyCommon.gmk to get exported header files to be properly copied.
+# Include CopyCommon.gmk to get exported header files to be properly copied.
include CopyCommon.gmk
+
+################################################################################
diff --git a/make/modules/jdk.jdwp.agent/Lib.gmk b/make/modules/jdk.jdwp.agent/Lib.gmk
index 53b48cc7c45..8fe7787d76e 100644
--- a/make/modules/jdk.jdwp.agent/Lib.gmk
+++ b/make/modules/jdk.jdwp.agent/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -36,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, \
))
@@ -51,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 \
@@ -66,14 +68,16 @@ $(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.jfr/Copy.gmk b/make/modules/jdk.jfr/Copy.gmk
index f4fa3d97551..81dc58c1324 100644
--- a/make/modules/jdk.jfr/Copy.gmk
+++ b/make/modules/jdk.jfr/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,10 +23,10 @@
# questions.
#
-include CopyCommon.gmk
-
################################################################################
+include CopyCommon.gmk
+
JFR_CONF_DIR := $(TOPDIR)/src/jdk.jfr/share/conf/jfr
$(eval $(call SetupCopyFiles, COPY_JFR_CONF, \
DEST := $(LIB_DST_DIR)/jfr, \
diff --git a/make/modules/jdk.jfr/Gendata.gmk b/make/modules/jdk.jfr/Gendata.gmk
index 522eea70f32..0a5dd874c81 100644
--- a/make/modules/jdk.jfr/Gendata.gmk
+++ b/make/modules/jdk.jfr/Gendata.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -25,8 +25,8 @@
################################################################################
-include ToolsHotspot.gmk
include Execute.gmk
+include $(TOPDIR)/make/ToolsHotspot.gmk
JFR_SRCDIR := $(TOPDIR)/src/hotspot/share/jfr/metadata
JFR_DATA_OUTPUTDIR := $(OUTPUTDIR)/jdk/modules/jdk.jfr/jdk/jfr/internal/types
@@ -46,3 +46,5 @@ $(eval $(call SetupExecute, jfr_gen_metadata, \
))
TARGETS += $(jfr_gen_metadata)
+
+################################################################################
diff --git a/make/modules/jdk.jfr/Java.gmk b/make/modules/jdk.jfr/Java.gmk
index d07f9117c2d..5fabda8a4b7 100644
--- a/make/modules/jdk.jfr/Java.gmk
+++ b/make/modules/jdk.jfr/Java.gmk
@@ -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
@@ -23,6 +23,10 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments exports
COPY := .xsd .xml .dtd .ini
JAVAC_FLAGS := -XDstringConcat=inline
+
+################################################################################
diff --git a/make/modules/jdk.jfr/Jmod.gmk b/make/modules/jdk.jfr/Jmod.gmk
index 79a6a81c730..499ea142d3a 100644
--- a/make/modules/jdk.jfr/Jmod.gmk
+++ b/make/modules/jdk.jfr/Jmod.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
JMOD_FLAGS_main_class := --main-class jdk.jfr.internal.tool.Main
+
+################################################################################
diff --git a/make/modules/jdk.jfr/Launcher.gmk b/make/modules/jdk.jfr/Launcher.gmk
index 2dd3586a920..80417cd67d3 100644
--- a/make/modules/jdk.jfr/Launcher.gmk
+++ b/make/modules/jdk.jfr/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -31,5 +33,7 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jfr, \
MAIN_CLASS := jdk.jfr.internal.tool.Main, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jlink/Gensrc.gmk b/make/modules/jdk.jlink/Gensrc.gmk
index c450ceea073..87703c7c8bb 100644
--- a/make/modules/jdk.jlink/Gensrc.gmk
+++ b/make/modules/jdk.jlink/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,12 +23,12 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
include GensrcProperties.gmk
include Modules.gmk
-################################################################################
-
# Use wildcard so as to avoid getting non-existing directories back
JLINK_RESOURCES_DIRS := $(wildcard $(addsuffix /jdk/tools/jlink/resources, \
$(call FindModuleSrcDirs, jdk.jlink)))
@@ -50,3 +50,5 @@ $(eval $(call SetupCompileProperties, JIMAGE_PROPERTIES, \
TARGETS += $(JLINK_PROPERTIES) $(JMOD_PROPERTIES) $(JIMAGE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.jlink/Launcher.gmk b/make/modules/jdk.jlink/Launcher.gmk
index d4279065193..312c40e47ab 100644
--- a/make/modules/jdk.jlink/Launcher.gmk
+++ b/make/modules/jdk.jlink/Launcher.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -31,7 +33,7 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jimage, \
MAIN_CLASS := jdk.tools.jimage.Main, \
- CFLAGS := -DENABLE_ARG_FILES, \
+ ENABLE_ARG_FILES := true, \
))
################################################################################
@@ -41,7 +43,8 @@ $(eval $(call SetupBuildLauncher, jimage, \
$(eval $(call SetupBuildLauncher, jlink, \
MAIN_CLASS := jdk.tools.jlink.internal.Main, \
JAVA_ARGS := --add-modules ALL-DEFAULT, \
- CFLAGS := -DENABLE_ARG_FILES -DEXPAND_CLASSPATH_WILDCARDS, \
+ ENABLE_ARG_FILES := true, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
################################################################################
@@ -50,5 +53,8 @@ $(eval $(call SetupBuildLauncher, jlink, \
$(eval $(call SetupBuildLauncher, jmod, \
MAIN_CLASS := jdk.tools.jmod.Main, \
- CFLAGS := -DENABLE_ARG_FILES -DEXPAND_CLASSPATH_WILDCARDS, \
+ ENABLE_ARG_FILES := true, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jpackage/Gensrc.gmk b/make/modules/jdk.jpackage/Gensrc.gmk
index 434b42dc0bf..98311d89b87 100644
--- a/make/modules/jdk.jpackage/Gensrc.gmk
+++ b/make/modules/jdk.jpackage/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 2022, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
################################################################################
@@ -36,5 +38,7 @@ ifeq ($(call isTargetOs, macosx), true)
$(ENTITLEMENTS_TARGET_FILE): $(ENTITLEMENTS_SRC_FILE)
$(call install-file)
- TARGETS := $(ENTITLEMENTS_TARGET_FILE)
+ TARGETS += $(ENTITLEMENTS_TARGET_FILE)
endif
+
+################################################################################
diff --git a/make/modules/jdk.jpackage/Java.gmk b/make/modules/jdk.jpackage/Java.gmk
index d60e9ac2814..da66fc14009 100644
--- a/make/modules/jdk.jpackage/Java.gmk
+++ b/make/modules/jdk.jpackage/Java.gmk
@@ -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
@@ -23,10 +23,14 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments
COPY += .gif .png .txt .spec .script .prerm .preinst \
.postrm .postinst .list .sh .desktop .copyright .control .plist .template \
- .icns .scpt .wxs .wxl .wxi .ico .bmp .tiff .service .xsl
+ .icns .scpt .wxs .wxl .wxi .wxf .ico .bmp .tiff .service .xsl
CLEAN += .properties
+
+################################################################################
diff --git a/make/modules/jdk.jpackage/Jmod.gmk b/make/modules/jdk.jpackage/Jmod.gmk
index 8e0982202a7..27b03e1081e 100644
--- a/make/modules/jdk.jpackage/Jmod.gmk
+++ b/make/modules/jdk.jpackage/Jmod.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
JMOD_FLAGS_main_class := --main-class jdk.jpackage.main.Main
+
+################################################################################
diff --git a/make/modules/jdk.jpackage/Launcher.gmk b/make/modules/jdk.jpackage/Launcher.gmk
index f80c4ed83d3..80f644eea3f 100644
--- a/make/modules/jdk.jpackage/Launcher.gmk
+++ b/make/modules/jdk.jpackage/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -32,3 +34,5 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jpackage, \
MAIN_CLASS := jdk.jpackage.main.Main, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jpackage/Lib.gmk b/make/modules/jdk.jpackage/Lib.gmk
index 33d10336e6e..e9c55548b0d 100644
--- a/make/modules/jdk.jpackage/Lib.gmk
+++ b/make/modules/jdk.jpackage/Lib.gmk
@@ -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
@@ -23,8 +23,10 @@
# questions.
#
-include LibCommon.gmk
+################################################################################
+
include LauncherCommon.gmk
+include LibCommon.gmk
JPACKAGE_OUTPUT_DIR := \
$(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources
@@ -59,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, \
@@ -186,3 +187,5 @@ ifeq ($(call isTargetOs, windows), true)
TARGETS += $(BUILD_JPACKAGEAPPLAUNCHERW)
endif
+
+################################################################################
diff --git a/make/modules/jdk.jshell/Gensrc.gmk b/make/modules/jdk.jshell/Gensrc.gmk
index 71d1ad42817..deab53719a5 100644
--- a/make/modules/jdk.jshell/Gensrc.gmk
+++ b/make/modules/jdk.jshell/Gensrc.gmk
@@ -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.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
include GensrcProperties.gmk
@@ -37,3 +39,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
))
TARGETS += $(COMPILE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.jshell/Java.gmk b/make/modules/jdk.jshell/Java.gmk
index 744c85d960a..f4194b23af7 100644
--- a/make/modules/jdk.jshell/Java.gmk
+++ b/make/modules/jdk.jshell/Java.gmk
@@ -1,5 +1,5 @@
#
-# 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
COPY += .jsh .properties
+
+################################################################################
diff --git a/make/modules/jdk.jshell/Jmod.gmk b/make/modules/jdk.jshell/Jmod.gmk
index 12f22e9d9af..ec599e44fcc 100644
--- a/make/modules/jdk.jshell/Jmod.gmk
+++ b/make/modules/jdk.jshell/Jmod.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
JMOD_FLAGS_main_class := --main-class jdk.internal.jshell.tool.JShellToolProvider
+
+################################################################################
diff --git a/make/modules/jdk.jshell/Launcher.gmk b/make/modules/jdk.jshell/Launcher.gmk
index bf555d7f64c..bdfcbf1911d 100644
--- a/make/modules/jdk.jshell/Launcher.gmk
+++ b/make/modules/jdk.jshell/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -31,5 +33,7 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jshell, \
MAIN_CLASS := jdk.internal.jshell.tool.JShellToolProvider, \
- CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
+ EXPAND_CLASSPATH_WILDCARDS := true, \
))
+
+################################################################################
diff --git a/make/modules/jdk.jstatd/Jmod.gmk b/make/modules/jdk.jstatd/Jmod.gmk
index 2c95e094cfe..1c2aa35a2c2 100644
--- a/make/modules/jdk.jstatd/Jmod.gmk
+++ b/make/modules/jdk.jstatd/Jmod.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
JMOD_FLAGS_main_class := --main-class sun.tools.jstatd.Jstatd
+
+################################################################################
diff --git a/make/modules/jdk.jstatd/Launcher.gmk b/make/modules/jdk.jstatd/Launcher.gmk
index 209b810353f..d101cd3f4ed 100644
--- a/make/modules/jdk.jstatd/Launcher.gmk
+++ b/make/modules/jdk.jstatd/Launcher.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LauncherCommon.gmk
################################################################################
@@ -32,3 +34,5 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jstatd, \
MAIN_CLASS := sun.tools.jstatd.Jstatd, \
))
+
+################################################################################
diff --git a/make/modules/jdk.localedata/Gensrc.gmk b/make/modules/jdk.localedata/Gensrc.gmk
index 4d9f15a20c9..a3c5cdf82e8 100644
--- a/make/modules/jdk.localedata/Gensrc.gmk
+++ b/make/modules/jdk.localedata/Gensrc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include GensrcCommon.gmk
################################################################################
@@ -47,3 +49,5 @@ $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
$(TOUCH) $@
TARGETS += $(CLDR_GEN_DONE)
+
+################################################################################
diff --git a/make/modules/jdk.localedata/Java.gmk b/make/modules/jdk.localedata/Java.gmk
index 41696a641a7..c359f0ee03c 100644
--- a/make/modules/jdk.localedata/Java.gmk
+++ b/make/modules/jdk.localedata/Java.gmk
@@ -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
@@ -23,8 +23,12 @@
# questions.
#
+################################################################################
+
COPY += _dict _th
# 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/ext/BreakIteratorRules_th.java
KEEP_ALL_TRANSLATIONS := true
+
+################################################################################
diff --git a/make/modules/jdk.management.agent/Copy.gmk b/make/modules/jdk.management.agent/Copy.gmk
index 5600989b4d3..ada75231ec7 100644
--- a/make/modules/jdk.management.agent/Copy.gmk
+++ b/make/modules/jdk.management.agent/Copy.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include CopyCommon.gmk
################################################################################
diff --git a/make/modules/jdk.management.agent/Gensrc.gmk b/make/modules/jdk.management.agent/Gensrc.gmk
index c13f4da75fe..4bafdd9503e 100644
--- a/make/modules/jdk.management.agent/Gensrc.gmk
+++ b/make/modules/jdk.management.agent/Gensrc.gmk
@@ -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
@@ -23,10 +23,9 @@
# questions.
#
-include GensrcCommon.gmk
-
################################################################################
+include GensrcCommon.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
@@ -35,3 +34,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
))
TARGETS += $(COMPILE_PROPERTIES)
+
+################################################################################
diff --git a/make/modules/jdk.management.agent/Lib.gmk b/make/modules/jdk.management.agent/Lib.gmk
index 89de59d7fec..17dd163f63c 100644
--- a/make/modules/jdk.management.agent/Lib.gmk
+++ b/make/modules/jdk.management.agent/Lib.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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -37,3 +39,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_AGENT, \
))
TARGETS += $(BUILD_LIBMANAGEMENT_AGENT)
+
+################################################################################
diff --git a/make/modules/jdk.management/Java.gmk b/make/modules/jdk.management/Java.gmk
index 269a1195b6a..aca47fc97f7 100644
--- a/make/modules/jdk.management/Java.gmk
+++ b/make/modules/jdk.management/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += this-escape
+
+################################################################################
diff --git a/make/modules/jdk.management/Lib.gmk b/make/modules/jdk.management/Lib.gmk
index cb65b37bda8..8991414b44e 100644
--- a/make/modules/jdk.management/Lib.gmk
+++ b/make/modules/jdk.management/Lib.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -36,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, \
@@ -54,3 +51,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \
))
TARGETS += $(BUILD_LIBMANAGEMENT_EXT)
+
+################################################################################
diff --git a/make/modules/jdk.net/Lib.gmk b/make/modules/jdk.net/Lib.gmk
index e43d8427f5a..00d243a7f53 100644
--- a/make/modules/jdk.net/Lib.gmk
+++ b/make/modules/jdk.net/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -38,3 +40,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBEXTNET, \
))
TARGETS += $(BUILD_LIBEXTNET)
+
+################################################################################
diff --git a/make/modules/jdk.sctp/Java.gmk b/make/modules/jdk.sctp/Java.gmk
index cac0f770816..5c7c4eb4176 100644
--- a/make/modules/jdk.sctp/Java.gmk
+++ b/make/modules/jdk.sctp/Java.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
# No SCTP implementation on Mac OS X or AIX. These classes should be excluded.
SCTP_IMPL_CLASSES = \
$(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \
@@ -51,3 +53,5 @@ ifeq ($(call isTargetOsType, unix), true)
EXCLUDE_FILES += $(TOPDIR)/src/jdk.sctp/share/classes/sun/nio/ch/sctp/UnsupportedUtil.java
endif
endif
+
+################################################################################
diff --git a/make/modules/jdk.sctp/Lib.gmk b/make/modules/jdk.sctp/Lib.gmk
index a6d95a25154..327f4fa6104 100644
--- a/make/modules/jdk.sctp/Lib.gmk
+++ b/make/modules/jdk.sctp/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
ifeq ($(call isTargetOs, linux), true)
@@ -39,8 +41,10 @@ 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)
endif
+
+################################################################################
diff --git a/make/modules/jdk.security.auth/Java.gmk b/make/modules/jdk.security.auth/Java.gmk
index fc8b2f832d7..7f1718a23ed 100644
--- a/make/modules/jdk.security.auth/Java.gmk
+++ b/make/modules/jdk.security.auth/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
DISABLED_WARNINGS_java += dangling-doc-comments
+
+################################################################################
diff --git a/make/modules/jdk.security.auth/Lib.gmk b/make/modules/jdk.security.auth/Lib.gmk
index a0d41004489..9ead32dbe12 100644
--- a/make/modules/jdk.security.auth/Lib.gmk
+++ b/make/modules/jdk.security.auth/Lib.gmk
@@ -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
@@ -23,6 +23,8 @@
# questions.
#
+################################################################################
+
include LibCommon.gmk
################################################################################
@@ -37,3 +39,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \
))
TARGETS += $(BUILD_LIBJAAS)
+
+################################################################################
diff --git a/make/modules/sun.charsets/Java.gmk b/make/modules/sun.charsets/Java.gmk
index 2745327c8e4..c5dbb1e2a60 100644
--- a/make/modules/sun.charsets/Java.gmk
+++ b/make/modules/sun.charsets/Java.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 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
@@ -23,4 +23,8 @@
# questions.
#
+################################################################################
+
COPY += .dat
+
+################################################################################
diff --git a/make/scripts/genExceptions.sh b/make/scripts/genExceptions.sh
index 4f6c0d9820b..7c191189827 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/src/classes/build/tools/jfr/GenerateJfrFiles.java b/make/src/classes/build/tools/jfr/GenerateJfrFiles.java
index 7532a446aa1..09f3a9f5e3f 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 @@ public class GenerateJfrFiles {
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 @@ public class GenerateJfrFiles {
out.write(" */");
out.write("");
printTypes(out, metadata, false);
+ printHelpers(out, false);
out.write("");
out.write("");
out.write("#else // !INCLUDE_JFR");
@@ -806,6 +808,7 @@ public class GenerateJfrFiles {
out.write("};");
out.write("");
printTypes(out, metadata, true);
+ printHelpers(out, true);
out.write("");
out.write("");
out.write("#endif // INCLUDE_JFR");
@@ -813,6 +816,35 @@ public class GenerateJfrFiles {
}
}
+ 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/BuildFailureHandler.gmk b/make/test/BuildFailureHandler.gmk
index e8f49e76b32..b4f3d690b0d 100644
--- a/make/test/BuildFailureHandler.gmk
+++ b/make/test/BuildFailureHandler.gmk
@@ -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
@@ -23,18 +23,13 @@
# questions.
#
-default: build
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include JavaCompilation.gmk
-TARGETS :=
-
-################################################################################
-
FH_BASEDIR := $(TOPDIR)/test/failure_handler
FH_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/failure_handler
FH_JAR := $(FH_SUPPORT)/jtregFailureHandler.jar
@@ -110,4 +105,8 @@ test:
build: $(TARGETS)
images: $(IMAGES_TARGETS)
-.PHONY: all images test
+.PHONY: images test
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/BuildJtregTestThreadFactory.gmk b/make/test/BuildJtregTestThreadFactory.gmk
index 4f0ead24ece..94338626769 100644
--- a/make/test/BuildJtregTestThreadFactory.gmk
+++ b/make/test/BuildJtregTestThreadFactory.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2022, 2024, 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
@@ -23,18 +23,13 @@
# questions.
#
-default: build
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include JavaCompilation.gmk
-TARGETS :=
-
-################################################################################
-
TTF_BASEDIR := $(TOPDIR)/test/jtreg_test_thread_factory
TTF_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/jtreg_test_thread_factory
TTF_JAR := $(TTF_SUPPORT)/jtregTestThreadFactory.jar
@@ -64,4 +59,8 @@ IMAGES_TARGETS += $(COPY_TTF)
build: $(TARGETS)
images: $(IMAGES_TARGETS)
-.PHONY: all images
+.PHONY: images
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk
index 1052e422f7b..92f40472c3c 100644
--- a/make/test/BuildMicrobenchmark.gmk
+++ b/make/test/BuildMicrobenchmark.gmk
@@ -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
@@ -23,11 +23,9 @@
# questions.
#
-# This must be the first rule
-default: all
+include MakeFileStart.gmk
-include $(SPEC)
-include MakeBase.gmk
+################################################################################
include CopyFiles.gmk
include JarArchive.gmk
@@ -96,8 +94,6 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports java.base/jdk.internal.util=ALL-UNNAMED \
- --add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \
- --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
--add-exports java.base/sun.invoke.util=ALL-UNNAMED \
--add-exports java.base/sun.security.util=ALL-UNNAMED \
@@ -126,9 +122,20 @@ $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
$(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 := .*, \
@@ -157,4 +164,6 @@ $(eval $(call SetupCopyFiles, COPY_MICROBENCHMARK_NATIVE, \
all: $(MICROBENCHMARK_JAR) $(BUILD_MICROBENCHMARK_LIBRARIES) $(COPY_MICROBENCHMARK_NATIVE)
-.PHONY: all
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk
index 56594238261..dc5e0a9bd64 100644
--- a/make/test/BuildTestLib.gmk
+++ b/make/test/BuildTestLib.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,17 +23,14 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# This file builds the Java components of testlib.
# It also covers the test-image part, where the built files are copied to the
# test image.
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
include CopyFiles.gmk
include JavaCompilation.gmk
@@ -41,8 +38,6 @@ include JavaCompilation.gmk
# Targets for building the test lib jars
################################################################################
-TARGETS :=
-
TEST_LIB_SOURCE_DIR := $(TOPDIR)/test/lib
TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
@@ -57,19 +52,27 @@ $(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, \
- DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview restricted dangling-doc-comments, \
JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
--add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
--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, \
))
@@ -86,10 +89,13 @@ $(eval $(call SetupCopyFiles, COPY_LIBTEST_JARS, \
DEST := $(TEST_IMAGE_DIR)/lib-test, \
FILES := $(BUILD_WB_JAR_JAR) $(BUILD_TEST_LIB_JAR_JAR), \
))
-#
test-image-lib: $(COPY_LIBTEST_JARS)
all: build-test-lib
-.PHONY: default all build-test-lib test-image-lib
+.PHONY: build-test-lib test-image-lib
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/BuildTestLibNative.gmk b/make/test/BuildTestLibNative.gmk
index 63dcbbf008b..f2a3aafeea9 100644
--- a/make/test/BuildTestLibNative.gmk
+++ b/make/test/BuildTestLibNative.gmk
@@ -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
@@ -23,17 +23,14 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# This file builds the native component of testlib.
# It also covers the test-image part, where the built files are copied to the
# test image.
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
include CopyFiles.gmk
include TestFilesCompilation.gmk
@@ -86,4 +83,8 @@ test-image-lib-native: $(COPY_LIBTEST_NATIVE_TO_HOTSPOT) $(COPY_LIBTEST_NATIVE_T
all: build-test-lib-native
-.PHONY: default all build-test-lib-native test-image-lib-native
+.PHONY: build-test-lib-native test-image-lib-native
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/BuildTestSetupAOT.gmk b/make/test/BuildTestSetupAOT.gmk
new file mode 100644
index 00000000000..0b6376c0d89
--- /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 97f2f12cb76..207f82241aa 100644
--- a/make/test/JtregNativeHotspot.gmk
+++ b/make/test/JtregNativeHotspot.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,1553 +23,129 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# This file builds the native component of the JTReg tests for Hotspot.
# It also covers the test-image part, where the built files are copied to the
# test image.
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
include CopyFiles.gmk
include TestFilesCompilation.gmk
-$(eval $(call IncludeCustomExtension, test/JtregNativeHotspot.gmk))
-
################################################################################
# Targets for building the native tests themselves.
################################################################################
# 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
-
-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
-
-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)
-
-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)
+NSK_SHARE_DIR := $(VM_TESTBASE_DIR)/nsk/share
################################################################################
+# Platform independent setup
+# Optimization -O3 needed, HIGH == -O3
+HOTSPOT_JTREG_LIBRARIES_OPTIMIZATION_libNoFramePointer := HIGH
+
+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_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_LIBRARIES_JDK_LIBS_libatExit := 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.
@@ -1577,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, \
))
@@ -1588,4 +165,9 @@ test-image-hotspot-jtreg-native: $(COPY_HOTSPOT_JTREG_NATIVE)
all: build-test-hotspot-jtreg-native
test-image: test-image-hotspot-jtreg-native
-.PHONY: default all 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
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/JtregNativeJdk.gmk b/make/test/JtregNativeJdk.gmk
index 90055cb5c01..60a88ca1c9a 100644
--- a/make/test/JtregNativeJdk.gmk
+++ b/make/test/JtregNativeJdk.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -23,22 +23,17 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# This file builds the native component of the JTReg tests for JDK.
# It also covers the test-image part, where the built files are copied to the
# test image.
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
include CopyFiles.gmk
include TestFilesCompilation.gmk
-$(eval $(call IncludeCustomExtension, test/JtregNativeJdk.gmk))
-
################################################################################
# Targets for building the native tests themselves.
################################################################################
@@ -61,8 +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_libTracePinnedThreads := java.base:libjvm
-BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libNewDirectByteBuffer := java.base:libjava
BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libGetXSpace := java.base:libjava
# Platform specific setup
@@ -75,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
@@ -85,12 +77,10 @@ else
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := -pthread
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := -pthread
- BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libExplicitAttach := java.base:libjvm
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libExplicitAttach := -pthread
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)
@@ -169,4 +159,8 @@ test-image-jdk-jtreg-native: $(COPY_JDK_JTREG_NATIVE)
all: build-test-jdk-jtreg-native
test-image: test-image-jdk-jtreg-native
-.PHONY: default all build-test-jdk-jtreg-native test-image-jdk-jtreg-native test-image
+.PHONY: build-test-jdk-jtreg-native test-image-jdk-jtreg-native test-image
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/make/test/JtregNativeLibTest.gmk b/make/test/JtregNativeLibTest.gmk
index 1a0177e63b0..6a1441495d1 100644
--- a/make/test/JtregNativeLibTest.gmk
+++ b/make/test/JtregNativeLibTest.gmk
@@ -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
@@ -23,22 +23,17 @@
# questions.
#
+include MakeFileStart.gmk
+
################################################################################
# This file builds the native component of the JTReg tests for testlibrary.
# It also covers the test-image part, where the built files are copied to the
# test image.
################################################################################
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
include CopyFiles.gmk
include TestFilesCompilation.gmk
-$(eval $(call IncludeCustomExtension, test/JtregNativeLibTest.gmk))
-
################################################################################
# Targets for building the native tests themselves.
################################################################################
@@ -89,4 +84,8 @@ test-image-libtest-jtreg-native: $(COPY_LIBTEST_JTREG_NATIVE)
all: build-test-libtest-jtreg-native
test-image: test-image-libtest-jtreg-native
-.PHONY: default all build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image
+.PHONY: build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image
+
+################################################################################
+
+include MakeFileEnd.gmk
diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad
index 017dc0ed85f..5bfe697d12c 100644
--- a/src/hotspot/cpu/aarch64/aarch64.ad
+++ b/src/hotspot/cpu/aarch64/aarch64.ad
@@ -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) {
@@ -4541,6 +4539,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);
diff --git a/src/hotspot/cpu/aarch64/aarch64_vector.ad b/src/hotspot/cpu/aarch64/aarch64_vector.ad
index d217fb7e949..c7a0fc5724b 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 422e98d9b68..171bc390545 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 33a72263a27..b543c96f3b8 100644
--- a/src/hotspot/cpu/aarch64/abstractInterpreter_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/abstractInterpreter_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2022, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "interpreter/interpreter.hpp"
#include "oops/constMethod.hpp"
#include "oops/klass.inline.hpp"
@@ -150,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.cpp b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp
index 76f88764416..b03344f2d80 100644
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp
@@ -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.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.hpp"
diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
index a5e0e2665af..3db7d308844 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.
*
@@ -2552,6 +2552,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 +2591,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 +2600,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 +2616,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 +3328,12 @@ public:
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 +3444,8 @@ public:
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 +4237,20 @@ public:
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/bytecodes_aarch64.cpp b/src/hotspot/cpu/aarch64/bytecodes_aarch64.cpp
index 744a983b183..119ad8baec3 100644
--- a/src/hotspot/cpu/aarch64/bytecodes_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/bytecodes_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "interpreter/bytecodes.hpp"
diff --git a/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
index 89a97a4984f..2334cbdff24 100644
--- a/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
@@ -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, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_CodeStubs.hpp"
#include "c1/c1_FrameMap.hpp"
diff --git a/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp
index 9470caae9fe..51887619ec1 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 c50da1c8beb..00000000000
--- a/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2005, 2017, 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
-#include "precompiled.hpp"
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 e1cfcf3de6c..00000000000
--- 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 91582b6733e..9d30092b45a 100644
--- a/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp
@@ -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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "c1/c1_FrameMap.hpp"
#include "c1/c1_LIR.hpp"
#include "runtime/sharedRuntime.hpp"
@@ -194,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
@@ -240,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 3ec3ce1f679..4d783418429 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 b01360c3f7e..9730e75f266 100644
--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "asm/assembler.hpp"
#include "c1/c1_CodeStubs.hpp"
@@ -585,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:
@@ -717,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);
@@ -753,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;
@@ -906,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());
}
@@ -1218,15 +1217,24 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
void LIR_Assembler::type_profile_helper(Register mdo,
ciMethodData *md, ciProfileData *data,
Register recv, Label* update_done) {
+
+ // Given a profile data offset, generate an Address which points to
+ // the corresponding slot in mdo->data().
+ // Clobbers rscratch2.
+ auto slot_at = [=](ByteSize offset) -> Address {
+ return __ form_address(rscratch2, mdo,
+ md->byte_offset_of_slot(data, offset),
+ LogBytesPerWord);
+ };
+
for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
Label next_test;
// See if the receiver is receiver[n].
- __ lea(rscratch2, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
- __ ldr(rscratch1, Address(rscratch2));
+ __ ldr(rscratch1, slot_at(ReceiverTypeData::receiver_offset(i)));
__ cmp(recv, rscratch1);
__ br(Assembler::NE, next_test);
- Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)));
- __ addptr(data_addr, DataLayout::counter_increment);
+ __ addptr(slot_at(ReceiverTypeData::receiver_count_offset(i)),
+ DataLayout::counter_increment);
__ b(*update_done);
__ bind(next_test);
}
@@ -1234,15 +1242,12 @@ void LIR_Assembler::type_profile_helper(Register mdo,
// Didn't find receiver; find next empty slot and fill it in
for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
Label next_test;
- __ lea(rscratch2,
- Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
- Address recv_addr(rscratch2);
+ Address recv_addr(slot_at(ReceiverTypeData::receiver_offset(i)));
__ ldr(rscratch1, recv_addr);
__ cbnz(rscratch1, next_test);
__ str(recv, recv_addr);
__ mov(rscratch1, DataLayout::counter_increment);
- __ lea(rscratch2, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i))));
- __ str(rscratch1, Address(rscratch2));
+ __ str(rscratch1, slot_at(ReceiverTypeData::receiver_count_offset(i)));
__ b(*update_done);
__ bind(next_test);
}
@@ -1414,8 +1419,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
// Object is null; update MDO and exit
Address data_addr
= __ form_address(rscratch2, mdo,
- md->byte_offset_of_slot(data, DataLayout::flags_offset()),
- 0);
+ md->byte_offset_of_slot(data, DataLayout::flags_offset()), 0);
__ ldrb(rscratch1, data_addr);
__ orr(rscratch1, rscratch1, BitData::null_seen_byte_constant());
__ strb(rscratch1, data_addr);
@@ -1594,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()) {
@@ -1765,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;
@@ -2566,10 +2567,12 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
for (i = 0; i < VirtualCallData::row_limit(); i++) {
ciKlass* receiver = vc_data->receiver(i);
if (receiver == nullptr) {
- Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
__ mov_metadata(rscratch1, known_klass->constant_encoding());
- __ lea(rscratch2, recv_addr);
- __ str(rscratch1, Address(rscratch2));
+ Address recv_addr =
+ __ form_address(rscratch2, mdo,
+ md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)),
+ LogBytesPerWord);
+ __ str(rscratch1, recv_addr);
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)));
__ addptr(data_addr, DataLayout::counter_increment);
return;
@@ -2843,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 d3cf6c9187d..12b941fc4f7 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 4ae2da66802..5fee15c8400 100644
--- a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2024, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_Compilation.hpp"
#include "c1/c1_FrameMap.hpp"
@@ -408,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
@@ -779,13 +778,11 @@ void LIRGenerator::do_MathIntrinsic(Intrinsic* x) {
}
case vmIntrinsics::_floatToFloat16: {
LIR_Opr tmp = new_register(T_FLOAT);
- __ move(LIR_OprFact::floatConst(-0.0), tmp);
__ f2hf(src, dst, tmp);
break;
}
case vmIntrinsics::_float16ToFloat: {
LIR_Opr tmp = new_register(T_FLOAT);
- __ move(LIR_OprFact::floatConst(-0.0), tmp);
__ hf2f(src, dst, tmp);
break;
}
@@ -1319,6 +1316,11 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
x->direct_compare(), patching_info, x->profiled_method(), x->profiled_bci());
}
+// Intrinsic for Class::isInstance
+address LIRGenerator::isInstance_entry() {
+ return Runtime1::entry_for(C1StubId::is_instance_of_id);
+}
+
void LIRGenerator::do_If(If* x) {
assert(x->number_of_sux() == 2, "inconsistency");
ValueTag tag = x->x()->type()->tag();
diff --git a/src/hotspot/cpu/aarch64/c1_LIR_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIR_aarch64.cpp
index 0dd1a2156e8..5d2890251d7 100644
--- a/src/hotspot/cpu/aarch64/c1_LIR_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_LIR_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/register.hpp"
#include "c1/c1_LIR.hpp"
diff --git a/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_LinearScan_aarch64.hpp
index 01a4d27532a..4062adf4154 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 fc6cadc8450..6b1a5a7f1e0 100644
--- a/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
@@ -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, 2021, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
diff --git a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
index 19665d1b894..063918ee20b 100644
--- a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
@@ -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, 2021, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "c1/c1_CodeStubs.hpp"
#include "c1/c1_Defs.hpp"
@@ -258,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);
@@ -901,6 +903,55 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
}
break;
+ case C1StubId::is_instance_of_id:
+ {
+ // Mirror: c_rarg0
+ // Object: c_rarg1
+ // Temps: r3, r4, r5, r6
+ // Result: r0
+
+ // Get the Klass* into c_rarg6
+ Register klass = c_rarg6, obj = c_rarg1, result = r0;
+ __ ldr(klass, Address(c_rarg0, java_lang_Class::klass_offset()));
+
+ Label fail, is_secondary, success;
+
+ __ cbz(klass, fail); // Klass is null
+ __ cbz(obj, fail); // obj is null
+
+ __ ldrw(r3, Address(klass, in_bytes(Klass::super_check_offset_offset())));
+ __ cmpw(r3, in_bytes(Klass::secondary_super_cache_offset()));
+ __ br(Assembler::EQ, is_secondary); // Klass is a secondary superclass
+
+ // Klass is a concrete class
+ __ load_klass(r5, obj);
+ __ ldr(rscratch1, Address(r5, r3));
+ __ cmp(klass, rscratch1);
+ __ cset(result, Assembler::EQ);
+ __ ret(lr);
+
+ __ bind(is_secondary);
+
+ __ load_klass(obj, obj);
+
+ // This is necessary because I am never in my own secondary_super list.
+ __ cmp(obj, klass);
+ __ br(Assembler::EQ, success);
+
+ __ lookup_secondary_supers_table_var(obj, klass,
+ /*temps*/r3, r4, r5, v0,
+ result,
+ &success);
+ __ bind(fail);
+ __ mov(result, 0);
+ __ ret(lr);
+
+ __ bind(success);
+ __ mov(result, 1);
+ __ ret(lr);
+ }
+ break;
+
case C1StubId::monitorexit_nofpu_id:
save_fpu_registers = false;
// fall through
diff --git a/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp b/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp
index 90157a5668d..5d8d1fbd9cb 100644
--- a/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "opto/c2_MacroAssembler.hpp"
#include "opto/c2_CodeStubs.hpp"
#include "runtime/objectMonitor.hpp"
diff --git a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
index 5cc57976296..605a05a44a7 100644
--- a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "opto/c2_MacroAssembler.hpp"
@@ -313,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.
@@ -636,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.
@@ -2550,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,
diff --git a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.hpp
index d61b050407d..e0eaa0b76e6 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);
diff --git a/src/hotspot/cpu/aarch64/c2_init_aarch64.cpp b/src/hotspot/cpu/aarch64/c2_init_aarch64.cpp
index 436e0c5e41c..e1bf8e3d1af 100644
--- a/src/hotspot/cpu/aarch64/c2_init_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c2_init_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "opto/compile.hpp"
#include "opto/node.hpp"
diff --git a/src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp b/src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp
index 31618414e31..97d9f7afdfb 100644
--- a/src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/codeBuffer.inline.hpp"
#include "asm/macroAssembler.hpp"
diff --git a/src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp b/src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp
index b9248b01a09..24a7a78b800 100644
--- a/src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp
@@ -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, 2018, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "code/nmethod.hpp"
diff --git a/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp b/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
index 6ad6e3134bc..0c2d9a32c8c 100644
--- a/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2023, Red Hat, Inc. All rights reserved.
- * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "logging/log.hpp"
#include "oops/compressedKlass.hpp"
diff --git a/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp b/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
index 4322eb1c4fc..f30b5d7cf2c 100644
--- a/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "code/codeBlob.hpp"
#include "code/codeCache.hpp"
@@ -78,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);
}
@@ -192,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/foreignGlobals_aarch64.cpp b/src/hotspot/cpu/aarch64/foreignGlobals_aarch64.cpp
index 9d1a66f8871..1ed5e6f312f 100644
--- a/src/hotspot/cpu/aarch64/foreignGlobals_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/foreignGlobals_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "code/vmreg.inline.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/jniHandles.inline.hpp"
diff --git a/src/hotspot/cpu/aarch64/frame_aarch64.cpp b/src/hotspot/cpu/aarch64/frame_aarch64.cpp
index 361b913fd2e..b07fa2fa9df 100644
--- a/src/hotspot/cpu/aarch64/frame_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.cpp
@@ -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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "compiler/oopMap.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/resourceArea.hpp"
@@ -163,6 +162,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
}
if (Continuation::is_return_barrier_entry(sender_pc)) {
+ // sender_pc might be invalid so check that the frame
+ // actually belongs to a Continuation.
+ if (!Continuation::is_frame_in_continuation(thread, *this)) {
+ return false;
+ }
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
frame s = Continuation::continuation_bottom_sender(thread, *this, sender_sp);
sender_sp = s.sp();
@@ -503,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/g1/g1BarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp
index df521f94d1f..42f3c4a015a 100644
--- a/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/g1/g1BarrierSet.hpp"
#include "gc/g1/g1BarrierSetAssembler.hpp"
diff --git a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
index 0161843036b..869e26d3359 100644
--- a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "classfile/classLoaderData.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
@@ -286,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();
@@ -362,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/shared/barrierSetNMethod_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp
index 5169a510154..c45611c882b 100644
--- a/src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2023, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "code/codeCache.hpp"
#include "code/nativeInst.hpp"
#include "gc/shared/barrierSet.hpp"
diff --git a/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp
index 6afdb285914..ea36183c9de 100644
--- a/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2021, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/cardTable.hpp"
diff --git a/src/hotspot/cpu/aarch64/gc/shared/modRefBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shared/modRefBarrierSetAssembler_aarch64.cpp
index a50152d244f..68901591893 100644
--- a/src/hotspot/cpu/aarch64/gc/shared/modRefBarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shared/modRefBarrierSetAssembler_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2019, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/modRefBarrierSetAssembler.hpp"
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 666335330ed..e33ef47cf3c 100644
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
index f682e86cdfb..ac22b43faaf 100644
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
#include "gc/shenandoah/shenandoahForwarding.hpp"
@@ -378,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;
@@ -625,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 c656736aa64..a58c91a6a41 100644
--- a/src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp
@@ -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
@@ -21,7 +21,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "gc/shared/gcLogPrecious.hpp"
#include "gc/shared/gc_globals.hpp"
#include "gc/z/zAddress.hpp"
@@ -85,7 +84,7 @@ static size_t probe_valid_max_address_bit() {
munmap(result_addr, page_size);
}
}
- log_info_p(gc, init)("Probing address space for the highest valid bit: " SIZE_FORMAT, max_address_bit);
+ log_info_p(gc, init)("Probing address space for the highest valid bit: %zu", max_address_bit);
return MAX2(max_address_bit, MINIMUM_MAX_ADDRESS_BIT);
#else // LINUX
return DEFAULT_MAX_ADDRESS_BIT;
diff --git a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
index 3f1898b6742..5d4f0801ec6 100644
--- a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
@@ -21,7 +21,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/codeBlob.hpp"
#include "code/vmreg.inline.hpp"
diff --git a/src/hotspot/cpu/aarch64/icache_aarch64.cpp b/src/hotspot/cpu/aarch64/icache_aarch64.cpp
index 8bdddd4f151..311f3a7de1f 100644
--- a/src/hotspot/cpu/aarch64/icache_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/icache_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2023, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "runtime/icache.hpp"
void ICacheStubGenerator::generate_icache_flush(
diff --git a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
index 9c67a0dfead..710a1f0677d 100644
--- a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 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.
*
@@ -23,10 +23,9 @@
*
*/
-#include
-#include
+#include // do not reorder
+#include // do not reorder
-#include "precompiled.hpp"
#include "immediate_aarch64.hpp"
#include "metaprogramming/primitiveConversions.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
index 836caa86cb0..d5ba85da989 100644
--- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
@@ -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, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/compiler_globals.hpp"
#include "gc/shared/barrierSet.hpp"
@@ -503,7 +502,7 @@ void InterpreterMacroAssembler::remove_activation(
// get method access flags
ldr(r1, Address(rfp, frame::interpreter_frame_method_offset * wordSize));
- ldr(r2, Address(r1, Method::access_flags_offset()));
+ ldrh(r2, Address(r1, Method::access_flags_offset()));
tbz(r2, exact_log2(JVM_ACC_SYNCHRONIZED), unlocked);
// Don't unlock anything if the _do_not_unlock_if_synchronized flag
@@ -1402,9 +1401,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 bc2070d283d..059d79c3cb9 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/interpreterRT_aarch64.cpp b/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp
index 90c7ca6f08a..d6310a2d326 100644
--- a/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +24,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "interpreter/interp_masm.hpp"
#include "interpreter/interpreter.hpp"
diff --git a/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp b/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp
index aea268ea944..8bec45b4b47 100644
--- a/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
diff --git a/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp b/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp
index 45ad873ae27..3015206dadc 100644
--- a/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -21,7 +21,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "jvmci/jvmci.hpp"
#include "jvmci/jvmciCodeInstaller.hpp"
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
index d561fb912a3..b6472b1b948 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "ci/ciEnv.hpp"
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
index 244de10d0e2..bd537af59e4 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
@@ -1173,7 +1173,10 @@ public:
// Arithmetics
+ // Clobber: rscratch1, rscratch2
void addptr(const Address &dst, int32_t src);
+
+ // Clobber: rscratch1
void cmpptr(Register src1, Address src2);
void cmpoop(Register obj1, Register obj2);
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_aes.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_aes.cpp
index 03853a7ca46..84b85b7b445 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_aes.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_aes.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp
index 9e53258730e..1f7bb8f46f6 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_chacha.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 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
@@ -22,9 +22,6 @@
*
*/
-#include "precompiled.hpp"
-
-#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "macroAssembler_aarch64.hpp"
#include "memory/resourceArea.hpp"
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp
index 91226dc78eb..d4bc983511f 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, Cavium. All rights reserved. (By BELLSOFT)
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "macroAssembler_aarch64.hpp"
diff --git a/src/hotspot/cpu/aarch64/matcher_aarch64.hpp b/src/hotspot/cpu/aarch64/matcher_aarch64.hpp
index 447c5f57a8a..a6cd0557758 100644
--- a/src/hotspot/cpu/aarch64/matcher_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/matcher_aarch64.hpp
@@ -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; }
diff --git a/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp b/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp
index aa6a9d14ff1..588b8898d2d 100644
--- a/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp
@@ -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, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "classfile/vmClasses.hpp"
diff --git a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp b/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp
index 1f6d7292389..33158d6b97a 100644
--- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp
@@ -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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "code/codeCache.hpp"
#include "code/compiledIC.hpp"
diff --git a/src/hotspot/cpu/aarch64/registerMap_aarch64.cpp b/src/hotspot/cpu/aarch64/registerMap_aarch64.cpp
index 7bf513eba31..b58386ec802 100644
--- a/src/hotspot/cpu/aarch64/registerMap_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/registerMap_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "runtime/registerMap.hpp"
#include "vmreg_aarch64.inline.hpp"
diff --git a/src/hotspot/cpu/aarch64/register_aarch64.cpp b/src/hotspot/cpu/aarch64/register_aarch64.cpp
index 3a46e38a72a..349845154e2 100644
--- a/src/hotspot/cpu/aarch64/register_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/register_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "register_aarch64.hpp"
Register::RegisterImpl all_RegisterImpls [Register::number_of_declared_registers + 1];
@@ -59,3 +58,23 @@ const char* PRegister::PRegisterImpl::name() const {
};
return is_valid() ? names[encoding()] : "pnoreg";
}
+
+// convenience methods for splitting 8-way vector register sequences
+// in half -- needed because vector operations can normally only be
+// benefit from 4-way instruction parallelism
+
+VSeq<4> vs_front(const VSeq<8>& v) {
+ return VSeq<4>(v.base(), v.delta());
+}
+
+VSeq<4> vs_back(const VSeq<8>& v) {
+ return VSeq<4>(v.base() + 4 * v.delta(), v.delta());
+}
+
+VSeq<4> vs_even(const VSeq<8>& v) {
+ return VSeq<4>(v.base(), v.delta() * 2);
+}
+
+VSeq<4> vs_odd(const VSeq<8>& v) {
+ return VSeq<4>(v.base() + 1, v.delta() * 2);
+}
diff --git a/src/hotspot/cpu/aarch64/register_aarch64.hpp b/src/hotspot/cpu/aarch64/register_aarch64.hpp
index ab635e1be90..45578336cfe 100644
--- a/src/hotspot/cpu/aarch64/register_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/register_aarch64.hpp
@@ -412,4 +412,72 @@ 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).
+
+template class VSeq {
+ static_assert(N >= 2, "vector sequence length must be greater than 1");
+ static_assert(N <= 8, "vector sequence length must not exceed 8");
+ static_assert((N & (N - 1)) == 0, "vector sequence length must be power of two");
+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, "invalid base register");
+ assert (_delta >= 0, "invalid register delta");
+ assert ((_base + (N - 1) * _delta) < 32, "range exceeded");
+ }
+ // 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;
+ int bit = 1 << _base;
+ for (int i = 0; i < N; i++) {
+ m |= bit << (i * _delta);
+ }
+ return m;
+ }
+ int base() const { return _base; }
+ int delta() const { return _delta; }
+};
+
+// declare convenience methods for splitting vector register sequences
+
+VSeq<4> vs_front(const VSeq<8>& v);
+VSeq<4> vs_back(const VSeq<8>& v);
+VSeq<4> vs_even(const VSeq<8>& v);
+VSeq<4> vs_odd(const VSeq<8>& v);
+
+// methods for use in asserts to check VSeq inputs and oupts 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(); }
+
#endif // CPU_AARCH64_REGISTER_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/relocInfo_aarch64.cpp b/src/hotspot/cpu/aarch64/relocInfo_aarch64.cpp
index c4c8648d552..f5d7d9e4387 100644
--- a/src/hotspot/cpu/aarch64/relocInfo_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/relocInfo_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "code/nmethod.hpp"
#include "code/relocInfo.hpp"
diff --git a/src/hotspot/cpu/aarch64/runtime_aarch64.cpp b/src/hotspot/cpu/aarch64/runtime_aarch64.cpp
index 5358a4e6a1d..83e43c3ebd2 100644
--- a/src/hotspot/cpu/aarch64/runtime_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/runtime_aarch64.cpp
@@ -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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#ifdef COMPILER2
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
@@ -60,11 +59,12 @@ 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);
MacroAssembler* masm = new MacroAssembler(&buffer);
assert(SimpleRuntimeFrame::framesize % 4 == 0, "sp not 16-byte aligned");
@@ -243,7 +243,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);
}
@@ -273,7 +273,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), "");
@@ -283,7 +283,8 @@ 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);
MacroAssembler* masm = new MacroAssembler(&buffer);
// TODO check various assumptions made here
@@ -377,7 +378,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 fa48092fd50..b0b29987601 100644
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
@@ -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, 2021, Red Hat Inc. All rights reserved.
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +24,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/codeCache.hpp"
@@ -760,7 +759,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label L_skip_barrier;
{ // Bypass the barrier for non-static methods
- __ ldrw(rscratch1, Address(rmethod, Method::access_flags_offset()));
+ __ ldrh(rscratch1, Address(rmethod, Method::access_flags_offset()));
__ andsw(zr, rscratch1, JVM_ACC_STATIC);
__ br(Assembler::EQ, L_skip_barrier); // non-static
}
diff --git a/src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp b/src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp
new file mode 100644
index 00000000000..a893aacaaf2
--- /dev/null
+++ b/src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2025, 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_STUBDECLARATIONS_HPP
+#define CPU_AARCH64_STUBDECLARATIONS_HPP
+
+#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(initial, 10000) \
+
+
+#define STUBGEN_CONTINUATION_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(continuation, 2000) \
+
+
+#define STUBGEN_COMPILER_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(compiler, 55000 ZGC_ONLY(+5000)) \
+ do_stub(compiler, vector_iota_indices) \
+ do_arch_entry(aarch64, compiler, vector_iota_indices, \
+ vector_iota_indices, vector_iota_indices) \
+ do_stub(compiler, large_array_equals) \
+ do_arch_entry(aarch64, compiler, large_array_equals, \
+ large_array_equals, large_array_equals) \
+ do_stub(compiler, large_arrays_hashcode_boolean) \
+ do_arch_entry(aarch64, compiler, large_arrays_hashcode_boolean, \
+ large_arrays_hashcode_boolean, \
+ large_arrays_hashcode_boolean) \
+ do_stub(compiler, large_arrays_hashcode_byte) \
+ do_arch_entry(aarch64, compiler, large_arrays_hashcode_byte, \
+ large_arrays_hashcode_byte, \
+ large_arrays_hashcode_byte) \
+ do_stub(compiler, large_arrays_hashcode_char) \
+ do_arch_entry(aarch64, compiler, large_arrays_hashcode_char, \
+ large_arrays_hashcode_char, \
+ large_arrays_hashcode_char) \
+ do_stub(compiler, large_arrays_hashcode_short) \
+ do_arch_entry(aarch64, compiler, large_arrays_hashcode_short, \
+ large_arrays_hashcode_short, \
+ large_arrays_hashcode_short) \
+ do_stub(compiler, large_arrays_hashcode_int) \
+ do_arch_entry(aarch64, compiler, large_arrays_hashcode_int, \
+ large_arrays_hashcode_int, \
+ large_arrays_hashcode_int) \
+ do_stub(compiler, large_byte_array_inflate) \
+ do_arch_entry(aarch64, compiler, large_byte_array_inflate, \
+ large_byte_array_inflate, large_byte_array_inflate) \
+ do_stub(compiler, count_positives) \
+ do_arch_entry(aarch64, compiler, count_positives, count_positives, \
+ count_positives) \
+ do_stub(compiler, count_positives_long) \
+ do_arch_entry(aarch64, compiler, count_positives_long, \
+ count_positives_long, count_positives_long) \
+ do_stub(compiler, compare_long_string_LL) \
+ do_arch_entry(aarch64, compiler, compare_long_string_LL, \
+ compare_long_string_LL, compare_long_string_LL) \
+ do_stub(compiler, compare_long_string_UU) \
+ do_arch_entry(aarch64, compiler, compare_long_string_UU, \
+ compare_long_string_UU, compare_long_string_UU) \
+ do_stub(compiler, compare_long_string_LU) \
+ do_arch_entry(aarch64, compiler, compare_long_string_LU, \
+ compare_long_string_LU, compare_long_string_LU) \
+ do_stub(compiler, compare_long_string_UL) \
+ do_arch_entry(aarch64, compiler, compare_long_string_UL, \
+ compare_long_string_UL, compare_long_string_UL) \
+ do_stub(compiler, string_indexof_linear_ll) \
+ do_arch_entry(aarch64, compiler, string_indexof_linear_ll, \
+ string_indexof_linear_ll, string_indexof_linear_ll) \
+ do_stub(compiler, string_indexof_linear_uu) \
+ do_arch_entry(aarch64, compiler, string_indexof_linear_uu, \
+ string_indexof_linear_uu, string_indexof_linear_uu) \
+ do_stub(compiler, string_indexof_linear_ul) \
+ do_arch_entry(aarch64, compiler, string_indexof_linear_ul, \
+ string_indexof_linear_ul, string_indexof_linear_ul) \
+ /* this uses the entry for ghash_processBlocks */ \
+ do_stub(compiler, ghash_processBlocks_wide) \
+
+
+#define STUBGEN_FINAL_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ 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) \
+ do_stub(final, copy_byte_b) \
+ do_arch_entry(aarch64, final, copy_byte_b, copy_byte_b, \
+ copy_byte_b) \
+ do_stub(final, copy_oop_f) \
+ do_arch_entry(aarch64, final, copy_oop_f, copy_oop_f, copy_oop_f) \
+ do_stub(final, copy_oop_b) \
+ do_arch_entry(aarch64, final, copy_oop_b, copy_oop_b, copy_oop_b) \
+ do_stub(final, copy_oop_uninit_f) \
+ do_arch_entry(aarch64, final, copy_oop_uninit_f, copy_oop_uninit_f, \
+ copy_oop_uninit_f) \
+ do_stub(final, copy_oop_uninit_b) \
+ do_arch_entry(aarch64, final, copy_oop_uninit_b, copy_oop_uninit_b, \
+ copy_oop_uninit_b) \
+ do_stub(final, zero_blocks) \
+ do_arch_entry(aarch64, final, zero_blocks, zero_blocks, \
+ zero_blocks) \
+ do_stub(final, spin_wait) \
+ do_arch_entry_init(aarch64, final, spin_wait, spin_wait, \
+ spin_wait, empty_spin_wait) \
+ /* stub only -- entries are not stored in StubRoutines::aarch64 */ \
+ /* n.b. these are not the same as the generic atomic stubs */ \
+ do_stub(final, atomic_entry_points) \
+
+
+#endif // CPU_AARCH64_STUBDECLARATIONS_HPP
diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
index de5df5c1af1..f0f145e3d76 100644
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, 2024, Red Hat Inc. All rights reserved.
+ * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2025, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "asm/register.hpp"
@@ -203,7 +202,8 @@ class StubGenerator: public StubCodeGenerator {
(int)frame::entry_frame_call_wrapper_offset == (int)call_wrapper_off,
"adjust this code");
- StubCodeMark mark(this, "StubRoutines", "call_stub");
+ StubGenStubId stub_id = StubGenStubId::call_stub_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Address sp_after_call (rfp, sp_after_call_off * wordSize);
@@ -422,7 +422,8 @@ class StubGenerator: public StubCodeGenerator {
// r0: exception oop
address generate_catch_exception() {
- StubCodeMark mark(this, "StubRoutines", "catch_exception");
+ StubGenStubId stub_id = StubGenStubId::catch_exception_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// same as in generate_call_stub():
@@ -477,7 +478,8 @@ class StubGenerator: public StubCodeGenerator {
// so it just needs to be generated code with no x86 prolog
address generate_forward_exception() {
- StubCodeMark mark(this, "StubRoutines", "forward exception");
+ StubGenStubId stub_id = StubGenStubId::forward_exception_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// Upon entry, LR points to the return address returning into
@@ -566,8 +568,8 @@ class StubGenerator: public StubCodeGenerator {
// [tos + 4]: saved r0
// [tos + 5]: saved rscratch1
address generate_verify_oop() {
-
- StubCodeMark mark(this, "StubRoutines", "verify_oop");
+ StubGenStubId stub_id = StubGenStubId::verify_oop_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Label exit, error;
@@ -615,9 +617,9 @@ class StubGenerator: public StubCodeGenerator {
}
// Generate indices for iota vector.
- address generate_iota_indices(const char *stub_name) {
+ address generate_iota_indices(StubGenStubId stub_id) {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", stub_name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// B
__ emit_data64(0x0706050403020100, relocInfo::none);
@@ -660,7 +662,8 @@ class StubGenerator: public StubCodeGenerator {
Register base = r10, cnt = r11;
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "zero_blocks");
+ StubGenStubId stub_id = StubGenStubId::zero_blocks_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
if (UseBlockZeroing) {
@@ -799,8 +802,39 @@ class StubGenerator: public StubCodeGenerator {
//
// s and d are adjusted to point to the remaining words to copy
//
- void generate_copy_longs(DecoratorSet decorators, BasicType type, Label &start, Register s, Register d, Register count,
- copy_direction direction) {
+ void generate_copy_longs(StubGenStubId stub_id, DecoratorSet decorators, Label &start, Register s, Register d, Register count) {
+ BasicType type;
+ copy_direction direction;
+
+ switch (stub_id) {
+ case copy_byte_f_id:
+ direction = copy_forwards;
+ type = T_BYTE;
+ break;
+ case copy_byte_b_id:
+ direction = copy_backwards;
+ type = T_BYTE;
+ break;
+ case copy_oop_f_id:
+ direction = copy_forwards;
+ type = T_OBJECT;
+ break;
+ case copy_oop_b_id:
+ direction = copy_backwards;
+ type = T_OBJECT;
+ break;
+ case copy_oop_uninit_f_id:
+ direction = copy_forwards;
+ type = T_OBJECT;
+ break;
+ case copy_oop_uninit_b_id:
+ direction = copy_backwards;
+ type = T_OBJECT;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
int unit = wordSize * direction;
int bias = (UseSIMDForMemoryOps ? 4:2) * wordSize;
@@ -815,15 +849,10 @@ class StubGenerator: public StubCodeGenerator {
assert_different_registers(s, d, count, rscratch1, rscratch2);
Label again, drain;
- const char *stub_name;
- if (direction == copy_forwards)
- stub_name = "forward_copy_longs";
- else
- stub_name = "backward_copy_longs";
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", stub_name);
+ StubCodeMark mark(this, stub_id);
__ bind(start);
@@ -1478,10 +1507,11 @@ class StubGenerator: public StubCodeGenerator {
}
// Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // is_oop - true => oop array, so generate store check code
- // name - stub name string
+ // stub_id - is used to name the stub and identify all details of
+ // how to perform the copy.
+ //
+ // entry - is assigned to the stub's post push entry point unless
+ // it is null
//
// Inputs:
// c_rarg0 - source array address
@@ -1492,16 +1522,96 @@ class StubGenerator: public StubCodeGenerator {
// the hardware handle it. The two dwords within qwords that span
// cache line boundaries will still be loaded and stored atomically.
//
- // Side Effects:
- // disjoint_int_copy_entry is set to the no-overlap entry point
- // used by generate_conjoint_int_oop_copy().
+ // Side Effects: entry is set to the (post push) entry point so it
+ // can be used by the corresponding conjoint copy
+ // method
//
- address generate_disjoint_copy(int size, bool aligned, bool is_oop, address *entry,
- const char *name, bool dest_uninitialized = false) {
+ address generate_disjoint_copy(StubGenStubId stub_id, address *entry) {
Register s = c_rarg0, d = c_rarg1, count = c_rarg2;
RegSet saved_reg = RegSet::of(s, d, count);
+ int size;
+ bool aligned;
+ bool is_oop;
+ bool dest_uninitialized;
+ switch (stub_id) {
+ case jbyte_disjoint_arraycopy_id:
+ size = sizeof(jbyte);
+ aligned = false;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_jbyte_disjoint_arraycopy_id:
+ size = sizeof(jbyte);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case jshort_disjoint_arraycopy_id:
+ size = sizeof(jshort);
+ aligned = false;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_jshort_disjoint_arraycopy_id:
+ size = sizeof(jshort);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case jint_disjoint_arraycopy_id:
+ size = sizeof(jint);
+ aligned = false;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_jint_disjoint_arraycopy_id:
+ size = sizeof(jint);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case jlong_disjoint_arraycopy_id:
+ // since this is always aligned we can (should!) use the same
+ // stub as for case arrayof_jlong_disjoint_arraycopy
+ ShouldNotReachHere();
+ break;
+ case arrayof_jlong_disjoint_arraycopy_id:
+ size = sizeof(jlong);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case oop_disjoint_arraycopy_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = false;
+ break;
+ case arrayof_oop_disjoint_arraycopy_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = false;
+ break;
+ case oop_disjoint_arraycopy_uninit_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = true;
+ break;
+ case arrayof_oop_disjoint_arraycopy_uninit_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ break;
+ }
+
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ enter();
@@ -1548,10 +1658,16 @@ class StubGenerator: public StubCodeGenerator {
}
// Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // is_oop - true => oop array, so generate store check code
- // name - stub name string
+ // stub_id - is used to name the stub and identify all details of
+ // how to perform the copy.
+ //
+ // nooverlap_target - identifes the (post push) entry for the
+ // corresponding disjoint copy routine which can be
+ // jumped to if the ranges do not actually overlap
+ //
+ // entry - is assigned to the stub's post push entry point unless
+ // it is null
+ //
//
// Inputs:
// c_rarg0 - source array address
@@ -1562,12 +1678,94 @@ class StubGenerator: public StubCodeGenerator {
// the hardware handle it. The two dwords within qwords that span
// cache line boundaries will still be loaded and stored atomically.
//
- address generate_conjoint_copy(int size, bool aligned, bool is_oop, address nooverlap_target,
- address *entry, const char *name,
- bool dest_uninitialized = false) {
+ // Side Effects:
+ // entry is set to the no-overlap entry point so it can be used by
+ // some other conjoint copy method
+ //
+ address generate_conjoint_copy(StubGenStubId stub_id, address nooverlap_target, address *entry) {
Register s = c_rarg0, d = c_rarg1, count = c_rarg2;
RegSet saved_regs = RegSet::of(s, d, count);
- StubCodeMark mark(this, "StubRoutines", name);
+ int size;
+ bool aligned;
+ bool is_oop;
+ bool dest_uninitialized;
+ switch (stub_id) {
+ case jbyte_arraycopy_id:
+ size = sizeof(jbyte);
+ aligned = false;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_jbyte_arraycopy_id:
+ size = sizeof(jbyte);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case jshort_arraycopy_id:
+ size = sizeof(jshort);
+ aligned = false;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_jshort_arraycopy_id:
+ size = sizeof(jshort);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case jint_arraycopy_id:
+ size = sizeof(jint);
+ aligned = false;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_jint_arraycopy_id:
+ size = sizeof(jint);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case jlong_arraycopy_id:
+ // since this is always aligned we can (should!) use the same
+ // stub as for case arrayof_jlong_disjoint_arraycopy
+ ShouldNotReachHere();
+ break;
+ case arrayof_jlong_arraycopy_id:
+ size = sizeof(jlong);
+ aligned = true;
+ is_oop = false;
+ dest_uninitialized = false;
+ break;
+ case oop_arraycopy_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = false;
+ break;
+ case arrayof_oop_arraycopy_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = false;
+ break;
+ case oop_arraycopy_uninit_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = true;
+ break;
+ case arrayof_oop_arraycopy_uninit_id:
+ size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
+ aligned = !UseCompressedOops;
+ is_oop = true;
+ dest_uninitialized = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ enter();
@@ -1613,230 +1811,8 @@ class StubGenerator: public StubCodeGenerator {
__ mov(r0, zr); // return 0
__ ret(lr);
return start;
-}
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as ssize_t, can be zero
- //
- // If 'from' and/or 'to' are aligned on 4-, 2-, or 1-byte boundaries,
- // we let the hardware handle it. The one to eight bytes within words,
- // dwords or qwords that span cache line boundaries will still be loaded
- // and stored atomically.
- //
- // Side Effects:
- // disjoint_byte_copy_entry is set to the no-overlap entry point //
- // If 'from' and/or 'to' are aligned on 4-, 2-, or 1-byte boundaries,
- // we let the hardware handle it. The one to eight bytes within words,
- // dwords or qwords that span cache line boundaries will still be loaded
- // and stored atomically.
- //
- // Side Effects:
- // disjoint_byte_copy_entry is set to the no-overlap entry point
- // used by generate_conjoint_byte_copy().
- //
- address generate_disjoint_byte_copy(bool aligned, address* entry, const char *name) {
- const bool not_oop = false;
- return generate_disjoint_copy(sizeof (jbyte), aligned, not_oop, entry, name);
}
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as ssize_t, can be zero
- //
- // If 'from' and/or 'to' are aligned on 4-, 2-, or 1-byte boundaries,
- // we let the hardware handle it. The one to eight bytes within words,
- // dwords or qwords that span cache line boundaries will still be loaded
- // and stored atomically.
- //
- address generate_conjoint_byte_copy(bool aligned, address nooverlap_target,
- address* entry, const char *name) {
- const bool not_oop = false;
- return generate_conjoint_copy(sizeof (jbyte), aligned, not_oop, nooverlap_target, entry, name);
- }
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as ssize_t, can be zero
- //
- // If 'from' and/or 'to' are aligned on 4- or 2-byte boundaries, we
- // let the hardware handle it. The two or four words within dwords
- // or qwords that span cache line boundaries will still be loaded
- // and stored atomically.
- //
- // Side Effects:
- // disjoint_short_copy_entry is set to the no-overlap entry point
- // used by generate_conjoint_short_copy().
- //
- address generate_disjoint_short_copy(bool aligned,
- address* entry, const char *name) {
- const bool not_oop = false;
- return generate_disjoint_copy(sizeof (jshort), aligned, not_oop, entry, name);
- }
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as ssize_t, can be zero
- //
- // If 'from' and/or 'to' are aligned on 4- or 2-byte boundaries, we
- // let the hardware handle it. The two or four words within dwords
- // or qwords that span cache line boundaries will still be loaded
- // and stored atomically.
- //
- address generate_conjoint_short_copy(bool aligned, address nooverlap_target,
- address *entry, const char *name) {
- const bool not_oop = false;
- return generate_conjoint_copy(sizeof (jshort), aligned, not_oop, nooverlap_target, entry, name);
-
- }
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as ssize_t, can be zero
- //
- // If 'from' and/or 'to' are aligned on 4-byte boundaries, we let
- // the hardware handle it. The two dwords within qwords that span
- // cache line boundaries will still be loaded and stored atomically.
- //
- // Side Effects:
- // disjoint_int_copy_entry is set to the no-overlap entry point
- // used by generate_conjoint_int_oop_copy().
- //
- address generate_disjoint_int_copy(bool aligned, address *entry,
- const char *name, bool dest_uninitialized = false) {
- const bool not_oop = false;
- return generate_disjoint_copy(sizeof (jint), aligned, not_oop, entry, name);
- }
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as ssize_t, can be zero
- //
- // If 'from' and/or 'to' are aligned on 4-byte boundaries, we let
- // the hardware handle it. The two dwords within qwords that span
- // cache line boundaries will still be loaded and stored atomically.
- //
- address generate_conjoint_int_copy(bool aligned, address nooverlap_target,
- address *entry, const char *name,
- bool dest_uninitialized = false) {
- const bool not_oop = false;
- return generate_conjoint_copy(sizeof (jint), aligned, not_oop, nooverlap_target, entry, name);
- }
-
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord boundary == 8 bytes
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as size_t, can be zero
- //
- // Side Effects:
- // disjoint_oop_copy_entry or disjoint_long_copy_entry is set to the
- // no-overlap entry point used by generate_conjoint_long_oop_copy().
- //
- address generate_disjoint_long_copy(bool aligned, address *entry,
- const char *name, bool dest_uninitialized = false) {
- const bool not_oop = false;
- return generate_disjoint_copy(sizeof (jlong), aligned, not_oop, entry, name);
- }
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord boundary == 8 bytes
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as size_t, can be zero
- //
- address generate_conjoint_long_copy(bool aligned,
- address nooverlap_target, address *entry,
- const char *name, bool dest_uninitialized = false) {
- const bool not_oop = false;
- return generate_conjoint_copy(sizeof (jlong), aligned, not_oop, nooverlap_target, entry, name);
- }
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord boundary == 8 bytes
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as size_t, can be zero
- //
- // Side Effects:
- // disjoint_oop_copy_entry or disjoint_long_copy_entry is set to the
- // no-overlap entry point used by generate_conjoint_long_oop_copy().
- //
- address generate_disjoint_oop_copy(bool aligned, address *entry,
- const char *name, bool dest_uninitialized) {
- const bool is_oop = true;
- const int size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
- return generate_disjoint_copy(size, aligned, is_oop, entry, name, dest_uninitialized);
- }
-
- // Arguments:
- // aligned - true => Input and output aligned on a HeapWord boundary == 8 bytes
- // ignored
- // name - stub name string
- //
- // Inputs:
- // c_rarg0 - source array address
- // c_rarg1 - destination array address
- // c_rarg2 - element count, treated as size_t, can be zero
- //
- address generate_conjoint_oop_copy(bool aligned,
- address nooverlap_target, address *entry,
- const char *name, bool dest_uninitialized) {
- const bool is_oop = true;
- const int size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
- return generate_conjoint_copy(size, aligned, is_oop, nooverlap_target, entry,
- name, dest_uninitialized);
- }
-
-
// Helper for generating a dynamic type check.
// Smashes rscratch1, rscratch2.
void generate_type_check(Register sub_klass,
@@ -1874,8 +1850,18 @@ class StubGenerator: public StubCodeGenerator {
// r0 == 0 - success
// r0 == -1^K - failure, where K is partial transfer count
//
- address generate_checkcast_copy(const char *name, address *entry,
- bool dest_uninitialized = false) {
+ address generate_checkcast_copy(StubGenStubId stub_id, address *entry) {
+ bool dest_uninitialized;
+ switch (stub_id) {
+ case checkcast_arraycopy_id:
+ dest_uninitialized = false;
+ break;
+ case checkcast_arraycopy_uninit_id:
+ dest_uninitialized = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
Label L_load_element, L_store_element, L_do_card_marks, L_done, L_done_pop;
@@ -1909,7 +1895,7 @@ class StubGenerator: public StubCodeGenerator {
copied_oop, r19_klass, count_save);
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ enter(); // required for proper stackwalking of RuntimeStub frame
@@ -2081,16 +2067,17 @@ class StubGenerator: public StubCodeGenerator {
// Examines the alignment of the operands and dispatches
// to a long, int, short, or byte copy loop.
//
- address generate_unsafe_copy(const char *name,
- address byte_copy_entry,
+ address generate_unsafe_copy(address byte_copy_entry,
address short_copy_entry,
address int_copy_entry,
address long_copy_entry) {
+ StubGenStubId stub_id = StubGenStubId::unsafe_arraycopy_id;
+
Label L_long_aligned, L_int_aligned, L_short_aligned;
Register s = c_rarg0, d = c_rarg1, count = c_rarg2;
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ enter(); // required for proper stackwalking of RuntimeStub frame
@@ -2134,10 +2121,10 @@ class StubGenerator: public StubCodeGenerator {
// r0 == 0 - success
// r0 == -1^K - failure, where K is partial transfer count
//
- address generate_generic_copy(const char *name,
- address byte_copy_entry, address short_copy_entry,
+ address generate_generic_copy(address byte_copy_entry, address short_copy_entry,
address int_copy_entry, address oop_copy_entry,
address long_copy_entry, address checkcast_copy_entry) {
+ StubGenStubId stub_id = StubGenStubId::generic_arraycopy_id;
Label L_failed, L_objArray;
Label L_copy_bytes, L_copy_shorts, L_copy_ints, L_copy_longs;
@@ -2155,7 +2142,7 @@ class StubGenerator: public StubCodeGenerator {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -2408,9 +2395,41 @@ class StubGenerator: public StubCodeGenerator {
// value: c_rarg1
// count: c_rarg2 treated as signed
//
- address generate_fill(BasicType t, bool aligned, const char *name) {
+ address generate_fill(StubGenStubId stub_id) {
+ BasicType t;
+ bool aligned;
+
+ switch (stub_id) {
+ case jbyte_fill_id:
+ t = T_BYTE;
+ aligned = false;
+ break;
+ case jshort_fill_id:
+ t = T_SHORT;
+ aligned = false;
+ break;
+ case jint_fill_id:
+ t = T_INT;
+ aligned = false;
+ break;
+ case arrayof_jbyte_fill_id:
+ t = T_BYTE;
+ aligned = true;
+ break;
+ case arrayof_jshort_fill_id:
+ t = T_SHORT;
+ aligned = true;
+ break;
+ case arrayof_jint_fill_id:
+ t = T_INT;
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ };
+
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
BLOCK_COMMENT("Entry:");
@@ -2552,7 +2571,8 @@ class StubGenerator: public StubCodeGenerator {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "_data_cache_writeback");
+ StubGenStubId stub_id = StubGenStubId::data_cache_writeback_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ enter();
@@ -2568,7 +2588,8 @@ class StubGenerator: public StubCodeGenerator {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "_data_cache_writeback_sync");
+ StubGenStubId stub_id = StubGenStubId::data_cache_writeback_sync_id;
+ StubCodeMark mark(this, stub_id);
// pre wbsync is a no-op
// post wbsync translates to an sfence
@@ -2594,61 +2615,44 @@ class StubGenerator: public StubCodeGenerator {
address entry_jlong_arraycopy;
address entry_checkcast_arraycopy;
- generate_copy_longs(IN_HEAP | IS_ARRAY, T_BYTE, copy_f, r0, r1, r15, copy_forwards);
- generate_copy_longs(IN_HEAP | IS_ARRAY, T_BYTE, copy_b, r0, r1, r15, copy_backwards);
+ generate_copy_longs(StubGenStubId::copy_byte_f_id, IN_HEAP | IS_ARRAY, copy_f, r0, r1, r15);
+ generate_copy_longs(StubGenStubId::copy_byte_b_id, IN_HEAP | IS_ARRAY, copy_b, r0, r1, r15);
- generate_copy_longs(IN_HEAP | IS_ARRAY, T_OBJECT, copy_obj_f, r0, r1, r15, copy_forwards);
- generate_copy_longs(IN_HEAP | IS_ARRAY, T_OBJECT, copy_obj_b, r0, r1, r15, copy_backwards);
+ generate_copy_longs(StubGenStubId::copy_oop_f_id, IN_HEAP | IS_ARRAY, copy_obj_f, r0, r1, r15);
+ generate_copy_longs(StubGenStubId::copy_oop_b_id, IN_HEAP | IS_ARRAY, copy_obj_b, r0, r1, r15);
- generate_copy_longs(IN_HEAP | IS_ARRAY | IS_DEST_UNINITIALIZED, T_OBJECT, copy_obj_uninit_f, r0, r1, r15, copy_forwards);
- generate_copy_longs(IN_HEAP | IS_ARRAY | IS_DEST_UNINITIALIZED, T_OBJECT, copy_obj_uninit_b, r0, r1, r15, copy_backwards);
+ generate_copy_longs(StubGenStubId::copy_oop_uninit_f_id, IN_HEAP | IS_ARRAY | IS_DEST_UNINITIALIZED, copy_obj_uninit_f, r0, r1, r15);
+ generate_copy_longs(StubGenStubId::copy_oop_uninit_b_id, IN_HEAP | IS_ARRAY | IS_DEST_UNINITIALIZED, copy_obj_uninit_b, r0, r1, r15);
StubRoutines::aarch64::_zero_blocks = generate_zero_blocks();
//*** jbyte
// Always need aligned and unaligned versions
- StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(false, &entry,
- "jbyte_disjoint_arraycopy");
- StubRoutines::_jbyte_arraycopy = generate_conjoint_byte_copy(false, entry,
- &entry_jbyte_arraycopy,
- "jbyte_arraycopy");
- StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(true, &entry,
- "arrayof_jbyte_disjoint_arraycopy");
- StubRoutines::_arrayof_jbyte_arraycopy = generate_conjoint_byte_copy(true, entry, nullptr,
- "arrayof_jbyte_arraycopy");
+ StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_copy(StubGenStubId::jbyte_disjoint_arraycopy_id, &entry);
+ StubRoutines::_jbyte_arraycopy = generate_conjoint_copy(StubGenStubId::jbyte_arraycopy_id, entry, &entry_jbyte_arraycopy);
+ StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_disjoint_copy(StubGenStubId::arrayof_jbyte_disjoint_arraycopy_id, &entry);
+ StubRoutines::_arrayof_jbyte_arraycopy = generate_conjoint_copy(StubGenStubId::arrayof_jbyte_arraycopy_id, entry, nullptr);
//*** jshort
// Always need aligned and unaligned versions
- StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_short_copy(false, &entry,
- "jshort_disjoint_arraycopy");
- StubRoutines::_jshort_arraycopy = generate_conjoint_short_copy(false, entry,
- &entry_jshort_arraycopy,
- "jshort_arraycopy");
- StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_disjoint_short_copy(true, &entry,
- "arrayof_jshort_disjoint_arraycopy");
- StubRoutines::_arrayof_jshort_arraycopy = generate_conjoint_short_copy(true, entry, nullptr,
- "arrayof_jshort_arraycopy");
+ StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_copy(StubGenStubId::jshort_disjoint_arraycopy_id, &entry);
+ StubRoutines::_jshort_arraycopy = generate_conjoint_copy(StubGenStubId::jshort_arraycopy_id, entry, &entry_jshort_arraycopy);
+ StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_disjoint_copy(StubGenStubId::arrayof_jshort_disjoint_arraycopy_id, &entry);
+ StubRoutines::_arrayof_jshort_arraycopy = generate_conjoint_copy(StubGenStubId::arrayof_jshort_arraycopy_id, entry, nullptr);
//*** jint
// Aligned versions
- StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_disjoint_int_copy(true, &entry,
- "arrayof_jint_disjoint_arraycopy");
- StubRoutines::_arrayof_jint_arraycopy = generate_conjoint_int_copy(true, entry, &entry_jint_arraycopy,
- "arrayof_jint_arraycopy");
+ StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_disjoint_copy(StubGenStubId::arrayof_jint_disjoint_arraycopy_id, &entry);
+ StubRoutines::_arrayof_jint_arraycopy = generate_conjoint_copy(StubGenStubId::arrayof_jint_arraycopy_id, entry, &entry_jint_arraycopy);
// In 64 bit we need both aligned and unaligned versions of jint arraycopy.
// entry_jint_arraycopy always points to the unaligned version
- StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_int_copy(false, &entry,
- "jint_disjoint_arraycopy");
- StubRoutines::_jint_arraycopy = generate_conjoint_int_copy(false, entry,
- &entry_jint_arraycopy,
- "jint_arraycopy");
+ StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_copy(StubGenStubId::jint_disjoint_arraycopy_id, &entry);
+ StubRoutines::_jint_arraycopy = generate_conjoint_copy(StubGenStubId::jint_arraycopy_id, entry, &entry_jint_arraycopy);
//*** jlong
// It is always aligned
- StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_disjoint_long_copy(true, &entry,
- "arrayof_jlong_disjoint_arraycopy");
- StubRoutines::_arrayof_jlong_arraycopy = generate_conjoint_long_copy(true, entry, &entry_jlong_arraycopy,
- "arrayof_jlong_arraycopy");
+ StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_disjoint_copy(StubGenStubId::arrayof_jlong_disjoint_arraycopy_id, &entry);
+ StubRoutines::_arrayof_jlong_arraycopy = generate_conjoint_copy(StubGenStubId::arrayof_jlong_arraycopy_id, entry, &entry_jlong_arraycopy);
StubRoutines::_jlong_disjoint_arraycopy = StubRoutines::_arrayof_jlong_disjoint_arraycopy;
StubRoutines::_jlong_arraycopy = StubRoutines::_arrayof_jlong_arraycopy;
@@ -2659,18 +2663,14 @@ class StubGenerator: public StubCodeGenerator {
bool aligned = !UseCompressedOops;
StubRoutines::_arrayof_oop_disjoint_arraycopy
- = generate_disjoint_oop_copy(aligned, &entry, "arrayof_oop_disjoint_arraycopy",
- /*dest_uninitialized*/false);
+ = generate_disjoint_copy(StubGenStubId::arrayof_oop_disjoint_arraycopy_id, &entry);
StubRoutines::_arrayof_oop_arraycopy
- = generate_conjoint_oop_copy(aligned, entry, &entry_oop_arraycopy, "arrayof_oop_arraycopy",
- /*dest_uninitialized*/false);
+ = generate_conjoint_copy(StubGenStubId::arrayof_oop_arraycopy_id, entry, &entry_oop_arraycopy);
// Aligned versions without pre-barriers
StubRoutines::_arrayof_oop_disjoint_arraycopy_uninit
- = generate_disjoint_oop_copy(aligned, &entry, "arrayof_oop_disjoint_arraycopy_uninit",
- /*dest_uninitialized*/true);
+ = generate_disjoint_copy(StubGenStubId::arrayof_oop_disjoint_arraycopy_uninit_id, &entry);
StubRoutines::_arrayof_oop_arraycopy_uninit
- = generate_conjoint_oop_copy(aligned, entry, nullptr, "arrayof_oop_arraycopy_uninit",
- /*dest_uninitialized*/true);
+ = generate_conjoint_copy(StubGenStubId::arrayof_oop_arraycopy_uninit_id, entry, nullptr);
}
StubRoutines::_oop_disjoint_arraycopy = StubRoutines::_arrayof_oop_disjoint_arraycopy;
@@ -2678,30 +2678,27 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_oop_disjoint_arraycopy_uninit = StubRoutines::_arrayof_oop_disjoint_arraycopy_uninit;
StubRoutines::_oop_arraycopy_uninit = StubRoutines::_arrayof_oop_arraycopy_uninit;
- StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy", &entry_checkcast_arraycopy);
- StubRoutines::_checkcast_arraycopy_uninit = generate_checkcast_copy("checkcast_arraycopy_uninit", nullptr,
- /*dest_uninitialized*/true);
+ StubRoutines::_checkcast_arraycopy = generate_checkcast_copy(StubGenStubId::checkcast_arraycopy_id, &entry_checkcast_arraycopy);
+ StubRoutines::_checkcast_arraycopy_uninit = generate_checkcast_copy(StubGenStubId::checkcast_arraycopy_uninit_id, nullptr);
- StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy",
- entry_jbyte_arraycopy,
+ StubRoutines::_unsafe_arraycopy = generate_unsafe_copy(entry_jbyte_arraycopy,
entry_jshort_arraycopy,
entry_jint_arraycopy,
entry_jlong_arraycopy);
- StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy",
- entry_jbyte_arraycopy,
+ StubRoutines::_generic_arraycopy = generate_generic_copy(entry_jbyte_arraycopy,
entry_jshort_arraycopy,
entry_jint_arraycopy,
entry_oop_arraycopy,
entry_jlong_arraycopy,
entry_checkcast_arraycopy);
- StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");
- StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill");
- StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill");
- StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill");
- StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill");
- StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
+ StubRoutines::_jbyte_fill = generate_fill(StubGenStubId::jbyte_fill_id);
+ StubRoutines::_jshort_fill = generate_fill(StubGenStubId::jshort_fill_id);
+ StubRoutines::_jint_fill = generate_fill(StubGenStubId::jint_fill_id);
+ StubRoutines::_arrayof_jbyte_fill = generate_fill(StubGenStubId::arrayof_jbyte_fill_id);
+ StubRoutines::_arrayof_jshort_fill = generate_fill(StubGenStubId::arrayof_jshort_fill_id);
+ StubRoutines::_arrayof_jint_fill = generate_fill(StubGenStubId::arrayof_jint_fill_id);
}
void generate_math_stubs() { Unimplemented(); }
@@ -2715,7 +2712,8 @@ class StubGenerator: public StubCodeGenerator {
//
address generate_aescrypt_encryptBlock() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "aescrypt_encryptBlock");
+ StubGenStubId stub_id = StubGenStubId::aescrypt_encryptBlock_id;
+ StubCodeMark mark(this, stub_id);
const Register from = c_rarg0; // source array address
const Register to = c_rarg1; // destination array address
@@ -2748,7 +2746,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_aescrypt_decryptBlock() {
assert(UseAES, "need AES cryptographic extension support");
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "aescrypt_decryptBlock");
+ StubGenStubId stub_id = StubGenStubId::aescrypt_decryptBlock_id;
+ StubCodeMark mark(this, stub_id);
Label L_doLast;
const Register from = c_rarg0; // source array address
@@ -2786,7 +2785,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_cipherBlockChaining_encryptAESCrypt() {
assert(UseAES, "need AES cryptographic extension support");
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "cipherBlockChaining_encryptAESCrypt");
+ StubGenStubId stub_id = StubGenStubId::cipherBlockChaining_encryptAESCrypt_id;
+ StubCodeMark mark(this, stub_id);
Label L_loadkeys_44, L_loadkeys_52, L_aes_loop, L_rounds_44, L_rounds_52;
@@ -2890,7 +2890,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_cipherBlockChaining_decryptAESCrypt() {
assert(UseAES, "need AES cryptographic extension support");
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "cipherBlockChaining_decryptAESCrypt");
+ StubGenStubId stub_id = StubGenStubId::cipherBlockChaining_decryptAESCrypt_id;
+ StubCodeMark mark(this, stub_id);
Label L_loadkeys_44, L_loadkeys_52, L_aes_loop, L_rounds_44, L_rounds_52;
@@ -3076,7 +3077,8 @@ class StubGenerator: public StubCodeGenerator {
// Wide bulk encryption of whole blocks.
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "counterMode_AESCrypt");
+ StubGenStubId stub_id = StubGenStubId::counterMode_AESCrypt_id;
+ StubCodeMark mark(this, stub_id);
const address start = __ pc();
__ enter();
@@ -3285,7 +3287,8 @@ class StubGenerator: public StubCodeGenerator {
__ emit_int64(0x87);
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "galoisCounterMode_AESCrypt");
+ StubGenStubId stub_id = StubGenStubId::galoisCounterMode_AESCrypt_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ enter();
@@ -3494,9 +3497,21 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg2 - int offset
// c_rarg3 - int limit
//
- address generate_md5_implCompress(bool multi_block, const char *name) {
+ address generate_md5_implCompress(StubGenStubId stub_id) {
+ bool multi_block;
+ switch (stub_id) {
+ case md5_implCompress_id:
+ multi_block = false;
+ break;
+ case md5_implCompressMB_id:
+ multi_block = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register buf = c_rarg0;
@@ -3635,9 +3650,22 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg2 - int offset
// c_rarg3 - int limit
//
- address generate_sha1_implCompress(bool multi_block, const char *name) {
+ address generate_sha1_implCompress(StubGenStubId stub_id) {
+ bool multi_block;
+ switch (stub_id) {
+ case sha1_implCompress_id:
+ multi_block = false;
+ break;
+ case sha1_implCompressMB_id:
+ multi_block = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register buf = c_rarg0;
@@ -3727,7 +3755,19 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg2 - int offset
// c_rarg3 - int limit
//
- address generate_sha256_implCompress(bool multi_block, const char *name) {
+ address generate_sha256_implCompress(StubGenStubId stub_id) {
+ bool multi_block;
+ switch (stub_id) {
+ case sha256_implCompress_id:
+ multi_block = false;
+ break;
+ case sha256_implCompressMB_id:
+ multi_block = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
static const uint32_t round_consts[64] = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
@@ -3746,8 +3786,10 @@ class StubGenerator: public StubCodeGenerator {
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
};
+
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register buf = c_rarg0;
@@ -3869,7 +3911,19 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg2 - int offset
// c_rarg3 - int limit
//
- address generate_sha512_implCompress(bool multi_block, const char *name) {
+ address generate_sha512_implCompress(StubGenStubId stub_id) {
+ bool multi_block;
+ switch (stub_id) {
+ case sha512_implCompress_id:
+ multi_block = false;
+ break;
+ case sha512_implCompressMB_id:
+ multi_block = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
static const uint64_t round_consts[80] = {
0x428A2F98D728AE22L, 0x7137449123EF65CDL, 0xB5C0FBCFEC4D3B2FL,
0xE9B5DBA58189DBBCL, 0x3956C25BF348B538L, 0x59F111F1B605D019L,
@@ -3901,7 +3955,8 @@ class StubGenerator: public StubCodeGenerator {
};
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register buf = c_rarg0;
@@ -4008,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:
@@ -4017,7 +4161,19 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg3 - int offset
// c_rarg4 - int limit
//
- address generate_sha3_implCompress(bool multi_block, const char *name) {
+ 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,
@@ -4030,7 +4186,8 @@ class StubGenerator: public StubCodeGenerator {
};
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register buf = c_rarg0;
@@ -4099,7 +4256,7 @@ class StubGenerator: public StubCodeGenerator {
__ cbzw(c_rarg5, rounds24_loop);
__ tbnz(block_size, 5, shake128);
- // block_size == 144, bit5 == 0, SHA3-244
+ // block_size == 144, bit5 == 0, SHA3-224
__ ldrd(v28, __ post(buf, 8));
__ eor(v17, __ T8B, v17, v28);
__ b(rounds24_loop);
@@ -4128,82 +4285,7 @@ class StubGenerator: public StubCodeGenerator {
__ BIND(rounds24_loop);
__ subw(rscratch2, rscratch2, 1);
- __ 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);
+ keccak_round(rscratch1);
__ cbnzw(rscratch2, rounds24_loop);
@@ -4222,6 +4304,7 @@ class StubGenerator: public StubCodeGenerator {
__ 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));
@@ -4232,6 +4315,96 @@ class StubGenerator: public StubCodeGenerator {
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;
+ }
+
/**
* Arguments:
*
@@ -4247,7 +4420,8 @@ class StubGenerator: public StubCodeGenerator {
assert(UseCRC32Intrinsics, "what are we doing here?");
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "updateBytesCRC32");
+ StubGenStubId stub_id = StubGenStubId::updateBytesCRC32_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -4272,124 +4446,195 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
- // ChaCha20 block function. This version parallelizes by loading
- // individual 32-bit state elements into vectors for four blocks
- // (e.g. all four blocks' worth of state[0] in one register, etc.)
+ // 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[1024]) = c_rarg1
+ // keystream (byte[256]) = c_rarg1
// return - number of bytes of keystream (always 256)
- address generate_chacha20Block_blockpar() {
- Label L_twoRounds, L_cc20_const;
+ //
+ // 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 FloatRegisters. The first 128 bits are a counter add overlay
- // that adds +0/+1/+2/+3 to the vector holding replicated state[12].
+ // 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.
- __ BIND(L_cc20_const);
- __ emit_int64(0x0000000100000000UL);
- __ emit_int64(0x0000000300000002UL);
+ // 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);
- StubCodeMark mark(this, "StubRoutines", "chacha20Block");
+ 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 stateFirst = v0;
- const FloatRegister stateSecond = v1;
- const FloatRegister stateThird = v2;
- const FloatRegister stateFourth = v3;
- const FloatRegister origCtrState = v28;
- const FloatRegister scratch = v29;
+ 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;
- // 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
- };
+ // 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 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));
- }
+ // 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));
- // 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(origCtrState, lrot8Tbl, Address(tmpAddr));
- __ addv(workSt[12], __ T4S, workSt[12], origCtrState);
+ __ mov(a1Vec, __ T16B, aState);
+ __ mov(b1Vec, __ T16B, bState);
+ __ mov(c1Vec, __ T16B, cState);
+ __ mov(d1Vec, __ T16B, dState);
- // Set up the 10 iteration loop and perform all 8 quarter round ops
+ __ 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_twoRounds);
+ __ BIND(L_Q_twoRounds);
- __ cc20_quarter_round(workSt[0], workSt[4], workSt[8], workSt[12],
- scratch, lrot8Tbl);
- __ cc20_quarter_round(workSt[1], workSt[5], workSt[9], workSt[13],
- scratch, lrot8Tbl);
- __ cc20_quarter_round(workSt[2], workSt[6], workSt[10], workSt[14],
- scratch, lrot8Tbl);
- __ cc20_quarter_round(workSt[3], workSt[7], workSt[11], workSt[15],
- scratch, lrot8Tbl);
+ // 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);
- __ cc20_quarter_round(workSt[0], workSt[5], workSt[10], workSt[15],
- scratch, lrot8Tbl);
- __ cc20_quarter_round(workSt[1], workSt[6], workSt[11], workSt[12],
- scratch, lrot8Tbl);
- __ cc20_quarter_round(workSt[2], workSt[7], workSt[8], workSt[13],
- scratch, lrot8Tbl);
- __ cc20_quarter_round(workSt[3], workSt[4], workSt[9], workSt[14],
- 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_twoRounds);
+ __ cbnz(loopCtr, L_Q_twoRounds);
- __ mov(tmpAddr, state);
+ // 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);
- // 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(stateFirst, stateSecond, stateThird, stateFourth, __ T4S,
- __ post(tmpAddr, 16));
- __ addv(workSt[i], __ T4S, workSt[i], stateFirst);
- __ addv(workSt[i + 1], __ T4S, workSt[i + 1], stateSecond);
- __ addv(workSt[i + 2], __ T4S, workSt[i + 2], stateThird);
- __ addv(workSt[i + 3], __ T4S, workSt[i + 3], stateFourth);
- }
- __ addv(workSt[12], __ T4S, workSt[12], origCtrState); // Add ctr mask
+ __ 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);
- // Write to key stream, storing the same element out of workSt[0..15]
- // to consecutive 4-byte offsets in the key stream buffer, then repeating
- // for the next element position.
- 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));
- }
- }
+ __ 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();
@@ -4398,6 +4643,968 @@ class StubGenerator: public StubCodeGenerator {
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) {
+ 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) {
+ 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) {
+ 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) {
+ 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) {
+ 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) {
+ 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) {
+ 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) {
+ for (int i = 0; i < N; i++) {
+ __ notr(v[i], __ T16B, v1[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) {
+ 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) {
+ 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 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 dilithium montgomery
+ // multiply
+
+ // Perform 16 32-bit Montgomery multiplications in parallel
+ // See the montMul() method of the sun.security.provider.ML_DSA class.
+ //
+ // Computes 4x4S results
+ // a = b * c * 2^-32 mod MONT_Q
+ // Inputs: vb, vc - 4x4S vector register sequences
+ // vq - 2x4S constants
+ // Temps: vtmp - 4x4S vector sequence trashed after call
+ // Outputs: va - 4x4S 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
+ // n.b. MONT_R_BITS is 32, so the right shift by it is implicit.
+ void dilithium_montmul16(const VSeq<4>& va, const VSeq<4>& vb, const VSeq<4>& vc,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ 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");
+
+ // schedule 4 streams of instructions across the vector sequences
+ for (int i = 0; i < 4; i++) {
+ __ sqdmulh(vtmp[i], __ T4S, vb[i], vc[i]); // aHigh = hi32(2 * b * c)
+ __ mulv(va[i], __ T4S, vb[i], vc[i]); // aLow = lo32(b * c)
+ }
+
+ for (int i = 0; i < 4; i++) {
+ __ mulv(va[i], __ T4S, va[i], vq[0]); // m = aLow * qinv
+ }
+
+ for (int i = 0; i < 4; i++) {
+ __ sqdmulh(va[i], __ T4S, va[i], vq[1]); // n = hi32(2 * m * q)
+ }
+
+ for (int i = 0; i < 4; i++) {
+ __ shsubv(va[i], __ T4S, vtmp[i], va[i]); // a = (aHigh - n) / 2
+ }
+ }
+
+ // Perform 2x16 32-bit Montgomery multiplications in parallel
+ // See the montMul() method of the sun.security.provider.ML_DSA class.
+ //
+ // Computes 8x4S results
+ // a = b * c * 2^-32 mod MONT_Q
+ // Inputs: vb, vc - 8x4S vector register sequences
+ // vq - 2x4S constants
+ // Temps: vtmp - 4x4S vector sequence trashed after call
+ // Outputs: va - 8x4S 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
+ // n.b. MONT_R_BITS is 32, so the right shift by it is implicit.
+ void vs_montmul32(const VSeq<8>& va, const VSeq<8>& vb, const VSeq<8>& vc,
+ const VSeq<4>& vtmp, const VSeq<2>& vq) {
+ // 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 need to multiply the front and back halves of each sequence
+ // 4x4S 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
+
+ dilithium_montmul16(vs_front(va), vs_front(vb), vs_front(vc), vtmp, vq);
+ dilithium_montmul16(vs_back(va), vs_back(vb), vs_back(vc), 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
+ vs_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
+ vs_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
+ vs_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;
+ }
+ }
+
+ // 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
+ // level0
+
+ // 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
+ vs_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();
+
+ Label L_loop;
+
+ const Register result = c_rarg0;
+ const Register poly1 = c_rarg1;
+ const Register poly2 = c_rarg2;
+
+ const Register dilithiumConsts = r10;
+ const Register len = 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
+ VSeq<8> vrsquare(29, 0); // for montmul by constant RSQUARE
+
+ __ lea(dilithiumConsts, ExternalAddress((address) StubRoutines::aarch64::_dilithiumConsts));
+
+ // load constants q, qinv
+ vs_ldpq(vq, dilithiumConsts); // qInv, q
+ // load constant rSquare into v29
+ __ ldr(v29, __ Q, Address(dilithiumConsts, 48)); // rSquare
+
+ __ mov(len, zr);
+ __ add(len, len, 1024);
+
+ __ BIND(L_loop);
+
+ // 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
+ vs_montmul32(vs2, vs1, vs2, vtmp, vq);
+ // compute a = rsquare montmul a
+ vs_montmul32(vs2, vrsquare, vs2, vtmp, vq);
+ // save a 32 (8x4S) 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 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() {
+
+ __ align(CodeEntryAlignment);
+ StubGenStubId stub_id = StubGenStubId::dilithiumMontMulByConstant_id;
+ StubCodeMark mark(this, stub_id);
+ address start = __ pc();
+ __ enter();
+
+ Label L_loop;
+
+ const Register coeffs = c_rarg0;
+ const Register constant = c_rarg1;
+
+ const Register dilithiumConsts = r10;
+ const Register result = r11;
+ const Register len = r12;
+
+ 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
+
+ // results track inputs
+ __ add(result, coeffs, 0);
+ __ lea(dilithiumConsts, ExternalAddress((address) StubRoutines::aarch64::_dilithiumConsts));
+
+ // 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);
+
+ __ BIND(L_loop);
+
+ // load next 32 inputs
+ vs_ldpq_post(vs2, coeffs);
+ // mont mul by constant
+ vs_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;
+
+ VSeq<4> vs1(0), vs2(4), vs3(8); // 6 independent sets of 4x4s values
+ VSeq<4> vs4(12), vs5(16), vtmp(20);
+ VSeq<4> one(25, 0); // 7 constants for cross-multiplying
+ 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;
+
+ }
+
/**
* Arguments:
*
@@ -4414,7 +5621,8 @@ class StubGenerator: public StubCodeGenerator {
assert(UseCRC32CIntrinsics, "what are we doing here?");
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "updateBytesCRC32C");
+ StubGenStubId stub_id = StubGenStubId::updateBytesCRC32C_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -4452,7 +5660,8 @@ class StubGenerator: public StubCodeGenerator {
*/
address generate_updateBytesAdler32() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "updateBytesAdler32");
+ StubGenStubId stub_id = StubGenStubId::updateBytesAdler32_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Label L_simple_by1_loop, L_nmax, L_nmax_loop, L_by16, L_by16_loop, L_by1_loop, L_do_mod, L_combine, L_by1;
@@ -4673,7 +5882,8 @@ class StubGenerator: public StubCodeGenerator {
*/
address generate_multiplyToLen() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "multiplyToLen");
+ StubGenStubId stub_id = StubGenStubId::multiplyToLen_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Register x = r0;
@@ -4705,7 +5915,8 @@ class StubGenerator: public StubCodeGenerator {
// faster than multiply_to_len on some CPUs and slower on others, but
// multiply_to_len shows a bit better overall results
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "squareToLen");
+ StubGenStubId stub_id = StubGenStubId::squareToLen_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Register x = r0;
@@ -4738,7 +5949,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_mulAdd() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "mulAdd");
+ StubGenStubId stub_id = StubGenStubId::mulAdd_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -4768,7 +5980,8 @@ class StubGenerator: public StubCodeGenerator {
//
address generate_bigIntegerRightShift() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "bigIntegerRightShiftWorker");
+ StubGenStubId stub_id = StubGenStubId::bigIntegerRightShiftWorker_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Label ShiftSIMDLoop, ShiftTwoLoop, ShiftThree, ShiftTwo, ShiftOne, Exit;
@@ -4890,7 +6103,8 @@ class StubGenerator: public StubCodeGenerator {
//
address generate_bigIntegerLeftShift() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "bigIntegerLeftShiftWorker");
+ StubGenStubId stub_id = StubGenStubId::bigIntegerLeftShiftWorker_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Label ShiftSIMDLoop, ShiftTwoLoop, ShiftThree, ShiftTwo, ShiftOne, Exit;
@@ -4998,7 +6212,8 @@ class StubGenerator: public StubCodeGenerator {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "count_positives");
+ StubGenStubId stub_id = StubGenStubId::count_positives_id;
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
@@ -5259,7 +6474,8 @@ class StubGenerator: public StubCodeGenerator {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "large_array_equals");
+ StubGenStubId stub_id = StubGenStubId::large_array_equals_id;
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
__ enter();
@@ -5384,29 +6600,29 @@ class StubGenerator: public StubCodeGenerator {
__ align(CodeEntryAlignment);
- const char *mark_name = "";
+ StubGenStubId stub_id;
switch (eltype) {
case T_BOOLEAN:
- mark_name = "_large_arrays_hashcode_boolean";
+ stub_id = StubGenStubId::large_arrays_hashcode_boolean_id;
break;
case T_BYTE:
- mark_name = "_large_arrays_hashcode_byte";
+ stub_id = StubGenStubId::large_arrays_hashcode_byte_id;
break;
case T_CHAR:
- mark_name = "_large_arrays_hashcode_char";
+ stub_id = StubGenStubId::large_arrays_hashcode_char_id;
break;
case T_SHORT:
- mark_name = "_large_arrays_hashcode_short";
+ stub_id = StubGenStubId::large_arrays_hashcode_short_id;
break;
case T_INT:
- mark_name = "_large_arrays_hashcode_int";
+ stub_id = StubGenStubId::large_arrays_hashcode_int_id;
break;
default:
- mark_name = "_large_arrays_hashcode_incorrect_type";
- __ should_not_reach_here();
+ stub_id = StubGenStubId::NO_STUBID;
+ ShouldNotReachHere();
};
- StubCodeMark mark(this, "StubRoutines", mark_name);
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
__ enter();
@@ -5639,7 +6855,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_dsin_dcos(bool isCos) {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", isCos ? "libmDcos" : "libmDsin");
+ StubGenStubId stub_id = (isCos ? StubGenStubId::dcos_id : StubGenStubId::dsin_id);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ generate_dsin_dcos(isCos, (address)StubRoutines::aarch64::_npio2_hw,
(address)StubRoutines::aarch64::_two_over_pi,
@@ -5690,9 +6907,8 @@ class StubGenerator: public StubCodeGenerator {
// r11 = tmp2
address generate_compare_long_string_different_encoding(bool isLU) {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", isLU
- ? "compare_long_string_different_encoding LU"
- : "compare_long_string_different_encoding UL");
+ StubGenStubId stub_id = (isLU ? StubGenStubId::compare_long_string_LU_id : StubGenStubId::compare_long_string_UL_id);
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
Label SMALL_LOOP, TAIL, TAIL_LOAD_16, LOAD_LAST, DIFF1, DIFF2,
DONE, CALCULATE_DIFFERENCE, LARGE_LOOP_PREFETCH, NO_PREFETCH,
@@ -5801,7 +7017,8 @@ class StubGenerator: public StubCodeGenerator {
// v1 = temporary float register
address generate_float16ToFloat() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "float16ToFloat");
+ StubGenStubId stub_id = StubGenStubId::hf2f_id;
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
BLOCK_COMMENT("Entry:");
__ flt16_to_flt(v0, r0, v1);
@@ -5814,7 +7031,8 @@ class StubGenerator: public StubCodeGenerator {
// v1 = temporary float register
address generate_floatToFloat16() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "floatToFloat16");
+ StubGenStubId stub_id = StubGenStubId::f2hf_id;
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
BLOCK_COMMENT("Entry:");
__ flt_to_flt16(r0, v0, v1);
@@ -5824,7 +7042,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_method_entry_barrier() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "nmethod_entry_barrier");
+ StubGenStubId stub_id = StubGenStubId::method_entry_barrier_id;
+ StubCodeMark mark(this, stub_id);
Label deoptimize_label;
@@ -5889,9 +7108,8 @@ class StubGenerator: public StubCodeGenerator {
// r11 = tmp2
address generate_compare_long_string_same_encoding(bool isLL) {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", isLL
- ? "compare_long_string_same_encoding LL"
- : "compare_long_string_same_encoding UU");
+ StubGenStubId stub_id = (isLL ? StubGenStubId::compare_long_string_LL_id : StubGenStubId::compare_long_string_UU_id);
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
Register result = r0, str1 = r1, cnt1 = r2, str2 = r3, cnt2 = r4,
tmp1 = r10, tmp2 = r11, tmp1h = rscratch1, tmp2h = rscratch2;
@@ -6021,6 +7239,15 @@ class StubGenerator: public StubCodeGenerator {
// p0 = pgtmp1
// p1 = pgtmp2
address generate_compare_long_string_sve(string_compare_mode mode) {
+ StubGenStubId stub_id;
+ switch (mode) {
+ case LL: stub_id = StubGenStubId::compare_long_string_LL_id; break;
+ case LU: stub_id = StubGenStubId::compare_long_string_LU_id; break;
+ case UL: stub_id = StubGenStubId::compare_long_string_UL_id; break;
+ case UU: stub_id = StubGenStubId::compare_long_string_UU_id; break;
+ default: ShouldNotReachHere();
+ }
+
__ align(CodeEntryAlignment);
address entry = __ pc();
Register result = r0, str1 = r1, cnt1 = r2, str2 = r3, cnt2 = r4,
@@ -6056,16 +7283,7 @@ class StubGenerator: public StubCodeGenerator {
ShouldNotReachHere(); \
}
- const char* stubname;
- switch (mode) {
- case LL: stubname = "compare_long_string_same_encoding LL"; break;
- case LU: stubname = "compare_long_string_different_encoding LU"; break;
- case UL: stubname = "compare_long_string_different_encoding UL"; break;
- case UU: stubname = "compare_long_string_same_encoding UU"; break;
- default: ShouldNotReachHere();
- }
-
- StubCodeMark mark(this, "StubRoutines", stubname);
+ StubCodeMark mark(this, stub_id);
__ mov(idx, 0);
__ sve_whilelt(pgtmp1, mode == LL ? __ B : __ H, idx, cnt);
@@ -6157,11 +7375,22 @@ class StubGenerator: public StubCodeGenerator {
// larger and a bit less readable, however, most of extra operations are
// issued during loads or branches, so, penalty is minimal
address generate_string_indexof_linear(bool str1_isL, bool str2_isL) {
- const char* stubName = str1_isL
- ? (str2_isL ? "indexof_linear_ll" : "indexof_linear_ul")
- : "indexof_linear_uu";
+ StubGenStubId stub_id;
+ if (str1_isL) {
+ if (str2_isL) {
+ stub_id = StubGenStubId::string_indexof_linear_ll_id;
+ } else {
+ stub_id = StubGenStubId::string_indexof_linear_ul_id;
+ }
+ } else {
+ if (str2_isL) {
+ ShouldNotReachHere();
+ } else {
+ stub_id = StubGenStubId::string_indexof_linear_uu_id;
+ }
+ }
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", stubName);
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
int str1_chr_size = str1_isL ? 1 : 2;
@@ -6459,7 +7688,8 @@ class StubGenerator: public StubCodeGenerator {
// Clobbers: r0, r1, r3, rscratch1, rflags, v0-v6
address generate_large_byte_array_inflate() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "large_byte_array_inflate");
+ StubGenStubId stub_id = StubGenStubId::large_byte_array_inflate_id;
+ StubCodeMark mark(this, stub_id);
address entry = __ pc();
Label LOOP, LOOP_START, LOOP_PRFM, LOOP_PRFM_START, DONE;
Register src = r0, dst = r1, len = r2, octetCounter = r3;
@@ -6524,7 +7754,8 @@ class StubGenerator: public StubCodeGenerator {
// that) and keep the data in little-endian bit order through the
// calculation, bit-reversing the inputs and outputs.
- StubCodeMark mark(this, "StubRoutines", "ghash_processBlocks");
+ StubGenStubId stub_id = StubGenStubId::ghash_processBlocks_id;
+ StubCodeMark mark(this, stub_id);
__ align(wordSize * 2);
address p = __ pc();
__ emit_int64(0x87); // The low-order bits of the field
@@ -6590,7 +7821,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_ghash_processBlocks_wide() {
address small = generate_ghash_processBlocks();
- StubCodeMark mark(this, "StubRoutines", "ghash_processBlocks_wide");
+ StubGenStubId stub_id = StubGenStubId::ghash_processBlocks_wide_id;
+ StubCodeMark mark(this, stub_id);
__ align(wordSize * 2);
address p = __ pc();
__ emit_int64(0x87); // The low-order bits of the field
@@ -6701,7 +7933,8 @@ class StubGenerator: public StubCodeGenerator {
};
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "encodeBlock");
+ StubGenStubId stub_id = StubGenStubId::base64_encodeBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register src = c_rarg0; // source array
@@ -6969,7 +8202,8 @@ class StubGenerator: public StubCodeGenerator {
};
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "decodeBlock");
+ StubGenStubId stub_id = StubGenStubId::base64_decodeBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register src = c_rarg0; // source array
@@ -7085,7 +8319,8 @@ class StubGenerator: public StubCodeGenerator {
// Support for spin waits.
address generate_spin_wait() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "spin_wait");
+ StubGenStubId stub_id = StubGenStubId::spin_wait_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ spin_wait();
@@ -7094,10 +8329,10 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
- address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
- StubCodeMark mark(this, "StubRoutines", "lookup_secondary_supers_table");
+ void generate_lookup_secondary_supers_table_stub() {
+ StubGenStubId stub_id = StubGenStubId::lookup_secondary_supers_table_id;
+ StubCodeMark mark(this, stub_id);
- address start = __ pc();
const Register
r_super_klass = r0,
r_array_base = r1,
@@ -7109,21 +8344,23 @@ class StubGenerator: public StubCodeGenerator {
const FloatRegister
vtemp = v0;
- Label L_success;
- __ enter();
- __ lookup_secondary_supers_table_const(r_sub_klass, r_super_klass,
- r_array_base, r_array_length, r_array_index,
- vtemp, result, super_klass_index,
- /*stub_is_near*/true);
- __ leave();
- __ ret(lr);
-
- return start;
+ for (int slot = 0; slot < Klass::SECONDARY_SUPERS_TABLE_SIZE; slot++) {
+ StubRoutines::_lookup_secondary_supers_table_stubs[slot] = __ pc();
+ Label L_success;
+ __ enter();
+ __ lookup_secondary_supers_table_const(r_sub_klass, r_super_klass,
+ r_array_base, r_array_length, r_array_index,
+ vtemp, result, slot,
+ /*stub_is_near*/true);
+ __ leave();
+ __ ret(lr);
+ }
}
// Slow path implementation for UseSecondarySupersTable.
address generate_lookup_secondary_supers_table_slow_path_stub() {
- StubCodeMark mark(this, "StubRoutines", "lookup_secondary_supers_table_slow_path");
+ StubGenStubId stub_id = StubGenStubId::lookup_secondary_supers_table_slow_path_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Register
@@ -7276,9 +8513,9 @@ class StubGenerator: public StubCodeGenerator {
if (! UseLSE) {
return;
}
-
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "atomic entry points");
+ StubGenStubId stub_id = StubGenStubId::atomic_entry_points_id;
+ StubCodeMark mark(this, stub_id);
address first_entry = __ pc();
// ADD, memory_order_conservative
@@ -7437,7 +8674,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_cont_thaw() {
if (!Continuations::enabled()) return nullptr;
- StubCodeMark mark(this, "StubRoutines", "Cont thaw");
+ StubGenStubId stub_id = StubGenStubId::cont_thaw_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
generate_cont_thaw(Continuation::thaw_top);
return start;
@@ -7447,7 +8685,8 @@ class StubGenerator: public StubCodeGenerator {
if (!Continuations::enabled()) return nullptr;
// TODO: will probably need multiple return barriers depending on return type
- StubCodeMark mark(this, "StubRoutines", "cont return barrier");
+ StubGenStubId stub_id = StubGenStubId::cont_returnBarrier_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
generate_cont_thaw(Continuation::thaw_return_barrier);
@@ -7458,7 +8697,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_cont_returnBarrier_exception() {
if (!Continuations::enabled()) return nullptr;
- StubCodeMark mark(this, "StubRoutines", "cont return barrier exception handler");
+ StubGenStubId stub_id = StubGenStubId::cont_returnBarrierExc_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
generate_cont_thaw(Continuation::thaw_return_barrier_exception);
@@ -7468,7 +8708,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_cont_preempt_stub() {
if (!Continuations::enabled()) return nullptr;
- StubCodeMark mark(this, "StubRoutines","Continuation preempt stub");
+ StubGenStubId stub_id = StubGenStubId::cont_preempt_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ reset_last_Java_frame(true);
@@ -7550,7 +8791,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_poly1305_processBlocks() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "poly1305_processBlocks");
+ StubGenStubId stub_id = StubGenStubId::poly1305_processBlocks_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Label here;
__ enter();
@@ -7664,7 +8906,8 @@ class StubGenerator: public StubCodeGenerator {
// exception handler for upcall stubs
address generate_upcall_stub_exception_handler() {
- StubCodeMark mark(this, "StubRoutines", "upcall stub exception handler");
+ StubGenStubId stub_id = StubGenStubId::upcall_stub_exception_handler_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// Native caller has no idea how to handle exceptions,
@@ -7681,7 +8924,8 @@ class StubGenerator: public StubCodeGenerator {
// j_rarg0 = jobject receiver
// rmethod = result
address generate_upcall_stub_load_target() {
- StubCodeMark mark(this, "StubRoutines", "upcall_stub_load_target");
+ StubGenStubId stub_id = StubGenStubId::upcall_stub_load_target_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ resolve_global_jobject(j_rarg0, rscratch1, rscratch2);
@@ -8663,16 +9907,12 @@ 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();
- if (UsePoly1305Intrinsics) {
- StubRoutines::_poly1305_processBlocks = generate_poly1305_processBlocks();
- }
+ StubRoutines::_upcall_stub_exception_handler = generate_upcall_stub_exception_handler();
+ StubRoutines::_upcall_stub_load_target = generate_upcall_stub_load_target();
#if defined (LINUX) && !defined (__ARM_FEATURE_ATOMICS)
@@ -8684,17 +9924,11 @@ class StubGenerator: public StubCodeGenerator {
if (UseSecondarySupersTable) {
StubRoutines::_lookup_secondary_supers_table_slow_path_stub = generate_lookup_secondary_supers_table_slow_path_stub();
if (! InlineSecondarySupersTest) {
- for (int slot = 0; slot < Klass::SECONDARY_SUPERS_TABLE_SIZE; slot++) {
- StubRoutines::_lookup_secondary_supers_table_stubs[slot]
- = generate_lookup_secondary_supers_table_stub(slot);
- }
+ generate_lookup_secondary_supers_table_stub();
}
}
#endif
- StubRoutines::_upcall_stub_exception_handler = generate_upcall_stub_exception_handler();
- StubRoutines::_upcall_stub_load_target = generate_upcall_stub_load_target();
-
StubRoutines::aarch64::set_completed(); // Inidicate that arraycopy and zero_blocks stubs are generated
}
@@ -8702,7 +9936,7 @@ class StubGenerator: public StubCodeGenerator {
#if COMPILER2_OR_JVMCI
if (UseSVE == 0) {
- StubRoutines::aarch64::_vector_iota_indices = generate_iota_indices("iota_indices");
+ StubRoutines::aarch64::_vector_iota_indices = generate_iota_indices(StubGenStubId::vector_iota_indices_id);
}
// array equals stub for large arrays.
@@ -8746,13 +9980,15 @@ class StubGenerator: public StubCodeGenerator {
}
if (UseMontgomeryMultiplyIntrinsic) {
- StubCodeMark mark(this, "StubRoutines", "montgomeryMultiply");
+ StubGenStubId stub_id = StubGenStubId::montgomeryMultiply_id;
+ StubCodeMark mark(this, stub_id);
MontgomeryMultiplyGenerator g(_masm, /*squaring*/false);
StubRoutines::_montgomeryMultiply = g.generate_multiply();
}
if (UseMontgomerySquareIntrinsic) {
- StubCodeMark mark(this, "StubRoutines", "montgomerySquare");
+ StubGenStubId stub_id = StubGenStubId::montgomerySquare_id;
+ StubCodeMark mark(this, stub_id);
MontgomeryMultiplyGenerator g(_masm, /*squaring*/true);
// We use generate_multiply() rather than generate_square()
// because it's faster for the sizes of modulus we care about.
@@ -8764,7 +10000,15 @@ class StubGenerator: public StubCodeGenerator {
#endif // COMPILER2
if (UseChaCha20Intrinsics) {
- StubRoutines::_chacha20Block = generate_chacha20Block_blockpar();
+ StubRoutines::_chacha20Block = generate_chacha20Block_qrpar();
+ }
+
+ if (UseDilithiumIntrinsics) {
+ StubRoutines::_dilithiumAlmostNtt = generate_dilithiumAlmostNtt();
+ StubRoutines::_dilithiumAlmostInverseNtt = generate_dilithiumAlmostInverseNtt();
+ StubRoutines::_dilithiumNttMult = generate_dilithiumNttMult();
+ StubRoutines::_dilithiumMontMulByConstant = generate_dilithiumMontMulByConstant();
+ StubRoutines::_dilithiumDecomposePoly = generate_dilithiumDecomposePoly();
}
if (UseBASE64Intrinsics) {
@@ -8792,24 +10036,29 @@ class StubGenerator: public StubCodeGenerator {
}
if (UseMD5Intrinsics) {
- StubRoutines::_md5_implCompress = generate_md5_implCompress(false, "md5_implCompress");
- StubRoutines::_md5_implCompressMB = generate_md5_implCompress(true, "md5_implCompressMB");
+ StubRoutines::_md5_implCompress = generate_md5_implCompress(StubGenStubId::md5_implCompress_id);
+ StubRoutines::_md5_implCompressMB = generate_md5_implCompress(StubGenStubId::md5_implCompressMB_id);
}
if (UseSHA1Intrinsics) {
- StubRoutines::_sha1_implCompress = generate_sha1_implCompress(false, "sha1_implCompress");
- StubRoutines::_sha1_implCompressMB = generate_sha1_implCompress(true, "sha1_implCompressMB");
+ StubRoutines::_sha1_implCompress = generate_sha1_implCompress(StubGenStubId::sha1_implCompress_id);
+ StubRoutines::_sha1_implCompressMB = generate_sha1_implCompress(StubGenStubId::sha1_implCompressMB_id);
}
if (UseSHA256Intrinsics) {
- StubRoutines::_sha256_implCompress = generate_sha256_implCompress(false, "sha256_implCompress");
- StubRoutines::_sha256_implCompressMB = generate_sha256_implCompress(true, "sha256_implCompressMB");
+ StubRoutines::_sha256_implCompress = generate_sha256_implCompress(StubGenStubId::sha256_implCompress_id);
+ StubRoutines::_sha256_implCompressMB = generate_sha256_implCompress(StubGenStubId::sha256_implCompressMB_id);
}
if (UseSHA512Intrinsics) {
- StubRoutines::_sha512_implCompress = generate_sha512_implCompress(false, "sha512_implCompress");
- StubRoutines::_sha512_implCompressMB = generate_sha512_implCompress(true, "sha512_implCompressMB");
+ StubRoutines::_sha512_implCompress = generate_sha512_implCompress(StubGenStubId::sha512_implCompress_id);
+ StubRoutines::_sha512_implCompressMB = generate_sha512_implCompress(StubGenStubId::sha512_implCompressMB_id);
}
if (UseSHA3Intrinsics) {
- StubRoutines::_sha3_implCompress = generate_sha3_implCompress(false, "sha3_implCompress");
- StubRoutines::_sha3_implCompressMB = generate_sha3_implCompress(true, "sha3_implCompressMB");
+ 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);
+ }
+
+ if (UsePoly1305Intrinsics) {
+ StubRoutines::_poly1305_processBlocks = generate_poly1305_processBlocks();
}
// generate Adler32 intrinsics code
@@ -8821,29 +10070,29 @@ class StubGenerator: public StubCodeGenerator {
}
public:
- StubGenerator(CodeBuffer* code, StubsKind kind) : StubCodeGenerator(code) {
- switch(kind) {
- case Initial_stubs:
+ StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
+ switch(blob_id) {
+ case initial_id:
generate_initial_stubs();
break;
- case Continuation_stubs:
+ case continuation_id:
generate_continuation_stubs();
break;
- case Compiler_stubs:
+ case compiler_id:
generate_compiler_stubs();
break;
- case Final_stubs:
+ case final_id:
generate_final_stubs();
break;
default:
- fatal("unexpected stubs kind: %d", kind);
+ fatal("unexpected blob id: %d", blob_id);
break;
};
}
}; // end class declaration
-void StubGenerator_generate(CodeBuffer* code, StubCodeGenerator::StubsKind kind) {
- StubGenerator g(code, kind);
+void StubGenerator_generate(CodeBuffer* code, StubGenBlobId blob_id) {
+ StubGenerator g(code, blob_id);
}
diff --git a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
index dee615df5a5..536583ff40c 100644
--- a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
@@ -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.
*
@@ -23,50 +23,40 @@
*
*/
-#include "precompiled.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/javaThread.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/globalDefinitions.hpp"
-// Implementation of the platform-specific part of StubRoutines - for
-// a description of how to extend it, see the stubRoutines.hpp file.
-
-address StubRoutines::aarch64::_get_previous_sp_entry = nullptr;
-
-address StubRoutines::aarch64::_f2i_fixup = nullptr;
-address StubRoutines::aarch64::_f2l_fixup = nullptr;
-address StubRoutines::aarch64::_d2i_fixup = nullptr;
-address StubRoutines::aarch64::_d2l_fixup = nullptr;
-address StubRoutines::aarch64::_vector_iota_indices = nullptr;
-address StubRoutines::aarch64::_float_sign_mask = nullptr;
-address StubRoutines::aarch64::_float_sign_flip = nullptr;
-address StubRoutines::aarch64::_double_sign_mask = nullptr;
-address StubRoutines::aarch64::_double_sign_flip = nullptr;
-address StubRoutines::aarch64::_zero_blocks = nullptr;
-address StubRoutines::aarch64::_count_positives = nullptr;
-address StubRoutines::aarch64::_count_positives_long = nullptr;
-address StubRoutines::aarch64::_large_array_equals = nullptr;
-address StubRoutines::aarch64::_large_arrays_hashcode_boolean = nullptr;
-address StubRoutines::aarch64::_large_arrays_hashcode_byte = nullptr;
-address StubRoutines::aarch64::_large_arrays_hashcode_char = nullptr;
-address StubRoutines::aarch64::_large_arrays_hashcode_int = nullptr;
-address StubRoutines::aarch64::_large_arrays_hashcode_short = nullptr;
-address StubRoutines::aarch64::_compare_long_string_LL = nullptr;
-address StubRoutines::aarch64::_compare_long_string_UU = nullptr;
-address StubRoutines::aarch64::_compare_long_string_LU = nullptr;
-address StubRoutines::aarch64::_compare_long_string_UL = nullptr;
-address StubRoutines::aarch64::_string_indexof_linear_ll = nullptr;
-address StubRoutines::aarch64::_string_indexof_linear_uu = nullptr;
-address StubRoutines::aarch64::_string_indexof_linear_ul = nullptr;
-address StubRoutines::aarch64::_large_byte_array_inflate = nullptr;
+// function used as default for spin_wait stub
static void empty_spin_wait() { }
-address StubRoutines::aarch64::_spin_wait = CAST_FROM_FN_PTR(address, empty_spin_wait);
+
+// define fields for arch-specific entries
+
+#define DEFINE_ARCH_ENTRY(arch, blob_name, stub_name, field_name, getter_name) \
+ address StubRoutines:: arch :: STUB_FIELD_NAME(field_name) = nullptr;
+
+#define DEFINE_ARCH_ENTRY_INIT(arch, blob_name, stub_name, field_name, getter_name, init_function) \
+ address StubRoutines:: arch :: STUB_FIELD_NAME(field_name) = CAST_FROM_FN_PTR(address, init_function);
+
+STUBGEN_ARCH_ENTRIES_DO(DEFINE_ARCH_ENTRY, DEFINE_ARCH_ENTRY_INIT)
+
+#undef DEFINE_ARCH_ENTRY_INIT
+#undef DEFINE_ARCH_ENTRY
bool StubRoutines::aarch64::_completed = false;
+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 7d3b72a8836..857bb2ff10a 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.
*
@@ -34,134 +34,66 @@ static bool returns_to_call_stub(address return_pc) {
return return_pc == _call_stub_return_address;
}
+// emit enum used to size per-blob code buffers
+
+#define DEFINE_BLOB_SIZE(blob_name, size) \
+ _ ## blob_name ## _code_size = size,
+
enum platform_dependent_constants {
- // simply increase sizes if too small (assembler will crash if too small)
- _initial_stubs_code_size = 10000,
- _continuation_stubs_code_size = 2000,
- _compiler_stubs_code_size = 30000 ZGC_ONLY(+10000),
- _final_stubs_code_size = 20000 ZGC_ONLY(+100000)
+ STUBGEN_ARCH_BLOBS_DO(DEFINE_BLOB_SIZE)
};
+#undef DEFINE_BLOB_SIZE
+
class aarch64 {
friend class StubGenerator;
+#if INCLUDE_JVMCI
+ friend class JVMCIVMStructs;
+#endif
- private:
- static address _get_previous_sp_entry;
+ // declare fields for arch-specific entries
- static address _f2i_fixup;
- static address _f2l_fixup;
- static address _d2i_fixup;
- static address _d2l_fixup;
+#define DECLARE_ARCH_ENTRY(arch, blob_name, stub_name, field_name, getter_name) \
+ static address STUB_FIELD_NAME(field_name) ;
- static address _vector_iota_indices;
- static address _float_sign_mask;
- static address _float_sign_flip;
- static address _double_sign_mask;
- static address _double_sign_flip;
+#define DECLARE_ARCH_ENTRY_INIT(arch, blob_name, stub_name, field_name, getter_name, init_function) \
+ DECLARE_ARCH_ENTRY(arch, blob_name, stub_name, field_name, getter_name)
- static address _zero_blocks;
+private:
+ STUBGEN_ARCH_ENTRIES_DO(DECLARE_ARCH_ENTRY, DECLARE_ARCH_ENTRY_INIT)
- static address _large_array_equals;
- static address _large_arrays_hashcode_boolean;
- static address _large_arrays_hashcode_byte;
- static address _large_arrays_hashcode_char;
- static address _large_arrays_hashcode_int;
- static address _large_arrays_hashcode_short;
- static address _compare_long_string_LL;
- static address _compare_long_string_LU;
- static address _compare_long_string_UL;
- static address _compare_long_string_UU;
- static address _string_indexof_linear_ll;
- static address _string_indexof_linear_uu;
- static address _string_indexof_linear_ul;
- static address _large_byte_array_inflate;
-
- static address _spin_wait;
+#undef DECLARE_ARCH_ENTRY_INIT
+#undef DECLARE_ARCH_ENTRY
static bool _completed;
public:
- static address _count_positives;
- static address _count_positives_long;
+ // declare getters for arch-specific entries
- static address get_previous_sp_entry()
- {
- return _get_previous_sp_entry;
- }
+#define DEFINE_ARCH_ENTRY_GETTER(arch, blob_name, stub_name, field_name, getter_name) \
+ static address getter_name() { return STUB_FIELD_NAME(field_name) ; }
- static address f2i_fixup()
- {
- return _f2i_fixup;
- }
+#define DEFINE_ARCH_ENTRY_GETTER_INIT(arch, blob_name, stub_name, field_name, getter_name, init_function) \
+ DEFINE_ARCH_ENTRY_GETTER(arch, blob_name, stub_name, field_name, getter_name)
- static address f2l_fixup()
- {
- return _f2l_fixup;
- }
+ STUBGEN_ARCH_ENTRIES_DO(DEFINE_ARCH_ENTRY_GETTER, DEFINE_ARCH_ENTRY_GETTER_INIT)
- static address d2i_fixup()
- {
- return _d2i_fixup;
- }
-
- static address d2l_fixup()
- {
- return _d2l_fixup;
- }
-
- static address vector_iota_indices() {
- return _vector_iota_indices;
- }
-
- static address float_sign_mask()
- {
- return _float_sign_mask;
- }
-
- static address float_sign_flip()
- {
- return _float_sign_flip;
- }
-
- static address double_sign_mask()
- {
- return _double_sign_mask;
- }
-
- static address double_sign_flip()
- {
- return _double_sign_flip;
- }
-
- static address zero_blocks() {
- return _zero_blocks;
- }
-
- static address count_positives() {
- return _count_positives;
- }
-
- static address count_positives_long() {
- return _count_positives_long;
- }
-
- static address large_array_equals() {
- return _large_array_equals;
- }
+#undef DEFINE_ARCH_ENTRY_GETTER_INIT
+#undef DEFINE_ARCH_ENTRY_GETTER
static address large_arrays_hashcode(BasicType eltype) {
switch (eltype) {
case T_BOOLEAN:
- return _large_arrays_hashcode_boolean;
+ return large_arrays_hashcode_boolean();
case T_BYTE:
- return _large_arrays_hashcode_byte;
+ return large_arrays_hashcode_byte();
case T_CHAR:
- return _large_arrays_hashcode_char;
+ return large_arrays_hashcode_char();
case T_SHORT:
- return _large_arrays_hashcode_short;
+ return large_arrays_hashcode_short();
case T_INT:
- return _large_arrays_hashcode_int;
+ return large_arrays_hashcode_int();
default:
ShouldNotReachHere();
}
@@ -169,42 +101,6 @@ class aarch64 {
return nullptr;
}
- static address compare_long_string_LL() {
- return _compare_long_string_LL;
- }
-
- static address compare_long_string_LU() {
- return _compare_long_string_LU;
- }
-
- static address compare_long_string_UL() {
- return _compare_long_string_UL;
- }
-
- static address compare_long_string_UU() {
- return _compare_long_string_UU;
- }
-
- static address string_indexof_linear_ul() {
- return _string_indexof_linear_ul;
- }
-
- static address string_indexof_linear_ll() {
- return _string_indexof_linear_ll;
- }
-
- static address string_indexof_linear_uu() {
- return _string_indexof_linear_uu;
- }
-
- static address large_byte_array_inflate() {
- return _large_byte_array_inflate;
- }
-
- static address spin_wait() {
- return _spin_wait;
- }
-
static bool complete() {
return _completed;
}
@@ -214,6 +110,7 @@ class aarch64 {
}
private:
+ 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 f70450b7222..80c9437de6b 100644
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
@@ -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, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.hpp"
#include "compiler/disassembler.hpp"
@@ -809,7 +808,7 @@ void TemplateInterpreterGenerator::lock_method() {
#ifdef ASSERT
{
Label L;
- __ ldrw(r0, access_flags);
+ __ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_SYNCHRONIZED);
__ br(Assembler::NE, L);
__ stop("method doesn't need synchronization");
@@ -820,7 +819,7 @@ void TemplateInterpreterGenerator::lock_method() {
// get synchronization object
{
Label done;
- __ ldrw(r0, access_flags);
+ __ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_STATIC);
// get receiver (assume this is frequent case)
__ ldr(r0, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
@@ -1225,7 +1224,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// make sure method is native & not abstract
#ifdef ASSERT
- __ ldrw(r0, access_flags);
+ __ ldrh(r0, access_flags);
{
Label L;
__ tst(r0, JVM_ACC_NATIVE);
@@ -1277,7 +1276,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
#ifdef ASSERT
{
Label L;
- __ ldrw(r0, access_flags);
+ __ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_SYNCHRONIZED);
__ br(Assembler::EQ, L);
__ stop("method needs synchronization");
@@ -1354,7 +1353,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// pass mirror handle if static call
{
Label L;
- __ ldrw(t, Address(rmethod, Method::access_flags_offset()));
+ __ ldrh(t, Address(rmethod, Method::access_flags_offset()));
__ tbz(t, exact_log2(JVM_ACC_STATIC), L);
// get mirror
__ load_mirror(t, rmethod, r10, rscratch2);
@@ -1564,7 +1563,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// do unlocking if necessary
{
Label L;
- __ ldrw(t, Address(rmethod, Method::access_flags_offset()));
+ __ ldrh(t, Address(rmethod, Method::access_flags_offset()));
__ tbz(t, exact_log2(JVM_ACC_SYNCHRONIZED), L);
// the code below should be shared with interpreter macro
// assembler implementation
@@ -1695,7 +1694,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
// make sure method is not native & not abstract
#ifdef ASSERT
- __ ldrw(r0, access_flags);
+ __ ldrh(r0, access_flags);
{
Label L;
__ tst(r0, JVM_ACC_NATIVE);
@@ -1751,7 +1750,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
#ifdef ASSERT
{
Label L;
- __ ldrw(r0, access_flags);
+ __ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_SYNCHRONIZED);
__ br(Assembler::EQ, L);
__ stop("method needs synchronization");
@@ -1801,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
@@ -2103,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) {
@@ -2151,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 60d4c3c5110..e50810486c8 100644
--- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
@@ -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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
diff --git a/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp b/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp
index a2925f00b05..7a0e5aaf3b4 100644
--- a/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/upcallLinker_aarch64.cpp
@@ -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) 2019, 2022, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "classfile/javaClasses.hpp"
#include "logging/logStream.hpp"
@@ -173,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);
}
@@ -335,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 ceb40dce921..bf9c965213c 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,17 @@
// 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) \
+#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) \
declare_toplevel_type(VM_Version)
-#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 87c7862e250..0f04fee7922 100644
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
@@ -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) 2015, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "pauth_aarch64.hpp"
#include "register_aarch64.hpp"
#include "runtime/arguments.hpp"
@@ -158,6 +157,10 @@ void VM_Version::initialize() {
if (FLAG_IS_DEFAULT(OnSpinWaitInstCount)) {
FLAG_SET_DEFAULT(OnSpinWaitInstCount, 2);
}
+ if (FLAG_IS_DEFAULT(CodeEntryAlignment) &&
+ (_model == CPU_MODEL_AMPERE_1A || _model == CPU_MODEL_AMPERE_1B)) {
+ FLAG_SET_DEFAULT(CodeEntryAlignment, 32);
+ }
}
// ThunderX
@@ -237,7 +240,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);
}
@@ -411,6 +414,17 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseChaCha20Intrinsics, false);
}
+ if (_features & CPU_ASIMD) {
+ if (FLAG_IS_DEFAULT(UseDilithiumIntrinsics)) {
+ UseDilithiumIntrinsics = true;
+ }
+ } else if (UseDilithiumIntrinsics) {
+ if (!FLAG_IS_DEFAULT(UseDilithiumIntrinsics)) {
+ warning("Dilithium intrinsic requires ASIMD instructions");
+ }
+ FLAG_SET_DEFAULT(UseDilithiumIntrinsics, false);
+ }
+
if (FLAG_IS_DEFAULT(UseBASE64Intrinsics)) {
UseBASE64Intrinsics = true;
}
diff --git a/src/hotspot/cpu/aarch64/vmreg_aarch64.cpp b/src/hotspot/cpu/aarch64/vmreg_aarch64.cpp
index 49adb398340..47ca0b30708 100644
--- a/src/hotspot/cpu/aarch64/vmreg_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/vmreg_aarch64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "code/vmreg.hpp"
#include "vmreg_aarch64.inline.hpp"
diff --git a/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp b/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp
index 56da06433e0..11ea02621d7 100644
--- a/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp
@@ -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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
diff --git a/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp b/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp
index 53e557fad86..978011491a0 100644
--- a/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp
+++ b/src/hotspot/cpu/arm/abstractInterpreter_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2022, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "interpreter/bytecode.hpp"
#include "interpreter/interpreter.hpp"
@@ -132,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 a3db5c0619c..486d51ac463 100644
--- a/src/hotspot/cpu/arm/arm.ad
+++ b/src/hotspot/cpu/arm/arm.ad
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2008, 2024, 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
@@ -283,10 +283,10 @@ void MachPrologNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
}
st->print_cr("PUSH R_FP|R_LR_LR"); st->print("\t");
if (framesize != 0) {
- st->print ("SUB R_SP, R_SP, " SIZE_FORMAT,framesize);
+ 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");
@@ -362,7 +362,7 @@ void MachEpilogNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
framesize -= 2*wordSize;
if (framesize != 0) {
- st->print("ADD R_SP, R_SP, " SIZE_FORMAT "\n\t",framesize);
+ st->print("ADD R_SP, R_SP, %zu\n\t",framesize);
}
st->print("POP R_FP|R_LR_LR");
@@ -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) %{
diff --git a/src/hotspot/cpu/arm/assembler_arm.cpp b/src/hotspot/cpu/arm/assembler_arm.cpp
index ec34912ad51..246c25c6575 100644
--- a/src/hotspot/cpu/arm/assembler_arm.cpp
+++ b/src/hotspot/cpu/arm/assembler_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2022, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "ci/ciEnv.hpp"
diff --git a/src/hotspot/cpu/arm/assembler_arm_32.cpp b/src/hotspot/cpu/arm/assembler_arm_32.cpp
index b140bce7076..36a0ae6ebac 100644
--- a/src/hotspot/cpu/arm/assembler_arm_32.cpp
+++ b/src/hotspot/cpu/arm/assembler_arm_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2022, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "ci/ciEnv.hpp"
diff --git a/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp b/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
index 8e85fa88a87..bca6c7ca30c 100644
--- a/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_CodeStubs.hpp"
#include "c1/c1_FrameMap.hpp"
diff --git a/src/hotspot/cpu/arm/c1_Defs_arm.hpp b/src/hotspot/cpu/arm/c1_Defs_arm.hpp
index 32e0b029648..5145efd011a 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_FrameMap_arm.cpp b/src/hotspot/cpu/arm/c1_FrameMap_arm.cpp
index 7eb4009be11..0fd113c8ceb 100644
--- a/src/hotspot/cpu/arm/c1_FrameMap_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_FrameMap_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2015, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "c1/c1_FrameMap.hpp"
#include "c1/c1_LIR.hpp"
#include "runtime/sharedRuntime.hpp"
diff --git a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
index b14e6f0b4ca..66c7b916f1f 100644
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_Compilation.hpp"
#include "c1/c1_LIRAssembler.hpp"
@@ -455,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");
@@ -494,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);
@@ -1513,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_LIRGenerator_arm.cpp b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
index a70bf2cbda9..ef5691f84a3 100644
--- a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_Compilation.hpp"
#include "c1/c1_FrameMap.hpp"
@@ -1126,6 +1125,11 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
x->direct_compare(), patching_info, x->profiled_method(), x->profiled_bci());
}
+// Intrinsic for Class::isInstance
+address LIRGenerator::isInstance_entry() {
+ return CAST_FROM_FN_PTR(address, Runtime1::is_instance_of);
+}
+
#ifdef __SOFTFP__
// Turn operator if (f g) into runtime call:
diff --git a/src/hotspot/cpu/arm/c1_LIR_arm.cpp b/src/hotspot/cpu/arm/c1_LIR_arm.cpp
index 9d70fd12f35..b8d69309348 100644
--- a/src/hotspot/cpu/arm/c1_LIR_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_LIR_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "c1/c1_LIR.hpp"
FloatRegister LIR_Opr::as_float_reg() const {
diff --git a/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp b/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp
index 70542d278ac..195607d5c91 100644
--- a/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
#include "gc/shared/barrierSet.hpp"
diff --git a/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp b/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp
index bae882ea93d..949e985ab1e 100644
--- a/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp
+++ b/src/hotspot/cpu/arm/c1_Runtime1_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_Defs.hpp"
#include "c1/c1_LIRAssembler.hpp"
diff --git a/src/hotspot/cpu/arm/c2_MacroAssembler_arm.cpp b/src/hotspot/cpu/arm/c2_MacroAssembler_arm.cpp
index 900bd33fd9d..89be6d288ff 100644
--- a/src/hotspot/cpu/arm/c2_MacroAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/c2_MacroAssembler_arm.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "opto/c2_MacroAssembler.hpp"
diff --git a/src/hotspot/cpu/arm/compiledIC_arm.cpp b/src/hotspot/cpu/arm/compiledIC_arm.cpp
index 2556a79126a..86927cd24ab 100644
--- a/src/hotspot/cpu/arm/compiledIC_arm.cpp
+++ b/src/hotspot/cpu/arm/compiledIC_arm.cpp
@@ -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.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "code/nativeInst.hpp"
diff --git a/src/hotspot/cpu/arm/downcallLinker_arm.cpp b/src/hotspot/cpu/arm/downcallLinker_arm.cpp
index eb15424eb38..e0d32dbe154 100644
--- a/src/hotspot/cpu/arm/downcallLinker_arm.cpp
+++ b/src/hotspot/cpu/arm/downcallLinker_arm.cpp
@@ -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.
* Copyright (c) 2020, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "prims/downcallLinker.hpp"
#include "utilities/debug.hpp"
diff --git a/src/hotspot/cpu/arm/foreignGlobals_arm.cpp b/src/hotspot/cpu/arm/foreignGlobals_arm.cpp
index 5f5a4eb32e0..677440e3802 100644
--- a/src/hotspot/cpu/arm/foreignGlobals_arm.cpp
+++ b/src/hotspot/cpu/arm/foreignGlobals_arm.cpp
@@ -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.
* Copyright (c) 2020, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "code/vmreg.hpp"
#include "prims/foreignGlobals.hpp"
#include "utilities/debug.hpp"
diff --git a/src/hotspot/cpu/arm/frame_arm.cpp b/src/hotspot/cpu/arm/frame_arm.cpp
index 13a5c471c6f..2722f93edec 100644
--- a/src/hotspot/cpu/arm/frame_arm.cpp
+++ b/src/hotspot/cpu/arm/frame_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "compiler/oopMap.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/resourceArea.hpp"
diff --git a/src/hotspot/cpu/arm/frame_arm.inline.hpp b/src/hotspot/cpu/arm/frame_arm.inline.hpp
index 801b2f6177c..92a48f22f8c 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 17ac726ada7..466dcc8fe66 100644
--- a/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/g1/g1BarrierSet.hpp"
#include "gc/g1/g1BarrierSetAssembler.hpp"
diff --git a/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp b/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
index 521c766bcd0..4492c9da33e 100644
--- a/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "gc/shared/barrierSetNMethod.hpp"
@@ -170,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 ed15cc5ebcf..224a499ff54 100644
--- a/src/hotspot/cpu/arm/gc/shared/barrierSetNMethod_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/shared/barrierSetNMethod_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "code/nativeInst.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "gc/shared/barrierSetNMethod.hpp"
diff --git a/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp b/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp
index 11b2ca2ef1d..91d3b8e9e5c 100644
--- a/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/cardTable.hpp"
diff --git a/src/hotspot/cpu/arm/gc/shared/modRefBarrierSetAssembler_arm.cpp b/src/hotspot/cpu/arm/gc/shared/modRefBarrierSetAssembler_arm.cpp
index 73208cec4e8..cb4058d48ed 100644
--- a/src/hotspot/cpu/arm/gc/shared/modRefBarrierSetAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/shared/modRefBarrierSetAssembler_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/modRefBarrierSetAssembler.hpp"
diff --git a/src/hotspot/cpu/arm/icache_arm.cpp b/src/hotspot/cpu/arm/icache_arm.cpp
index 61fcb8a3580..53e9824756a 100644
--- a/src/hotspot/cpu/arm/icache_arm.cpp
+++ b/src/hotspot/cpu/arm/icache_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2016, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.hpp"
#include "runtime/icache.hpp"
diff --git a/src/hotspot/cpu/arm/interp_masm_arm.cpp b/src/hotspot/cpu/arm/interp_masm_arm.cpp
index 3a81fdddb3c..e9e6187a6d1 100644
--- a/src/hotspot/cpu/arm/interp_masm_arm.cpp
+++ b/src/hotspot/cpu/arm/interp_masm_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/cardTable.hpp"
@@ -736,7 +735,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state, Register ret_a
ldrb(Rflag, do_not_unlock_if_synchronized);
// get method access flags
- ldr_u32(Raccess_flags, Address(Rmethod, Method::access_flags_offset()));
+ ldrh(Raccess_flags, Address(Rmethod, Method::access_flags_offset()));
strb(zero_register(Rtemp), do_not_unlock_if_synchronized); // reset the flag
diff --git a/src/hotspot/cpu/arm/interp_masm_arm.hpp b/src/hotspot/cpu/arm/interp_masm_arm.hpp
index 58eeda6fbbb..578e191719e 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/interpreterRT_arm.cpp b/src/hotspot/cpu/arm/interpreterRT_arm.cpp
index c8996bc266c..20dcbcdd8be 100644
--- a/src/hotspot/cpu/arm/interpreterRT_arm.cpp
+++ b/src/hotspot/cpu/arm/interpreterRT_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2023, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "interpreter/interp_masm.hpp"
#include "interpreter/interpreter.hpp"
diff --git a/src/hotspot/cpu/arm/jniFastGetField_arm.cpp b/src/hotspot/cpu/arm/jniFastGetField_arm.cpp
index 2a7e16578ff..3a5dd10e82e 100644
--- a/src/hotspot/cpu/arm/jniFastGetField_arm.cpp
+++ b/src/hotspot/cpu/arm/jniFastGetField_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2023, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.hpp"
#include "code/codeBlob.hpp"
diff --git a/src/hotspot/cpu/arm/macroAssembler_arm.cpp b/src/hotspot/cpu/arm/macroAssembler_arm.cpp
index 8e7b323e535..638b3a5404c 100644
--- a/src/hotspot/cpu/arm/macroAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/macroAssembler_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.hpp"
diff --git a/src/hotspot/cpu/arm/matcher_arm.hpp b/src/hotspot/cpu/arm/matcher_arm.hpp
index a4436b7eab4..66fe8ac330e 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/methodHandles_arm.cpp b/src/hotspot/cpu/arm/methodHandles_arm.cpp
index f59e01112e9..3710fa33f36 100644
--- a/src/hotspot/cpu/arm/methodHandles_arm.cpp
+++ b/src/hotspot/cpu/arm/methodHandles_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -26,7 +26,6 @@
// cross platform development for JSR292.
// Last synchronization: changeset f8c9417e3571
-#include "precompiled.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "classfile/vmClasses.hpp"
#include "interpreter/interpreter.hpp"
@@ -497,7 +496,7 @@ void trace_method_handle_stub(const char* adaptername,
if (!has_mh) {
mh_reg_name = "R5";
}
- log_info(methodhandles)("MH %s %s=" PTR_FORMAT " sp=(" PTR_FORMAT "+" INTX_FORMAT ") stack_size=" INTX_FORMAT " bp=" PTR_FORMAT,
+ log_info(methodhandles)("MH %s %s=" PTR_FORMAT " sp=(" PTR_FORMAT "+%zd) stack_size=%zd bp=" PTR_FORMAT,
adaptername, mh_reg_name, mh_reg,
(intptr_t)entry_sp, (intptr_t)saved_sp - (intptr_t)entry_sp, (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp);
diff --git a/src/hotspot/cpu/arm/nativeInst_arm_32.cpp b/src/hotspot/cpu/arm/nativeInst_arm_32.cpp
index 6a4062f29b3..2caf2d7587e 100644
--- a/src/hotspot/cpu/arm/nativeInst_arm_32.cpp
+++ b/src/hotspot/cpu/arm/nativeInst_arm_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "code/codeCache.hpp"
#include "memory/resourceArea.hpp"
diff --git a/src/hotspot/cpu/arm/register_arm.cpp b/src/hotspot/cpu/arm/register_arm.cpp
index a0ae9ff4f92..ea3ef87e670 100644
--- a/src/hotspot/cpu/arm/register_arm.cpp
+++ b/src/hotspot/cpu/arm/register_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "register_arm.hpp"
#include "utilities/debug.hpp"
diff --git a/src/hotspot/cpu/arm/relocInfo_arm.cpp b/src/hotspot/cpu/arm/relocInfo_arm.cpp
index fb112cdcfc0..2006be978bc 100644
--- a/src/hotspot/cpu/arm/relocInfo_arm.cpp
+++ b/src/hotspot/cpu/arm/relocInfo_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "code/relocInfo.hpp"
#include "nativeInst_arm.hpp"
diff --git a/src/hotspot/cpu/arm/runtime_arm.cpp b/src/hotspot/cpu/arm/runtime_arm.cpp
index cd76843d6df..20c1bc199d3 100644
--- a/src/hotspot/cpu/arm/runtime_arm.cpp
+++ b/src/hotspot/cpu/arm/runtime_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#ifdef COMPILER2
#include "asm/assembler.inline.hpp"
#include "code/vmreg.hpp"
@@ -43,16 +42,17 @@
//------------------------------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
// bypassed when code generation useless
MacroAssembler* masm = new MacroAssembler(&buffer);
@@ -174,7 +174,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 ---------------------------
@@ -201,13 +201,14 @@ 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);
MacroAssembler* masm = new MacroAssembler(&buffer);
int framesize_in_words = 2; // FP + LR
@@ -282,7 +283,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 82e16836acb..c63d72920a5 100644
--- a/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
+++ b/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "code/debugInfoRec.hpp"
diff --git a/src/hotspot/cpu/arm/stubDeclarations_arm.hpp b/src/hotspot/cpu/arm/stubDeclarations_arm.hpp
new file mode 100644
index 00000000000..35df4b924d2
--- /dev/null
+++ b/src/hotspot/cpu/arm/stubDeclarations_arm.hpp
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2025, 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_ARM_STUBDECLARATIONS_HPP
+#define CPU_ARM_STUBDECLARATIONS_HPP
+
+#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(initial, 9000) \
+ do_stub(initial, idiv_irem) \
+ do_arch_entry(Arm, initial, idiv_irem, \
+ idiv_irem_entry, idiv_irem_entry) \
+ do_stub(initial, atomic_load_long) \
+ do_arch_entry(Arm, initial, atomic_load_long, \
+ atomic_load_long_entry, atomic_load_long_entry) \
+ do_stub(initial, atomic_store_long) \
+ do_arch_entry(Arm, initial, atomic_load_long, \
+ atomic_store_long_entry, atomic_store_long_entry) \
+
+#define STUBGEN_CONTINUATION_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(continuation, 2000) \
+
+
+#define STUBGEN_COMPILER_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(compiler, 22000) \
+ do_stub(compiler, partial_subtype_check) \
+ do_arch_entry(Arm, compiler, partial_subtype_check, \
+ partial_subtype_check, partial_subtype_check) \
+
+
+#define STUBGEN_FINAL_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(final, 22000) \
+
+
+#endif // CPU_ARM_STUBDECLARATIONS_HPP
diff --git a/src/hotspot/cpu/arm/stubGenerator_arm.cpp b/src/hotspot/cpu/arm/stubGenerator_arm.cpp
index 9b91e02cf07..fc5bcb4e0e6 100644
--- a/src/hotspot/cpu/arm/stubGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/stubGenerator_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "compiler/oopMap.hpp"
#include "gc/shared/barrierSet.hpp"
@@ -173,7 +172,8 @@ class StubGenerator: public StubCodeGenerator {
private:
address generate_call_stub(address& return_address) {
- StubCodeMark mark(this, "StubRoutines", "call_stub");
+ StubGenStubId stub_id = StubGenStubId::call_stub_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -252,7 +252,8 @@ class StubGenerator: public StubCodeGenerator {
// (in) Rexception_obj: exception oop
address generate_catch_exception() {
- StubCodeMark mark(this, "StubRoutines", "catch_exception");
+ StubGenStubId stub_id = StubGenStubId::catch_exception_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ str(Rexception_obj, Address(Rthread, Thread::pending_exception_offset()));
@@ -264,7 +265,8 @@ class StubGenerator: public StubCodeGenerator {
// (in) Rexception_pc: return address
address generate_forward_exception() {
- StubCodeMark mark(this, "StubRoutines", "forward exception");
+ StubGenStubId stub_id = StubGenStubId::forward_exception_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ mov(c_rarg0, Rthread);
@@ -313,6 +315,8 @@ class StubGenerator: public StubCodeGenerator {
Register tmp = LR;
assert(dividend == remainder, "must be");
+ StubGenStubId stub_id = StubGenStubId::idiv_irem_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// Check for special cases: divisor <= 0 or dividend < 0
@@ -454,7 +458,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_atomic_add() {
address start;
- StubCodeMark mark(this, "StubRoutines", "atomic_add");
+ StubGenStubId stub_id = StubGenStubId::atomic_add_id;
+ StubCodeMark mark(this, stub_id);
Label retry;
start = __ pc();
Register addval = R0;
@@ -505,7 +510,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_atomic_xchg() {
address start;
- StubCodeMark mark(this, "StubRoutines", "atomic_xchg");
+ StubGenStubId stub_id = StubGenStubId::atomic_xchg_id;
+ StubCodeMark mark(this, stub_id);
start = __ pc();
Register newval = R0;
Register dest = R1;
@@ -555,7 +561,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_atomic_cmpxchg() {
address start;
- StubCodeMark mark(this, "StubRoutines", "atomic_cmpxchg");
+ StubGenStubId stub_id = StubGenStubId::atomic_cmpxchg_id;
+ StubCodeMark mark(this, stub_id);
start = __ pc();
Register cmp = R0;
Register newval = R1;
@@ -593,7 +600,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_atomic_cmpxchg_long() {
address start;
- StubCodeMark mark(this, "StubRoutines", "atomic_cmpxchg_long");
+ StubGenStubId stub_id = StubGenStubId::atomic_cmpxchg_long_id;
+ StubCodeMark mark(this, stub_id);
start = __ pc();
Register cmp_lo = R0;
Register cmp_hi = R1;
@@ -630,7 +638,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_atomic_load_long() {
address start;
- StubCodeMark mark(this, "StubRoutines", "atomic_load_long");
+ StubGenStubId stub_id = StubGenStubId::atomic_load_long_id;
+ StubCodeMark mark(this, stub_id);
start = __ pc();
Register result_lo = R0;
Register result_hi = R1;
@@ -654,7 +663,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_atomic_store_long() {
address start;
- StubCodeMark mark(this, "StubRoutines", "atomic_store_long");
+ StubGenStubId stub_id = StubGenStubId::atomic_store_long_id;
+ StubCodeMark mark(this, stub_id);
start = __ pc();
Register newval_lo = R0;
Register newval_hi = R1;
@@ -696,7 +706,8 @@ class StubGenerator: public StubCodeGenerator {
// raddr: LR, blown by call
address generate_partial_subtype_check() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "partial_subtype_check");
+ StubGenStubId stub_id = StubGenStubId::partial_subtype_check_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// based on SPARC check_klass_subtype_[fast|slow]_path (without CompressedOops)
@@ -785,7 +796,8 @@ class StubGenerator: public StubCodeGenerator {
// Non-destructive plausibility checks for oops
address generate_verify_oop() {
- StubCodeMark mark(this, "StubRoutines", "verify_oop");
+ StubGenStubId stub_id = StubGenStubId::verify_oop_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// Incoming arguments:
@@ -1986,6 +1998,23 @@ class StubGenerator: public StubCodeGenerator {
return start_pc;
}
+ /* Internal development flag */
+ /* enabled by defining TEST_C2_GENERIC_ARRAYCOPY */
+
+ // With this flag, the C2 stubs are tested by generating calls to
+ // generic_arraycopy instead of Runtime1::arraycopy
+
+ // Runtime1::arraycopy return a status in R0 (0 if OK, else ~copied)
+ // and the result is tested to see whether the arraycopy stub should
+ // be called.
+
+ // When we test arraycopy this way, we must generate extra code in the
+ // arraycopy methods callable from C2 generic_arraycopy to set the
+ // status to 0 for those who always succeed (calling the slow path stub might
+ // lead to errors since the copy has already been performed).
+
+ static const bool set_status;
+
//
// Generate stub for primitive array copy. If "aligned" is true, the
// "from" and "to" addresses are assumed to be heapword aligned.
@@ -1998,9 +2027,109 @@ class StubGenerator: public StubCodeGenerator {
// to: R1
// count: R2 treated as signed 32-bit int
//
- address generate_primitive_copy(bool aligned, const char * name, bool status, int bytes_per_count, bool disjoint, address nooverlap_target = nullptr) {
+ address generate_primitive_copy(StubGenStubId stub_id, address nooverlap_target = nullptr) {
+ bool aligned;
+ bool status;
+ int bytes_per_count;
+ bool disjoint;
+
+ switch (stub_id) {
+ case jbyte_disjoint_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 1;
+ disjoint = true;
+ break;
+ case jshort_disjoint_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 2;
+ disjoint = true;
+ break;
+ case jint_disjoint_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 4;
+ disjoint = true;
+ break;
+ case jlong_disjoint_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 8;
+ disjoint = true;
+ break;
+ case arrayof_jbyte_disjoint_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ bytes_per_count = 1;
+ disjoint = true;
+ break;
+ case arrayof_jshort_disjoint_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ bytes_per_count = 2;
+ disjoint = true;
+ break;
+ case arrayof_jint_disjoint_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ bytes_per_count = 4;
+ disjoint = true;
+ break;
+ case arrayof_jlong_disjoint_arraycopy_id:
+ aligned = false;
+ status = set_status;
+ bytes_per_count = 8;
+ disjoint = true;
+ break;
+ case jbyte_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 1;
+ disjoint = false;
+ break;
+ case jshort_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 2;
+ disjoint = false;
+ break;
+ case jint_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 4;
+ disjoint = false;
+ break;
+ case jlong_arraycopy_id:
+ aligned = false;
+ status = true;
+ bytes_per_count = 8;
+ disjoint = false;
+ break;
+ case arrayof_jbyte_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ bytes_per_count = 1;
+ disjoint = false;
+ break;
+ case arrayof_jshort_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ bytes_per_count = 2;
+ disjoint = false;
+ break;
+ case arrayof_jint_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ bytes_per_count = 4;
+ disjoint = false;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Register from = R0; // source array address
@@ -2172,9 +2301,38 @@ class StubGenerator: public StubCodeGenerator {
// to: R1
// count: R2 treated as signed 32-bit int
//
- address generate_oop_copy(bool aligned, const char * name, bool status, bool disjoint, address nooverlap_target = nullptr) {
+ address generate_oop_copy(StubGenStubId stub_id, address nooverlap_target = nullptr) {
+ bool aligned;
+ bool status;
+ bool disjoint;
+
+ switch (stub_id) {
+ case oop_disjoint_arraycopy_id:
+ aligned = false;
+ status = true;
+ disjoint = true;
+ break;
+ case arrayof_oop_disjoint_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ disjoint = true;
+ break;
+ case oop_arraycopy_id:
+ aligned = false;
+ status = true;
+ disjoint = false;
+ break;
+ case arrayof_oop_arraycopy_id:
+ aligned = true;
+ status = set_status;
+ disjoint = false;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
Register from = R0;
@@ -2309,7 +2467,7 @@ class StubGenerator: public StubCodeGenerator {
// Examines the alignment of the operands and dispatches
// to a long, int, short, or byte copy loop.
//
- address generate_unsafe_copy(const char* name) {
+ address generate_unsafe_copy() {
const Register R0_from = R0; // source array address
const Register R1_to = R1; // destination array address
@@ -2318,7 +2476,8 @@ class StubGenerator: public StubCodeGenerator {
const Register R3_bits = R3; // test copy of low bits
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubGenStubId stub_id = StubGenStubId::unsafe_arraycopy_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Register tmp = Rtemp;
@@ -2443,9 +2602,10 @@ class StubGenerator: public StubCodeGenerator {
// ckval: R4 (super_klass)
// ret: R0 zero for success; (-1^K) where K is partial transfer count (32-bit)
//
- address generate_checkcast_copy(const char * name) {
+ address generate_checkcast_copy() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubGenStubId stub_id = StubGenStubId::checkcast_arraycopy_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Register from = R0; // source array address
@@ -2596,7 +2756,7 @@ class StubGenerator: public StubCodeGenerator {
// R0 == 0 - success
// R0 < 0 - need to call System.arraycopy
//
- address generate_generic_copy(const char *name) {
+ address generate_generic_copy() {
Label L_failed, L_objArray;
// Input registers
@@ -2612,7 +2772,8 @@ class StubGenerator: public StubCodeGenerator {
const Register R8_temp = R8;
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubGenStubId stub_id = StubGenStubId::generic_arraycopy_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ zap_high_non_significant_bits(R1);
@@ -2843,72 +3004,55 @@ class StubGenerator: public StubCodeGenerator {
// Note: the disjoint stubs must be generated first, some of
// the conjoint stubs use them.
- bool status = false; // non failing C2 stubs need not return a status in R0
-
-#ifdef TEST_C2_GENERIC_ARRAYCOPY /* Internal development flag */
- // With this flag, the C2 stubs are tested by generating calls to
- // generic_arraycopy instead of Runtime1::arraycopy
-
- // Runtime1::arraycopy return a status in R0 (0 if OK, else ~copied)
- // and the result is tested to see whether the arraycopy stub should
- // be called.
-
- // When we test arraycopy this way, we must generate extra code in the
- // arraycopy methods callable from C2 generic_arraycopy to set the
- // status to 0 for those who always succeed (calling the slow path stub might
- // lead to errors since the copy has already been performed).
-
- status = true; // generate a status compatible with C1 calls
-#endif
-
address ucm_common_error_exit = generate_unsafecopy_common_error_exit();
UnsafeMemoryAccess::set_common_exit_stub_pc(ucm_common_error_exit);
// these need always status in case they are called from generic_arraycopy
- StubRoutines::_jbyte_disjoint_arraycopy = generate_primitive_copy(false, "jbyte_disjoint_arraycopy", true, 1, true);
- StubRoutines::_jshort_disjoint_arraycopy = generate_primitive_copy(false, "jshort_disjoint_arraycopy", true, 2, true);
- StubRoutines::_jint_disjoint_arraycopy = generate_primitive_copy(false, "jint_disjoint_arraycopy", true, 4, true);
- StubRoutines::_jlong_disjoint_arraycopy = generate_primitive_copy(false, "jlong_disjoint_arraycopy", true, 8, true);
- StubRoutines::_oop_disjoint_arraycopy = generate_oop_copy (false, "oop_disjoint_arraycopy", true, true);
+ StubRoutines::_jbyte_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::jbyte_disjoint_arraycopy_id);
+ StubRoutines::_jshort_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::jshort_disjoint_arraycopy_id);
+ StubRoutines::_jint_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::jint_disjoint_arraycopy_id);
+ StubRoutines::_jlong_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::jlong_disjoint_arraycopy_id);
+ StubRoutines::_oop_disjoint_arraycopy = generate_oop_copy (StubGenStubId::oop_disjoint_arraycopy_id);
- StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_primitive_copy(true, "arrayof_jbyte_disjoint_arraycopy", status, 1, true);
- StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_primitive_copy(true, "arrayof_jshort_disjoint_arraycopy",status, 2, true);
- StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_primitive_copy(true, "arrayof_jint_disjoint_arraycopy", status, 4, true);
- StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_primitive_copy(true, "arrayof_jlong_disjoint_arraycopy", status, 8, true);
- StubRoutines::_arrayof_oop_disjoint_arraycopy = generate_oop_copy (true, "arrayof_oop_disjoint_arraycopy", status, true);
+ StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::arrayof_jbyte_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::arrayof_jshort_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::arrayof_jint_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_primitive_copy(StubGenStubId::arrayof_jlong_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_oop_disjoint_arraycopy = generate_oop_copy (StubGenStubId::arrayof_oop_disjoint_arraycopy_id);
// these need always status in case they are called from generic_arraycopy
- StubRoutines::_jbyte_arraycopy = generate_primitive_copy(false, "jbyte_arraycopy", true, 1, false, StubRoutines::_jbyte_disjoint_arraycopy);
- StubRoutines::_jshort_arraycopy = generate_primitive_copy(false, "jshort_arraycopy", true, 2, false, StubRoutines::_jshort_disjoint_arraycopy);
- StubRoutines::_jint_arraycopy = generate_primitive_copy(false, "jint_arraycopy", true, 4, false, StubRoutines::_jint_disjoint_arraycopy);
- StubRoutines::_jlong_arraycopy = generate_primitive_copy(false, "jlong_arraycopy", true, 8, false, StubRoutines::_jlong_disjoint_arraycopy);
- StubRoutines::_oop_arraycopy = generate_oop_copy (false, "oop_arraycopy", true, false, StubRoutines::_oop_disjoint_arraycopy);
+ StubRoutines::_jbyte_arraycopy = generate_primitive_copy(StubGenStubId::jbyte_arraycopy_id, StubRoutines::_jbyte_disjoint_arraycopy);
+ StubRoutines::_jshort_arraycopy = generate_primitive_copy(StubGenStubId::jshort_arraycopy_id, StubRoutines::_jshort_disjoint_arraycopy);
+ StubRoutines::_jint_arraycopy = generate_primitive_copy(StubGenStubId::jint_arraycopy_id, StubRoutines::_jint_disjoint_arraycopy);
+ StubRoutines::_jlong_arraycopy = generate_primitive_copy(StubGenStubId::jlong_arraycopy_id, StubRoutines::_jlong_disjoint_arraycopy);
+ StubRoutines::_oop_arraycopy = generate_oop_copy (StubGenStubId::oop_arraycopy_id, StubRoutines::_oop_disjoint_arraycopy);
- StubRoutines::_arrayof_jbyte_arraycopy = generate_primitive_copy(true, "arrayof_jbyte_arraycopy", status, 1, false, StubRoutines::_arrayof_jbyte_disjoint_arraycopy);
- StubRoutines::_arrayof_jshort_arraycopy = generate_primitive_copy(true, "arrayof_jshort_arraycopy", status, 2, false, StubRoutines::_arrayof_jshort_disjoint_arraycopy);
+ StubRoutines::_arrayof_jbyte_arraycopy = generate_primitive_copy(StubGenStubId::arrayof_jbyte_arraycopy_id, StubRoutines::_arrayof_jbyte_disjoint_arraycopy);
+ StubRoutines::_arrayof_jshort_arraycopy = generate_primitive_copy(StubGenStubId::arrayof_jshort_arraycopy_id, StubRoutines::_arrayof_jshort_disjoint_arraycopy);
#ifdef _LP64
// since sizeof(jint) < sizeof(HeapWord), there's a different flavor:
- StubRoutines::_arrayof_jint_arraycopy = generate_primitive_copy(true, "arrayof_jint_arraycopy", status, 4, false, StubRoutines::_arrayof_jint_disjoint_arraycopy);
+ StubRoutines::_arrayof_jint_arraycopy = generate_primitive_copy(StubGenStubId::arrayof_jint_arraycopy_id, StubRoutines::_arrayof_jint_disjoint_arraycopy);
#else
StubRoutines::_arrayof_jint_arraycopy = StubRoutines::_jint_arraycopy;
#endif
if (BytesPerHeapOop < HeapWordSize) {
- StubRoutines::_arrayof_oop_arraycopy = generate_oop_copy (true, "arrayof_oop_arraycopy", status, false, StubRoutines::_arrayof_oop_disjoint_arraycopy);
+ StubRoutines::_arrayof_oop_arraycopy = generate_oop_copy (StubGenStubId::arrayof_oop_arraycopy_id, StubRoutines::_arrayof_oop_disjoint_arraycopy);
} else {
StubRoutines::_arrayof_oop_arraycopy = StubRoutines::_oop_arraycopy;
}
StubRoutines::_arrayof_jlong_arraycopy = StubRoutines::_jlong_arraycopy;
- StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy");
- StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy");
- StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy");
+ StubRoutines::_checkcast_arraycopy = generate_checkcast_copy();
+ StubRoutines::_unsafe_arraycopy = generate_unsafe_copy();
+ StubRoutines::_generic_arraycopy = generate_generic_copy();
}
address generate_method_entry_barrier() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "nmethod_entry_barrier");
+ StubGenStubId stub_id = StubGenStubId::method_entry_barrier_id;
+ StubCodeMark mark(this, stub_id);
Label deoptimize_label;
@@ -2961,22 +3105,22 @@ class StubGenerator: public StubCodeGenerator {
#undef __
#define __ masm->
- address generate_cont_thaw(const char* label, Continuation::thaw_kind kind) {
+ address generate_cont_thaw(StubGenStubId stub_id) {
if (!Continuations::enabled()) return nullptr;
Unimplemented();
return nullptr;
}
address generate_cont_thaw() {
- return generate_cont_thaw("Cont thaw", Continuation::thaw_top);
+ return generate_cont_thaw(StubGenStubId::cont_thaw_id);
}
address generate_cont_returnBarrier() {
- return generate_cont_thaw("Cont thaw return barrier", Continuation::thaw_return_barrier);
+ return generate_cont_thaw(StubGenStubId::cont_returnBarrier_id);
}
address generate_cont_returnBarrier_exception() {
- return generate_cont_thaw("Cont thaw return barrier exception", Continuation::thaw_return_barrier_exception);
+ return generate_cont_thaw(StubGenStubId::cont_returnBarrierExc_id);
}
//---------------------------------------------------------------------------
@@ -3008,8 +3152,8 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_atomic_xchg_entry = generate_atomic_xchg();
StubRoutines::_atomic_cmpxchg_entry = generate_atomic_cmpxchg();
StubRoutines::_atomic_cmpxchg_long_entry = generate_atomic_cmpxchg_long();
- StubRoutines::_atomic_load_long_entry = generate_atomic_load_long();
- StubRoutines::_atomic_store_long_entry = generate_atomic_store_long();
+ StubRoutines::Arm::_atomic_load_long_entry = generate_atomic_load_long();
+ StubRoutines::Arm::_atomic_store_long_entry = generate_atomic_store_long();
}
@@ -3032,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() {
@@ -3059,27 +3199,36 @@ class StubGenerator: public StubCodeGenerator {
}
public:
- StubGenerator(CodeBuffer* code, StubsKind kind) : StubCodeGenerator(code) {
- switch(kind) {
- case Initial_stubs:
+ StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
+ switch(blob_id) {
+ case initial_id:
generate_initial_stubs();
break;
- case Continuation_stubs:
+ case continuation_id:
generate_continuation_stubs();
break;
- case Compiler_stubs:
+ case compiler_id:
generate_compiler_stubs();
break;
- case Final_stubs:
+ case final_id:
generate_final_stubs();
break;
default:
- fatal("unexpected stubs kind: %d", kind);
+ fatal("unexpected blob id: %d", blob_id);
break;
};
}
}; // end class declaration
-void StubGenerator_generate(CodeBuffer* code, StubCodeGenerator::StubsKind kind) {
- StubGenerator g(code, kind);
+void StubGenerator_generate(CodeBuffer* code, StubGenBlobId blob_id) {
+ StubGenerator g(code, blob_id);
}
+
+// implementation of internal development flag
+
+#ifdef TEST_C2_GENERIC_ARRAYCOPY
+const bool StubGenerator::set_status = true; // generate a status compatible with C1 calls
+#else
+const bool StubGenerator::set_status = false; // non failing C2 stubs need not return a status in R0
+#endif
+
diff --git a/src/hotspot/cpu/arm/stubRoutinesCrypto_arm.cpp b/src/hotspot/cpu/arm/stubRoutinesCrypto_arm.cpp
index 350636fbe93..b663cfd9298 100644
--- a/src/hotspot/cpu/arm/stubRoutinesCrypto_arm.cpp
+++ b/src/hotspot/cpu/arm/stubRoutinesCrypto_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -119,7 +119,8 @@ void aes_init() {
address generate_aescrypt_encryptBlock() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "aesencryptBlock");
+ StubGenStubId stub_id = StubGenStubId::aescrypt_encryptBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -316,7 +317,8 @@ address generate_aescrypt_encryptBlock() {
address generate_aescrypt_decryptBlock() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "aesdecryptBlock");
+ StubGenStubId stub_id = StubGenStubId::aescrypt_decryptBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -536,7 +538,8 @@ address generate_cipherBlockChaining_encryptAESCrypt() {
// [sp+4] Transposition Box reference
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "cipherBlockChaining_encryptAESCrypt");
+ StubGenStubId stub_id = StubGenStubId::cipherBlockChaining_encryptAESCrypt_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -601,7 +604,8 @@ address generate_cipherBlockChaining_encryptAESCrypt() {
address generate_cipherBlockChaining_decryptAESCrypt() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "cipherBlockChaining_decryptAESCrypt");
+ StubGenStubId stub_id = StubGenStubId::cipherBlockChaining_decryptAESCrypt_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
diff --git a/src/hotspot/cpu/arm/stubRoutines_arm.cpp b/src/hotspot/cpu/arm/stubRoutines_arm.cpp
index 0cd174d8da6..d843d89186e 100644
--- a/src/hotspot/cpu/arm/stubRoutines_arm.cpp
+++ b/src/hotspot/cpu/arm/stubRoutines_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2023, 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
@@ -22,14 +22,17 @@
*
*/
-#include "precompiled.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/stubRoutines.hpp"
-address StubRoutines::Arm::_idiv_irem_entry = nullptr;
+#define DEFINE_ARCH_ENTRY(arch, blob_name, stub_name, field_name, getter_name) \
+ address StubRoutines:: arch :: STUB_FIELD_NAME(field_name) = nullptr;
-address StubRoutines::Arm::_partial_subtype_check = nullptr;
+#define DEFINE_ARCH_ENTRY_INIT(arch, blob_name, stub_name, field_name, getter_name, init_function) \
+ address StubRoutines:: arch :: STUB_FIELD_NAME(field_name) = CAST_FROM_FN_PTR(address, init_function);
-address StubRoutines::_atomic_load_long_entry = nullptr;
-address StubRoutines::_atomic_store_long_entry = nullptr;
+STUBGEN_ARCH_ENTRIES_DO(DEFINE_ARCH_ENTRY, DEFINE_ARCH_ENTRY_INIT)
+
+#undef DEFINE_ARCH_ENTRY_INIT
+#undef DEFINE_ARCH_ENTRY
diff --git a/src/hotspot/cpu/arm/stubRoutines_arm.hpp b/src/hotspot/cpu/arm/stubRoutines_arm.hpp
index 05c82881cd5..838b3e6d378 100644
--- a/src/hotspot/cpu/arm/stubRoutines_arm.hpp
+++ b/src/hotspot/cpu/arm/stubRoutines_arm.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,38 +29,53 @@
// definition. See stubRoutines.hpp for a description on how to
// extend it.
+// emit enum used to size per-blob code buffers
+
+#define DEFINE_BLOB_SIZE(blob_name, size) \
+ _ ## blob_name ## _code_size = size,
+
enum platform_dependent_constants {
- // simply increase sizes if too small (assembler will crash if too small)
- _initial_stubs_code_size = 9000,
- _continuation_stubs_code_size = 2000,
- _compiler_stubs_code_size = 22000,
- _final_stubs_code_size = 22000
+ STUBGEN_ARCH_BLOBS_DO(DEFINE_BLOB_SIZE)
};
+#undef DEFINE_BLOB_SIZE
+
+public:
+ static bool returns_to_call_stub(address return_pc) {
+ return return_pc == _call_stub_return_address;
+ }
+
class Arm {
friend class StubGenerator;
friend class VMStructs;
- private:
+#define DECLARE_ARCH_ENTRY(arch, blob_name, stub_name, field_name, getter_name) \
+ static address STUB_FIELD_NAME(field_name) ;
- static address _idiv_irem_entry;
- static address _partial_subtype_check;
+#define DECLARE_ARCH_ENTRY_INIT(arch, blob_name, stub_name, field_name, getter_name, init_function) \
+ DECLARE_ARCH_ENTRY(arch, blob_name, stub_name, field_name, getter_name)
- public:
+private:
+ STUBGEN_ARCH_ENTRIES_DO(DECLARE_ARCH_ENTRY, DECLARE_ARCH_ENTRY_INIT)
+
+#undef DECLARE_ARCH_ENTRY_INIT
+#undef DECLARE_ARCH_ENTRY
+
+public:
+
+ // declare getters for arch-specific entries
+
+#define DEFINE_ARCH_ENTRY_GETTER(arch, blob_name, stub_name, field_name, getter_name) \
+ static address getter_name() { return STUB_FIELD_NAME(field_name) ; }
+
+#define DEFINE_ARCH_ENTRY_GETTER_INIT(arch, blob_name, stub_name, field_name, getter_name, init_function) \
+ DEFINE_ARCH_ENTRY_GETTER(arch, blob_name, stub_name, field_name, getter_name)
+
+ STUBGEN_ARCH_ENTRIES_DO(DEFINE_ARCH_ENTRY_GETTER, DEFINE_ARCH_ENTRY_GETTER_INIT)
+
+#undef DEFINE_ARCH_ENTRY_GETTER_INIT
+#undef DEFINE_ARCH_ENTRY_GETTER
- static address idiv_irem_entry() { return _idiv_irem_entry; }
- static address partial_subtype_check() { return _partial_subtype_check; }
};
- static bool returns_to_call_stub(address return_pc) {
- return return_pc == _call_stub_return_address;
- }
-
- static address _atomic_load_long_entry;
- static address _atomic_store_long_entry;
-
- static address atomic_load_long_entry() { return _atomic_load_long_entry; }
- static address atomic_store_long_entry() { return _atomic_store_long_entry; }
-
-
#endif // CPU_ARM_STUBROUTINES_ARM_HPP
diff --git a/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp b/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
index 9df7a455eeb..da226c09f3c 100644
--- a/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.hpp"
@@ -579,7 +578,7 @@ void TemplateInterpreterGenerator::lock_method() {
#ifdef ASSERT
{ Label L;
- __ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
+ __ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tbnz(Rtemp, JVM_ACC_SYNCHRONIZED_BIT, L);
__ stop("method doesn't need synchronization");
__ bind(L);
@@ -588,7 +587,7 @@ void TemplateInterpreterGenerator::lock_method() {
// get synchronization object
{ Label done;
- __ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
+ __ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tst(Rtemp, JVM_ACC_STATIC);
__ ldr(R0, Address(Rlocals, Interpreter::local_offset_in_bytes(0)), eq); // get receiver (assume this is frequent case)
__ b(done, eq);
@@ -795,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; }
@@ -851,7 +846,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// make sure method is native & not abstract
#ifdef ASSERT
- __ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
+ __ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
{
Label L;
__ tbnz(Rtemp, JVM_ACC_NATIVE_BIT, L);
@@ -893,7 +888,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// no synchronization necessary
#ifdef ASSERT
{ Label L;
- __ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
+ __ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tbz(Rtemp, JVM_ACC_SYNCHRONIZED_BIT, L);
__ stop("method needs synchronization");
__ bind(L);
@@ -975,7 +970,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// Pass JNIEnv and mirror for static methods
{
Label L;
- __ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
+ __ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ add(R0, Rthread, in_bytes(JavaThread::jni_environment_offset()));
__ tbz(Rtemp, JVM_ACC_STATIC_BIT, L);
__ load_mirror(Rtemp, Rmethod, Rtemp);
@@ -1204,7 +1199,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
// make sure method is not native & not abstract
#ifdef ASSERT
- __ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
+ __ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
{
Label L;
__ tbz(Rtemp, JVM_ACC_NATIVE_BIT, L);
@@ -1249,7 +1244,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
// no synchronization necessary
#ifdef ASSERT
{ Label L;
- __ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
+ __ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tbz(Rtemp, JVM_ACC_SYNCHRONIZED_BIT, L);
__ stop("method needs synchronization");
__ bind(L);
diff --git a/src/hotspot/cpu/arm/templateTable_arm.cpp b/src/hotspot/cpu/arm/templateTable_arm.cpp
index 0974ff1f9a9..bbe5713090a 100644
--- a/src/hotspot/cpu/arm/templateTable_arm.cpp
+++ b/src/hotspot/cpu/arm/templateTable_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "gc/shared/collectedHeap.hpp"
diff --git a/src/hotspot/cpu/arm/upcallLinker_arm.cpp b/src/hotspot/cpu/arm/upcallLinker_arm.cpp
index 696b2001e6b..532ff7be8bc 100644
--- a/src/hotspot/cpu/arm/upcallLinker_arm.cpp
+++ b/src/hotspot/cpu/arm/upcallLinker_arm.cpp
@@ -21,7 +21,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "prims/upcallLinker.hpp"
#include "utilities/debug.hpp"
diff --git a/src/hotspot/cpu/arm/vmStructs_arm.hpp b/src/hotspot/cpu/arm/vmStructs_arm.hpp
index 4ce78d517e8..453938a824e 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 d3ba352f78b..148786a55da 100644
--- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp
+++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2023, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "jvm.h"
#include "memory/resourceArea.hpp"
diff --git a/src/hotspot/cpu/arm/vmreg_arm.cpp b/src/hotspot/cpu/arm/vmreg_arm.cpp
index c7c972db5c9..4ce1dd0be20 100644
--- a/src/hotspot/cpu/arm/vmreg_arm.cpp
+++ b/src/hotspot/cpu/arm/vmreg_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2022, 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
@@ -23,7 +23,6 @@
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "code/vmreg.hpp"
diff --git a/src/hotspot/cpu/arm/vtableStubs_arm.cpp b/src/hotspot/cpu/arm/vtableStubs_arm.cpp
index 8f453558848..2d7ccd1969b 100644
--- a/src/hotspot/cpu/arm/vtableStubs_arm.cpp
+++ b/src/hotspot/cpu/arm/vtableStubs_arm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
diff --git a/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp b/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp
index 56f8fce5ce9..beadce33637 100644
--- a/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp
+++ b/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "interpreter/interpreter.hpp"
#include "oops/constMethod.hpp"
#include "oops/klass.inline.hpp"
@@ -129,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.cpp b/src/hotspot/cpu/ppc/assembler_ppc.cpp
index 40c69dd2902..ab16fc437e9 100644
--- a/src/hotspot/cpu/ppc/assembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/assembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "gc/shared/cardTableBarrierSet.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
@@ -563,20 +562,20 @@ void Assembler::test_asm() {
li( R3, -4711);
// PPC 1, section 3.3.9, Fixed-Point Compare Instructions
- cmpi( CCR7, 0, R27, 4711);
- cmp( CCR0, 1, R14, R11);
- cmpli( CCR5, 1, R17, 45);
- cmpl( CCR3, 0, R9, R10);
+ cmpi( CR7, 0, R27, 4711);
+ cmp( CR0, 1, R14, R11);
+ cmpli( CR5, 1, R17, 45);
+ cmpl( CR3, 0, R9, R10);
- cmpwi( CCR7, R27, 4711);
- cmpw( CCR0, R14, R11);
- cmplwi( CCR5, R17, 45);
- cmplw( CCR3, R9, R10);
+ cmpwi( CR7, R27, 4711);
+ cmpw( CR0, R14, R11);
+ cmplwi( CR5, R17, 45);
+ cmplw( CR3, R9, R10);
- cmpdi( CCR7, R27, 4711);
- cmpd( CCR0, R14, R11);
- cmpldi( CCR5, R17, 45);
- cmpld( CCR3, R9, R10);
+ cmpdi( CR7, R27, 4711);
+ cmpd( CR0, R14, R11);
+ cmpldi( CR5, R17, 45);
+ cmpld( CR3, R9, R10);
// PPC 1, section 3.3.11, Fixed-Point Logical Instructions
andi_( R4, R5, 0xff);
@@ -716,23 +715,23 @@ void Assembler::test_asm() {
bcctr( 4, 6, 0);
bcctrl(4, 6, 0);
- blt(CCR0, lbl2);
- bgt(CCR1, lbl2);
- beq(CCR2, lbl2);
- bso(CCR3, lbl2);
- bge(CCR4, lbl2);
- ble(CCR5, lbl2);
- bne(CCR6, lbl2);
- bns(CCR7, lbl2);
+ blt(CR0, lbl2);
+ bgt(CR1, lbl2);
+ beq(CR2, lbl2);
+ bso(CR3, lbl2);
+ bge(CR4, lbl2);
+ ble(CR5, lbl2);
+ bne(CR6, lbl2);
+ bns(CR7, lbl2);
- bltl(CCR0, lbl2);
- bgtl(CCR1, lbl2);
- beql(CCR2, lbl2);
- bsol(CCR3, lbl2);
- bgel(CCR4, lbl2);
- blel(CCR5, lbl2);
- bnel(CCR6, lbl2);
- bnsl(CCR7, lbl2);
+ bltl(CR0, lbl2);
+ bgtl(CR1, lbl2);
+ beql(CR2, lbl2);
+ bsol(CR3, lbl2);
+ bgel(CR4, lbl2);
+ blel(CR5, lbl2);
+ bnel(CR6, lbl2);
+ bnsl(CR7, lbl2);
blr();
sync();
@@ -795,7 +794,7 @@ void Assembler::test_asm() {
fcfid( F22, F23);
// PPC 1, section 4.6.7 Floating-Point Compare Instructions
- fcmpu( CCR7, F24, F25);
+ fcmpu( CR7, F24, F25);
tty->print_cr("\ntest_asm disassembly (0x%lx 0x%lx):", p2i(code()->insts_begin()), p2i(code()->insts_end()));
code()->decode();
diff --git a/src/hotspot/cpu/ppc/assembler_ppc.hpp b/src/hotspot/cpu/ppc/assembler_ppc.hpp
index 68a0c78e7cf..b38c4ac5bae 100644
--- a/src/hotspot/cpu/ppc/assembler_ppc.hpp
+++ b/src/hotspot/cpu/ppc/assembler_ppc.hpp
@@ -294,6 +294,8 @@ class Assembler : public AbstractAssembler {
CLRRWI_OPCODE = RLWINM_OPCODE,
CLRLWI_OPCODE = RLWINM_OPCODE,
+ RLWNM_OPCODE = (23u << OPCODE_SHIFT),
+
RLWIMI_OPCODE = (20u << OPCODE_SHIFT),
SLW_OPCODE = (31u << OPCODE_SHIFT | 24u << 1),
@@ -424,6 +426,9 @@ class Assembler : public AbstractAssembler {
RLDIC_OPCODE = (30u << OPCODE_SHIFT | 2u << XO_27_29_SHIFT), // MD-FORM
RLDIMI_OPCODE = (30u << OPCODE_SHIFT | 3u << XO_27_29_SHIFT), // MD-FORM
+ RLDCL_OPCODE = (30u << OPCODE_SHIFT | 8u << 1),
+ RLDCR_OPCODE = (30u << OPCODE_SHIFT | 9u << 1),
+
SRADI_OPCODE = (31u << OPCODE_SHIFT | 413u << XO_21_29_SHIFT), // XS-FORM
SLD_OPCODE = (31u << OPCODE_SHIFT | 27u << 1), // X-FORM
@@ -539,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),
@@ -731,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
@@ -1696,6 +1710,14 @@ class Assembler : public AbstractAssembler {
inline void insrdi( Register a, Register s, int n, int b);
inline void insrwi( Register a, Register s, int n, int b);
+ // Rotate variable
+ inline void rlwnm( Register a, Register s, Register b, int mb, int me);
+ inline void rlwnm_(Register a, Register s, Register b, int mb, int me);
+ inline void rldcl( Register a, Register s, Register b, int mb);
+ inline void rldcl_(Register a, Register s, Register b, int mb);
+ inline void rldcr( Register a, Register s, Register b, int me);
+ inline void rldcr_(Register a, Register s, Register b, int me);
+
// PPC 1, section 3.3.2 Fixed-Point Load Instructions
// 4 bytes
inline void lwzx( Register d, Register s1, Register s2);
@@ -2321,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);
@@ -2345,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 eae75da9fbf..4fb8c5c4198 100644
--- a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
+++ b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2002, 2025, Oracle and/or its affiliates. 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
@@ -246,9 +246,9 @@ inline void Assembler::nop() { Assembler::ori(R0, R
// NOP for FP and BR units (different versions to allow them to be in one group)
inline void Assembler::fpnop0() { Assembler::fmr(F30, F30); }
inline void Assembler::fpnop1() { Assembler::fmr(F31, F31); }
-inline void Assembler::brnop0() { Assembler::mcrf(CCR2, CCR2); }
-inline void Assembler::brnop1() { Assembler::mcrf(CCR3, CCR3); }
-inline void Assembler::brnop2() { Assembler::mcrf(CCR4, CCR4); }
+inline void Assembler::brnop0() { Assembler::mcrf(CR2, CR2); }
+inline void Assembler::brnop1() { Assembler::mcrf(CR3, CR3); }
+inline void Assembler::brnop2() { Assembler::mcrf(CR4, CR4); }
inline void Assembler::mr( Register d, Register s) { Assembler::orr(d, s, s); }
inline void Assembler::ori_opt( Register d, int ui16) { if (ui16!=0) Assembler::ori( d, d, ui16); }
@@ -303,7 +303,7 @@ inline void Assembler::clrlsldi_(Register a, Register s, int clrl6, int shl6) {
inline void Assembler::extrdi( Register a, Register s, int n, int b){ Assembler::rldicl(a, s, b+n, 64-n); }
// testbit with condition register.
inline void Assembler::testbitdi(ConditionRegister cr, Register a, Register s, int ui6) {
- if (cr == CCR0) {
+ if (cr == CR0) {
Assembler::rldicr_(a, s, 63-ui6, 0);
} else {
Assembler::rldicr(a, s, 63-ui6, 0);
@@ -336,6 +336,13 @@ inline void Assembler::rldimi_( Register a, Register s, int sh6, int mb6)
inline void Assembler::insrdi( Register a, Register s, int n, int b) { Assembler::rldimi(a, s, 64-(b+n), b); }
inline void Assembler::insrwi( Register a, Register s, int n, int b) { Assembler::rlwimi(a, s, 32-(b+n), b, b+n-1); }
+inline void Assembler::rlwnm( Register a, Register s, Register b, int mb, int me) { emit_int32(RLWNM_OPCODE | rta(a) | rs(s) | rb(b) | mb2125(mb) | me2630(me) | rc(0)); }
+inline void Assembler::rlwnm_(Register a, Register s, Register b, int mb, int me) { emit_int32(RLWNM_OPCODE | rta(a) | rs(s) | rb(b) | mb2125(mb) | me2630(me) | rc(1)); }
+inline void Assembler::rldcl( Register a, Register s, Register b, int mb) { emit_int32(RLDCL_OPCODE | rta(a) | rs(s) | rb(b) | mb2126(mb) | rc(0)); }
+inline void Assembler::rldcl_( Register a, Register s, Register b, int mb) { emit_int32(RLDCL_OPCODE | rta(a) | rs(s) | rb(b) | mb2126(mb) | rc(1)); }
+inline void Assembler::rldcr( Register a, Register s, Register b, int me) { emit_int32(RLDCR_OPCODE | rta(a) | rs(s) | rb(b) | me2126(me) | rc(0)); }
+inline void Assembler::rldcr_( Register a, Register s, Register b, int me) { emit_int32(RLDCR_OPCODE | rta(a) | rs(s) | rb(b) | me2126(me) | rc(1)); }
+
// PPC 1, section 3.3.2 Fixed-Point Load Instructions
inline void Assembler::lwzx( Register d, Register s1, Register s2) { emit_int32(LWZX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));}
inline void Assembler::lwz( Register d, Address &a) {
@@ -866,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)); }
@@ -1069,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 4d3927dc644..d4f5faa29a8 100644
--- a/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1999, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_CodeStubs.hpp"
#include "c1/c1_FrameMap.hpp"
@@ -368,9 +367,9 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
__ mr(R0, _obj); // spill
__ ld(_obj, java_lang_Class::klass_offset(), _obj);
__ ld(_obj, in_bytes(InstanceKlass::init_thread_offset()), _obj);
- __ cmpd(CCR0, _obj, R16_thread);
+ __ cmpd(CR0, _obj, R16_thread);
__ mr(_obj, R0); // restore
- __ bne(CCR0, call_patch);
+ __ bne(CR0, call_patch);
// Load_klass patches may execute the patched code before it's
// copied back into place so we need to jump back into the main
diff --git a/src/hotspot/cpu/ppc/c1_Defs_ppc.hpp b/src/hotspot/cpu/ppc/c1_Defs_ppc.hpp
index 9044b9edd26..f322e548e21 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 84d180a9b03..00000000000
--- 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 a776dbcc4ef..e4684613e25 100644
--- a/src/hotspot/cpu/ppc/c1_FrameMap_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_FrameMap_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "c1/c1_FrameMap.hpp"
#include "c1/c1_LIR.hpp"
#include "runtime/sharedRuntime.hpp"
diff --git a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
index af426935b2f..c678f409c49 100644
--- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_Compilation.hpp"
#include "c1/c1_LIRAssembler.hpp"
@@ -49,7 +48,7 @@
#define __ _masm->
-const ConditionRegister LIR_Assembler::BOOL_RESULT = CCR5;
+const ConditionRegister LIR_Assembler::BOOL_RESULT = CR5;
bool LIR_Assembler::is_small_constant(LIR_Opr opr) {
@@ -157,8 +156,8 @@ void LIR_Assembler::osr_entry() {
{
Label L;
__ ld(R0, slot_offset + 1*BytesPerWord, OSR_buf);
- __ cmpdi(CCR0, R0, 0);
- __ bne(CCR0, L);
+ __ cmpdi(CR0, R0, 0);
+ __ bne(CR0, L);
__ stop("locked object is null");
__ bind(L);
}
@@ -411,11 +410,11 @@ void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right,
Label regular, done;
if (is_int) {
- __ cmpwi(CCR0, Rdivisor, -1);
+ __ cmpwi(CR0, Rdivisor, -1);
} else {
- __ cmpdi(CCR0, Rdivisor, -1);
+ __ cmpdi(CR0, Rdivisor, -1);
}
- __ bne(CCR0, regular);
+ __ bne(CR0, regular);
if (code == lir_idiv) {
__ neg(Rresult, Rdividend);
__ b(done);
@@ -598,14 +597,14 @@ void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
Address addr = dst_in_memory ? frame_map()->address_for_slot(dst->double_stack_ix()) : Address();
Label L;
// Result must be 0 if value is NaN; test by comparing value to itself.
- __ fcmpu(CCR0, rsrc, rsrc);
+ __ fcmpu(CR0, rsrc, rsrc);
if (dst_in_memory) {
__ li(R0, 0); // 0 in case of NAN
__ std(R0, addr);
} else {
__ li(dst->as_register(), 0);
}
- __ bso(CCR0, L);
+ __ bso(CR0, L);
__ fctiwz(rsrc, rsrc); // USE_KILL
if (dst_in_memory) {
__ stfd(rsrc, addr.disp(), addr.base());
@@ -622,14 +621,14 @@ void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
Address addr = dst_in_memory ? frame_map()->address_for_slot(dst->double_stack_ix()) : Address();
Label L;
// Result must be 0 if value is NaN; test by comparing value to itself.
- __ fcmpu(CCR0, rsrc, rsrc);
+ __ fcmpu(CR0, rsrc, rsrc);
if (dst_in_memory) {
__ li(R0, 0); // 0 in case of NAN
__ std(R0, addr);
} else {
__ li(dst->as_register_lo(), 0);
}
- __ bso(CCR0, L);
+ __ bso(CR0, L);
__ fctidz(rsrc, rsrc); // USE_KILL
if (dst_in_memory) {
__ stfd(rsrc, addr.disp(), addr.base());
@@ -1204,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());
@@ -1247,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();
@@ -1531,15 +1530,15 @@ void LIR_Assembler::comp_fl2i(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Op
if (code == lir_cmp_fd2i || code == lir_ucmp_fd2i) {
bool is_unordered_less = (code == lir_ucmp_fd2i);
if (left->is_single_fpu()) {
- __ fcmpu(CCR0, left->as_float_reg(), right->as_float_reg());
+ __ fcmpu(CR0, left->as_float_reg(), right->as_float_reg());
} else if (left->is_double_fpu()) {
- __ fcmpu(CCR0, left->as_double_reg(), right->as_double_reg());
+ __ fcmpu(CR0, left->as_double_reg(), right->as_double_reg());
} else {
ShouldNotReachHere();
}
__ set_cmpu3(Rdst, is_unordered_less); // is_unordered_less ? -1 : 1
} else if (code == lir_cmp_l2i) {
- __ cmpd(CCR0, left->as_register_lo(), right->as_register_lo());
+ __ cmpd(CR0, left->as_register_lo(), right->as_register_lo());
__ set_cmp3(Rdst); // set result as follows: <: -1, =: 0, >: 1
} else {
ShouldNotReachHere();
@@ -1618,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");
@@ -1894,8 +1893,8 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
__ add(src_pos, tmp, src_pos);
__ add(dst_pos, tmp, dst_pos);
- __ cmpwi(CCR0, R3_RET, 0);
- __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CCR0, Assembler::less), *stub->entry());
+ __ cmpwi(CR0, R3_RET, 0);
+ __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CR0, Assembler::less), *stub->entry());
__ bind(*stub->continuation());
return;
}
@@ -1911,12 +1910,12 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// Use only one conditional branch for simple checks.
if (simple_check_flag_set) {
- ConditionRegister combined_check = CCR1, tmp_check = CCR1;
+ ConditionRegister combined_check = CR1, tmp_check = CR1;
// Make sure src and dst are non-null.
if (flags & LIR_OpArrayCopy::src_null_check) {
__ cmpdi(combined_check, src, 0);
- tmp_check = CCR0;
+ tmp_check = CR0;
}
if (flags & LIR_OpArrayCopy::dst_null_check) {
@@ -1924,13 +1923,13 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
if (tmp_check != combined_check) {
__ cror(combined_check, Assembler::equal, tmp_check, Assembler::equal);
}
- tmp_check = CCR0;
+ tmp_check = CR0;
}
// Clear combined_check.eq if not already used.
if (tmp_check == combined_check) {
__ crandc(combined_check, Assembler::equal, combined_check, Assembler::equal);
- tmp_check = CCR0;
+ tmp_check = CR0;
}
if (flags & LIR_OpArrayCopy::src_pos_positive_check) {
@@ -1961,15 +1960,15 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
if (!(flags & LIR_OpArrayCopy::dst_objarray)) {
__ load_klass(tmp, dst);
__ lwz(tmp2, in_bytes(Klass::layout_helper_offset()), tmp);
- __ cmpwi(CCR0, tmp2, Klass::_lh_neutral_value);
- __ bge(CCR0, slow);
+ __ cmpwi(CR0, tmp2, Klass::_lh_neutral_value);
+ __ bge(CR0, slow);
}
if (!(flags & LIR_OpArrayCopy::src_objarray)) {
__ load_klass(tmp, src);
__ lwz(tmp2, in_bytes(Klass::layout_helper_offset()), tmp);
- __ cmpwi(CCR0, tmp2, Klass::_lh_neutral_value);
- __ bge(CCR0, slow);
+ __ cmpwi(CR0, tmp2, Klass::_lh_neutral_value);
+ __ bge(CR0, slow);
}
}
@@ -1980,16 +1979,16 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
if (flags & LIR_OpArrayCopy::src_range_check) {
__ lwz(tmp2, arrayOopDesc::length_offset_in_bytes(), src);
__ add(tmp, length, src_pos);
- __ cmpld(CCR0, tmp2, tmp);
- __ ble(CCR0, slow);
+ __ cmpld(CR0, tmp2, tmp);
+ __ ble(CR0, slow);
}
__ extsw(dst_pos, dst_pos);
if (flags & LIR_OpArrayCopy::dst_range_check) {
__ lwz(tmp2, arrayOopDesc::length_offset_in_bytes(), dst);
__ add(tmp, length, dst_pos);
- __ cmpld(CCR0, tmp2, tmp);
- __ ble(CCR0, slow);
+ __ cmpld(CR0, tmp2, tmp);
+ __ ble(CR0, slow);
}
int shift = shift_amount(basic_type);
@@ -2004,8 +2003,8 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// We don't know the array types are compatible.
if (basic_type != T_OBJECT) {
// Simple test for basic type arrays.
- __ cmp_klasses_from_objects(CCR0, src, dst, tmp, tmp2);
- __ beq(CCR0, cont);
+ __ cmp_klasses_from_objects(CR0, src, dst, tmp, tmp2);
+ __ beq(CR0, cont);
} else {
// For object arrays, if src is a sub class of dst then we can
// safely do the copy.
@@ -2025,7 +2024,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
__ calculate_address_from_global_toc(tmp, slow_stc, true, true, false);
__ mtctr(tmp);
__ bctrl(); // sets CR0
- __ beq(CCR0, cont);
+ __ beq(CR0, cont);
if (copyfunc_addr != nullptr) { // Use stub if available.
__ bind(copyfunc);
@@ -2045,8 +2044,8 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
jint objArray_lh = Klass::array_layout_helper(T_OBJECT);
__ load_const_optimized(tmp, objArray_lh);
- __ cmpw(CCR0, tmp, tmp2);
- __ bne(CCR0, slow);
+ __ cmpw(CR0, tmp, tmp2);
+ __ bne(CR0, slow);
}
Register src_ptr = R3_ARG1;
@@ -2081,8 +2080,8 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
#ifndef PRODUCT
if (PrintC1Statistics) {
Label failed;
- __ cmpwi(CCR0, R3_RET, 0);
- __ bne(CCR0, failed);
+ __ cmpwi(CR0, R3_RET, 0);
+ __ bne(CR0, failed);
address counter = (address)&Runtime1::_arraycopy_checkcast_cnt;
int simm16_offs = __ load_const_optimized(tmp, counter, tmp2, true);
__ lwz(R11_scratch1, simm16_offs, tmp);
@@ -2093,8 +2092,8 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
#endif
__ nand(tmp, R3_RET, R3_RET);
- __ cmpwi(CCR0, R3_RET, 0);
- __ beq(CCR0, *stub->continuation());
+ __ cmpwi(CR0, R3_RET, 0);
+ __ beq(CR0, *stub->continuation());
#ifndef PRODUCT
if (PrintC1Statistics) {
@@ -2127,15 +2126,15 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// but not necessarily exactly of type default_type.
Label known_ok, halt;
metadata2reg(default_type->constant_encoding(), tmp);
- __ cmp_klass(CCR0, dst, tmp, R11_scratch1, R12_scratch2);
+ __ cmp_klass(CR0, dst, tmp, R11_scratch1, R12_scratch2);
if (basic_type != T_OBJECT) {
- __ bne(CCR0, halt);
- __ cmp_klass(CCR0, src, tmp, R11_scratch1, R12_scratch2);
- __ beq(CCR0, known_ok);
+ __ bne(CR0, halt);
+ __ cmp_klass(CR0, src, tmp, R11_scratch1, R12_scratch2);
+ __ beq(CR0, known_ok);
} else {
- __ beq(CCR0, known_ok);
- __ cmpw(CCR0, src, dst);
- __ beq(CCR0, known_ok);
+ __ beq(CR0, known_ok);
+ __ cmpw(CR0, src, dst);
+ __ beq(CR0, known_ok);
}
__ bind(halt);
__ stop("incorrect type information in arraycopy");
@@ -2270,8 +2269,8 @@ void LIR_Assembler::emit_alloc_obj(LIR_OpAllocObj* op) {
__ lbz(op->tmp1()->as_register(),
in_bytes(InstanceKlass::init_state_offset()), op->klass()->as_register());
// acquire barrier included in membar_storestore() which follows the allocation immediately.
- __ cmpwi(CCR0, op->tmp1()->as_register(), InstanceKlass::fully_initialized);
- __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CCR0, Assembler::equal), *op->stub()->entry());
+ __ cmpwi(CR0, op->tmp1()->as_register(), InstanceKlass::fully_initialized);
+ __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CR0, Assembler::equal), *op->stub()->entry());
}
__ allocate_object(op->obj()->as_register(),
op->tmp1()->as_register(),
@@ -2318,8 +2317,8 @@ void LIR_Assembler::type_profile_helper(Register mdo, int mdo_offset_bias,
// See if the receiver is receiver[n].
__ ld(tmp1, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)) - mdo_offset_bias, mdo);
__ verify_klass_ptr(tmp1);
- __ cmpd(CCR0, recv, tmp1);
- __ bne(CCR0, next_test);
+ __ cmpd(CR0, recv, tmp1);
+ __ bne(CR0, next_test);
__ ld(tmp1, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)) - mdo_offset_bias, mdo);
__ addi(tmp1, tmp1, DataLayout::counter_increment);
@@ -2333,8 +2332,8 @@ void LIR_Assembler::type_profile_helper(Register mdo, int mdo_offset_bias,
for (i = 0; i < VirtualCallData::row_limit(); i++) {
Label next_test;
__ ld(tmp1, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)) - mdo_offset_bias, mdo);
- __ cmpdi(CCR0, tmp1, 0);
- __ bne(CCR0, next_test);
+ __ cmpdi(CR0, tmp1, 0);
+ __ bne(CR0, next_test);
__ li(tmp1, DataLayout::counter_increment);
__ std(recv, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)) - mdo_offset_bias, mdo);
__ std(tmp1, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)) - mdo_offset_bias, mdo);
@@ -2395,8 +2394,8 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
Label not_null;
metadata2reg(md->constant_encoding(), mdo);
__ add_const_optimized(mdo, mdo, mdo_offset_bias, R0);
- __ cmpdi(CCR0, obj, 0);
- __ bne(CCR0, not_null);
+ __ cmpdi(CR0, obj, 0);
+ __ bne(CR0, not_null);
__ lbz(data_val, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias, mdo);
__ ori(data_val, data_val, BitData::null_seen_byte_constant());
__ stb(data_val, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias, mdo);
@@ -2413,8 +2412,8 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
__ std(Rtmp1, slot_offset, mdo);
__ bind(update_done);
} else {
- __ cmpdi(CCR0, obj, 0);
- __ beq(CCR0, *obj_is_null);
+ __ cmpdi(CR0, obj, 0);
+ __ beq(CR0, *obj_is_null);
}
// get object class
@@ -2428,8 +2427,8 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
if (op->fast_check()) {
assert_different_registers(klass_RInfo, k_RInfo);
- __ cmpd(CCR0, k_RInfo, klass_RInfo);
- __ beq(CCR0, *success);
+ __ cmpd(CR0, k_RInfo, klass_RInfo);
+ __ beq(CR0, *success);
// Fall through to failure case.
} else {
bool need_slow_path = true;
@@ -2463,7 +2462,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
__ mtctr(original_Rtmp1);
__ bctrl(); // sets CR0
if (keep_obj_alive) { __ mr(obj, dst); }
- __ beq(CCR0, *success);
+ __ beq(CR0, *success);
// Fall through to failure case.
}
}
@@ -2502,8 +2501,8 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
Register data_val = Rtmp1;
metadata2reg(md->constant_encoding(), mdo);
__ add_const_optimized(mdo, mdo, mdo_offset_bias, R0);
- __ cmpdi(CCR0, value, 0);
- __ bne(CCR0, not_null);
+ __ cmpdi(CR0, value, 0);
+ __ bne(CR0, not_null);
__ lbz(data_val, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias, mdo);
__ ori(data_val, data_val, BitData::null_seen_byte_constant());
__ stb(data_val, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias, mdo);
@@ -2520,8 +2519,8 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
__ std(Rtmp1, slot_offset, mdo);
__ bind(update_done);
} else {
- __ cmpdi(CCR0, value, 0);
- __ beq(CCR0, done);
+ __ cmpdi(CR0, value, 0);
+ __ beq(CR0, done);
}
if (!os::zero_page_read_protected() || !ImplicitNullChecks) {
explicit_null_check(array, op->info_for_exception());
@@ -2544,7 +2543,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
__ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(slow_path));
__ mtctr(R0);
__ bctrl(); // sets CR0
- __ beq(CCR0, done);
+ __ beq(CR0, done);
__ bind(failure);
__ b(*stub->entry());
@@ -2840,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();
}
@@ -3025,9 +3027,9 @@ void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr
}
if (UseStaticBranchPredictionInCompareAndSwapPPC64) {
- __ bne_predict_not_taken(CCR0, Lretry);
+ __ bne_predict_not_taken(CR0, Lretry);
} else {
- __ bne( CCR0, Lretry);
+ __ bne( CR0, Lretry);
}
if (UseCompressedOops && data->is_oop()) {
@@ -3064,8 +3066,8 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
if (do_null) {
if (!TypeEntries::was_null_seen(current_klass)) {
- __ cmpdi(CCR0, obj, 0);
- __ bne(CCR0, Lupdate);
+ __ cmpdi(CR0, obj, 0);
+ __ bne(CR0, Lupdate);
__ ld(R0, index_or_disp(mdo_addr), mdo_addr->base()->as_pointer_register());
__ ori(R0, R0, TypeEntries::null_seen);
if (do_update) {
@@ -3075,14 +3077,14 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
}
} else {
if (do_update) {
- __ cmpdi(CCR0, obj, 0);
- __ beq(CCR0, Ldone);
+ __ cmpdi(CR0, obj, 0);
+ __ beq(CR0, Ldone);
}
}
#ifdef ASSERT
} else {
- __ cmpdi(CCR0, obj, 0);
- __ bne(CCR0, Lupdate);
+ __ cmpdi(CR0, obj, 0);
+ __ bne(CR0, Lupdate);
__ stop("unexpected null obj");
#endif
}
@@ -3098,8 +3100,8 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
klass_reg_used = true;
__ load_klass(klass, obj);
metadata2reg(exact_klass->constant_encoding(), R0);
- __ cmpd(CCR0, klass, R0);
- __ beq(CCR0, ok);
+ __ cmpd(CR0, klass, R0);
+ __ beq(CR0, ok);
__ stop("exact klass and actual klass differ");
__ bind(ok);
}
@@ -3119,20 +3121,20 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
// Like InterpreterMacroAssembler::profile_obj_type
__ clrrdi(R0, tmp, exact_log2(-TypeEntries::type_klass_mask));
// Basically same as andi(R0, tmp, TypeEntries::type_klass_mask);
- __ cmpd(CCR1, R0, klass);
+ __ cmpd(CR1, R0, klass);
// Klass seen before, nothing to do (regardless of unknown bit).
- //beq(CCR1, do_nothing);
+ //beq(CR1, do_nothing);
__ andi_(R0, tmp, TypeEntries::type_unknown);
// Already unknown. Nothing to do anymore.
- //bne(CCR0, do_nothing);
- __ crorc(CCR0, Assembler::equal, CCR1, Assembler::equal); // cr0 eq = cr1 eq or cr0 ne
- __ beq(CCR0, Lnext);
+ //bne(CR0, do_nothing);
+ __ crorc(CR0, Assembler::equal, CR1, Assembler::equal); // cr0 eq = cr1 eq or cr0 ne
+ __ beq(CR0, Lnext);
if (TypeEntries::is_type_none(current_klass)) {
__ clrrdi_(R0, tmp, exact_log2(-TypeEntries::type_mask));
__ orr(R0, klass, tmp); // Combine klass and null_seen bit (only used if (tmp & type_mask)==0).
- __ beq(CCR0, Ldo_update); // First time here. Set profile type.
+ __ beq(CR0, Ldo_update); // First time here. Set profile type.
}
} else {
@@ -3142,7 +3144,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
__ ld(tmp, index_or_disp(mdo_addr), mdo_addr->base()->as_pointer_register());
__ andi_(R0, tmp, TypeEntries::type_unknown);
// Already unknown. Nothing to do anymore.
- __ bne(CCR0, Lnext);
+ __ bne(CR0, Lnext);
}
// Different than before. Cannot keep accurate profile.
@@ -3158,14 +3160,14 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
__ clrrdi(R0, tmp, exact_log2(-TypeEntries::type_klass_mask));
// Basically same as andi(R0, tmp, TypeEntries::type_klass_mask);
- __ cmpd(CCR1, R0, klass);
+ __ cmpd(CR1, R0, klass);
// Klass seen before, nothing to do (regardless of unknown bit).
- __ beq(CCR1, Lnext);
+ __ beq(CR1, Lnext);
#ifdef ASSERT
{
Label ok;
__ clrrdi_(R0, tmp, exact_log2(-TypeEntries::type_mask));
- __ beq(CCR0, ok); // First time here.
+ __ beq(CR0, ok); // First time here.
__ stop("unexpected profiling mismatch");
__ bind(ok);
@@ -3179,7 +3181,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
// Already unknown. Nothing to do anymore.
__ andi_(R0, tmp, TypeEntries::type_unknown);
- __ bne(CCR0, Lnext);
+ __ bne(CR0, Lnext);
// Different than before. Cannot keep accurate profile.
__ ori(R0, tmp, TypeEntries::type_unknown);
diff --git a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
index b332ffbcee7..b9c8ced8ef1 100644
--- a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_Compilation.hpp"
#include "c1/c1_FrameMap.hpp"
@@ -702,8 +701,6 @@ void LIRGenerator::do_MathIntrinsic(Intrinsic* x) {
value.load_item();
LIR_Opr dst = rlock_result(x);
LIR_Opr tmp = new_register(T_FLOAT);
- // f2hf treats tmp as live_in. Workaround: initialize to some value.
- __ move(LIR_OprFact::floatConst(-0.0), tmp); // just to satisfy LinearScan
__ f2hf(value.result(), dst, tmp);
break;
}
@@ -1132,6 +1129,12 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
}
+// Intrinsic for Class::isInstance
+address LIRGenerator::isInstance_entry() {
+ return Runtime1::entry_for(C1StubId::is_instance_of_id);
+}
+
+
void LIRGenerator::do_If(If* x) {
assert(x->number_of_sux() == 2, "inconsistency");
ValueTag tag = x->x()->type()->tag();
diff --git a/src/hotspot/cpu/ppc/c1_LIR_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIR_ppc.cpp
index d031aaa1e40..56a9307f21f 100644
--- a/src/hotspot/cpu/ppc/c1_LIR_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_LIR_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/register.hpp"
#include "c1/c1_LIR.hpp"
diff --git a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
index 8cd21478d41..ac9c5984de0 100644
--- a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1999, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
@@ -87,8 +86,8 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
if (DiagnoseSyncOnValueBasedClasses != 0) {
load_klass(Rscratch, Roop);
lbz(Rscratch, in_bytes(Klass::misc_flags_offset()), Rscratch);
- testbitdi(CCR0, R0, Rscratch, exact_log2(KlassFlags::_misc_is_value_based_class));
- bne(CCR0, slow_int);
+ testbitdi(CR0, R0, Rscratch, exact_log2(KlassFlags::_misc_is_value_based_class));
+ bne(CR0, slow_int);
}
if (LockingMode == LM_LIGHTWEIGHT) {
@@ -102,7 +101,7 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
// Compare object markWord with Rmark and if equal exchange Rscratch with object markWord.
assert(oopDesc::mark_offset_in_bytes() == 0, "cas must take a zero displacement");
- cmpxchgd(/*flag=*/CCR0,
+ cmpxchgd(/*flag=*/CR0,
/*current_value=*/Rscratch,
/*compare_value=*/Rmark,
/*exchange_value=*/Rbox,
@@ -129,7 +128,7 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
load_const_optimized(R0, (~(os::vm_page_size()-1) | markWord::lock_mask_in_place));
and_(R0/*==0?*/, Rscratch, R0);
std(R0/*==0, perhaps*/, BasicLock::displaced_header_offset_in_bytes(), Rbox);
- bne(CCR0, slow_int);
+ bne(CR0, slow_int);
}
bind(done);
@@ -150,8 +149,8 @@ void C1_MacroAssembler::unlock_object(Register Rmark, Register Roop, Register Rb
if (LockingMode != LM_LIGHTWEIGHT) {
// Test first if it is a fast recursive unlock.
ld(Rmark, BasicLock::displaced_header_offset_in_bytes(), Rbox);
- cmpdi(CCR0, Rmark, 0);
- beq(CCR0, done);
+ cmpdi(CR0, Rmark, 0);
+ beq(CR0, done);
}
// Load object.
@@ -163,7 +162,7 @@ void C1_MacroAssembler::unlock_object(Register Rmark, Register Roop, Register Rb
} else if (LockingMode == LM_LEGACY) {
// Check if it is still a light weight lock, this is is true if we see
// the stack address of the basicLock in the markWord of the object.
- cmpxchgd(/*flag=*/CCR0,
+ cmpxchgd(/*flag=*/CR0,
/*current_value=*/R0,
/*compare_value=*/Rbox,
/*exchange_value=*/Rmark,
@@ -286,9 +285,9 @@ void C1_MacroAssembler::initialize_object(
{
lwz(t1, in_bytes(Klass::layout_helper_offset()), klass);
if (var_size_in_bytes != noreg) {
- cmpw(CCR0, t1, var_size_in_bytes);
+ cmpw(CR0, t1, var_size_in_bytes);
} else {
- cmpwi(CCR0, t1, con_size_in_bytes);
+ cmpwi(CR0, t1, con_size_in_bytes);
}
asm_assert_eq("bad size in initialize_object");
}
@@ -341,8 +340,8 @@ void C1_MacroAssembler::allocate_array(
if (max_tlab < max_length) { max_length = max_tlab; }
}
load_const_optimized(t1, max_length);
- cmpld(CCR0, len, t1);
- bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::greater), slow_case);
+ cmpld(CR0, len, t1);
+ bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::greater), slow_case);
// compute array size
// note: If 0 <= len <= max_length, len*elt_size + header + alignment is
@@ -400,8 +399,8 @@ void C1_MacroAssembler::verify_stack_oop(int stack_offset) {
void C1_MacroAssembler::verify_not_null_oop(Register r) {
Label not_null;
- cmpdi(CCR0, r, 0);
- bne(CCR0, not_null);
+ cmpdi(CR0, r, 0);
+ bne(CR0, not_null);
stop("non-null oop required");
bind(not_null);
verify_oop(r, FILE_AND_LINE);
@@ -415,7 +414,7 @@ void C1_MacroAssembler::null_check(Register r, Label* Lnull) {
} else { // explicit
//const address exception_entry = Runtime1::entry_for(C1StubId::throw_null_pointer_exception_id);
assert(Lnull != nullptr, "must have Label for explicit check");
- cmpdi(CCR0, r, 0);
- bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::equal), *Lnull);
+ cmpdi(CR0, r, 0);
+ bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::equal), *Lnull);
}
}
diff --git a/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp b/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp
index 47cafc45f33..11c01dcdc60 100644
--- a/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2023 SAP SE. All rights reserved.
+ * Copyright (c) 1999, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_Defs.hpp"
#include "c1/c1_MacroAssembler.hpp"
@@ -70,14 +69,14 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result,
// Check for pending exceptions.
{
ld(R0, in_bytes(Thread::pending_exception_offset()), R16_thread);
- cmpdi(CCR0, R0, 0);
+ cmpdi(CR0, R0, 0);
// This used to conditionally jump to forward_exception however it is
// possible if we relocate that the branch will not reach. So we must jump
// around so we can always reach.
Label ok;
- beq(CCR0, ok);
+ beq(CR0, ok);
// Make sure that the vm_results are cleared.
if (oop_result1->is_valid() || metadata_result->is_valid()) {
@@ -369,7 +368,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
int call_offset = __ call_RT(noreg, noreg, target);
OopMapSet* oop_maps = new OopMapSet();
oop_maps->add_gc_map(call_offset, oop_map);
- __ cmpdi(CCR0, R3_RET, 0);
+ __ cmpdi(CR0, R3_RET, 0);
// Re-execute the patched instruction or, if the nmethod was deoptmized,
// return to the deoptimization handler entry that will cause re-execution
@@ -383,7 +382,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
restore_live_registers(sasm, noreg, noreg);
// Return if patching routine returned 0.
- __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CCR0, Assembler::equal), Assembler::bhintbhBCLRisReturn);
+ __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CR0, Assembler::equal), Assembler::bhintbhBCLRisReturn);
address stub = deopt_blob->unpack_with_reexecution();
//__ load_const_optimized(R0, stub);
@@ -449,8 +448,8 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
Label ok;
__ lwz(R0, in_bytes(Klass::layout_helper_offset()), R4_ARG2);
__ srawi(R0, R0, Klass::_lh_array_tag_shift);
- __ cmpwi(CCR0, R0, tag);
- __ beq(CCR0, ok);
+ __ cmpwi(CR0, R0, tag);
+ __ beq(CR0, ok);
__ stop("assert(is an array klass)");
__ should_not_reach_here();
__ bind(ok);
@@ -486,9 +485,9 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
// Load the klass and check the has finalizer flag.
__ load_klass(t, R3_ARG1);
__ lbz(t, in_bytes(Klass::misc_flags_offset()), t);
- __ testbitdi(CCR0, R0, t, exact_log2(KlassFlags::_misc_has_finalizer));
+ __ testbitdi(CR0, R0, t, exact_log2(KlassFlags::_misc_has_finalizer));
// Return if has_finalizer bit == 0 (CR0.eq).
- __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CCR0, Assembler::equal), Assembler::bhintbhBCLRisReturn);
+ __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CR0, Assembler::equal), Assembler::bhintbhBCLRisReturn);
__ mflr(R0);
__ std(R0, _abi0(lr), R1_SP);
@@ -603,10 +602,76 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
{ // Support for uint StubRoutine::partial_subtype_check( Klass sub, Klass super );
const Register sub_klass = R5,
super_klass = R4,
- temp1_reg = R6,
- temp2_reg = R0;
- __ check_klass_subtype_slow_path(sub_klass, super_klass, temp1_reg, temp2_reg); // returns with CR0.eq if successful
- __ crandc(CCR0, Assembler::equal, CCR0, Assembler::equal); // failed: CR0.ne
+ temp1_reg = R6;
+ __ check_klass_subtype_slow_path(sub_klass, super_klass, temp1_reg, noreg);
+ // Result is in CR0.
+ __ blr();
+ }
+ 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;
@@ -807,10 +872,10 @@ OopMapSet* Runtime1::generate_handle_exception(C1StubId id, StubAssembler* sasm)
// Check that fields in JavaThread for exception oop and issuing pc are
// empty before writing to them.
__ ld(R0, in_bytes(JavaThread::exception_oop_offset()), R16_thread);
- __ cmpdi(CCR0, R0, 0);
+ __ cmpdi(CR0, R0, 0);
__ asm_assert_eq("exception oop already set");
__ ld(R0, in_bytes(JavaThread::exception_pc_offset() ), R16_thread);
- __ cmpdi(CCR0, R0, 0);
+ __ cmpdi(CR0, R0, 0);
__ asm_assert_eq("exception pc already set");
#endif
diff --git a/src/hotspot/cpu/ppc/c2_CodeStubs_ppc.cpp b/src/hotspot/cpu/ppc/c2_CodeStubs_ppc.cpp
index 93ee0659a57..484e0fd0196 100644
--- a/src/hotspot/cpu/ppc/c2_CodeStubs_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c2_CodeStubs_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2022, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "opto/c2_MacroAssembler.hpp"
#include "opto/c2_CodeStubs.hpp"
#include "runtime/sharedRuntime.hpp"
diff --git a/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp
index d7f2aefd9c4..cddf08eceb1 100644
--- a/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp
@@ -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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "opto/c2_MacroAssembler.hpp"
@@ -71,7 +70,7 @@ void C2_MacroAssembler::string_compress_16(Register src, Register dst, Register
// Check if cnt >= 8 (= 16 bytes)
lis(tmp1, byte_mask); // tmp1 = 0x00FF00FF00FF00FF (non ascii case)
srwi_(tmp2, cnt, 3);
- beq(CCR0, Lslow);
+ beq(CR0, Lslow);
ori(tmp1, tmp1, byte_mask);
rldimi(tmp1, tmp1, 32, 0);
mtctr(tmp2);
@@ -88,7 +87,7 @@ void C2_MacroAssembler::string_compress_16(Register src, Register dst, Register
rldimi(tmp4, tmp4, 2*8, 2*8); // _4_6_7_7
andc_(tmp0, tmp0, tmp1);
- bne(CCR0, Lfailure); // Not latin1/ascii.
+ bne(CR0, Lfailure); // Not latin1/ascii.
addi(src, src, 16);
rlwimi(tmp3, tmp2, 0*8, 24, 31);// _____1_3
@@ -116,8 +115,8 @@ void C2_MacroAssembler::string_compress(Register src, Register dst, Register cnt
bind(Lloop);
lhz(tmp, 0, src);
- cmplwi(CCR0, tmp, byte_mask);
- bgt(CCR0, Lfailure); // Not latin1/ascii.
+ cmplwi(CR0, tmp, byte_mask);
+ bgt(CR0, Lfailure); // Not latin1/ascii.
addi(src, src, 2);
stb(tmp, 0, dst);
addi(dst, dst, 1);
@@ -131,7 +130,7 @@ void C2_MacroAssembler::encode_iso_array(Register src, Register dst, Register le
string_compress_16(src, dst, len, tmp1, tmp2, tmp3, tmp4, tmp5, Lfailure1, ascii);
rldicl_(result, len, 0, 64-3); // Remaining characters.
- beq(CCR0, Ldone);
+ beq(CR0, Ldone);
bind(Lslow);
string_compress(src, dst, result, tmp2, Lfailure2, ascii);
li(result, 0);
@@ -141,7 +140,7 @@ void C2_MacroAssembler::encode_iso_array(Register src, Register dst, Register le
mr(result, len);
mfctr(tmp1);
rldimi_(result, tmp1, 3, 0); // Remaining characters.
- beq(CCR0, Ldone);
+ beq(CR0, Ldone);
b(Lslow);
bind(Lfailure2);
@@ -160,7 +159,7 @@ void C2_MacroAssembler::string_inflate_16(Register src, Register dst, Register c
// Check if cnt >= 8
srwi_(tmp2, cnt, 3);
- beq(CCR0, Lslow);
+ beq(CR0, Lslow);
lis(tmp1, 0xFF); // tmp1 = 0x00FF00FF
ori(tmp1, tmp1, 0xFF);
mtctr(tmp2);
@@ -236,10 +235,10 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
subf_(diff, cnt2, cnt1); // diff = cnt1 - cnt2
// if (diff > 0) { cnt1 = cnt2; }
if (VM_Version::has_isel()) {
- isel(cnt1, CCR0, Assembler::greater, /*invert*/ false, cnt2);
+ isel(cnt1, CR0, Assembler::greater, /*invert*/ false, cnt2);
} else {
Label Lskip;
- blt(CCR0, Lskip);
+ blt(CR0, Lskip);
mr(cnt1, cnt2);
bind(Lskip);
}
@@ -255,7 +254,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
Label Lfastloop, Lskipfast;
srwi_(tmp0, cnt1, log2_chars_per_iter);
- beq(CCR0, Lskipfast);
+ beq(CR0, Lskipfast);
rldicl(cnt2, cnt1, 0, 64 - log2_chars_per_iter); // Remaining characters.
li(cnt1, 1 << log2_chars_per_iter); // Initialize for failure case: Rescan characters from current iteration.
mtctr(tmp0);
@@ -263,8 +262,8 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
bind(Lfastloop);
ld(chr1, 0, str1);
ld(chr2, 0, str2);
- cmpd(CCR0, chr1, chr2);
- bne(CCR0, Lslow);
+ cmpd(CR0, chr1, chr2);
+ bne(CR0, Lslow);
addi(str1, str1, stride1);
addi(str2, str2, stride2);
bdnz(Lfastloop);
@@ -273,8 +272,8 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
}
// Loop which searches the first difference character by character.
- cmpwi(CCR0, cnt1, 0);
- beq(CCR0, Lreturn_diff);
+ cmpwi(CR0, cnt1, 0);
+ beq(CR0, Lreturn_diff);
bind(Lslow);
mtctr(cnt1);
@@ -290,7 +289,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
if (stride1 == 1) { lbz(chr1, 0, str1); } else { lhz(chr1, 0, str1); }
if (stride2 == 1) { lbz(chr2, 0, str2); } else { lhz(chr2, 0, str2); }
subf_(result, chr2, chr1); // result = chr1 - chr2
- bne(CCR0, Ldone);
+ bne(CR0, Ldone);
addi(str1, str1, stride1);
addi(str2, str2, stride2);
bdnz(Lloop);
@@ -318,23 +317,23 @@ void C2_MacroAssembler::array_equals(bool is_array_equ, Register ary1, Register
const int base_offset = arrayOopDesc::base_offset_in_bytes(is_byte ? T_BYTE : T_CHAR);
// Return true if the same array.
- cmpd(CCR0, ary1, ary2);
- beq(CCR0, Lskiploop);
+ cmpd(CR0, ary1, ary2);
+ beq(CR0, Lskiploop);
// Return false if one of them is null.
- cmpdi(CCR0, ary1, 0);
- cmpdi(CCR1, ary2, 0);
+ cmpdi(CR0, ary1, 0);
+ cmpdi(CR1, ary2, 0);
li(result, 0);
- cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
- beq(CCR0, Ldone);
+ cror(CR0, Assembler::equal, CR1, Assembler::equal);
+ beq(CR0, Ldone);
// Load the lengths of arrays.
lwz(limit, length_offset, ary1);
lwz(tmp0, length_offset, ary2);
// Return false if the two arrays are not equal length.
- cmpw(CCR0, limit, tmp0);
- bne(CCR0, Ldone);
+ cmpw(CR0, limit, tmp0);
+ bne(CR0, Ldone);
// Load array addresses.
addi(ary1, ary1, base_offset);
@@ -352,7 +351,7 @@ void C2_MacroAssembler::array_equals(bool is_array_equ, Register ary1, Register
const int log2_chars_per_iter = is_byte ? 3 : 2;
srwi_(tmp0, limit, log2_chars_per_iter + (limit_needs_shift ? 1 : 0));
- beq(CCR0, Lskipfast);
+ beq(CR0, Lskipfast);
mtctr(tmp0);
bind(Lfastloop);
@@ -360,13 +359,13 @@ void C2_MacroAssembler::array_equals(bool is_array_equ, Register ary1, Register
ld(chr2, 0, ary2);
addi(ary1, ary1, 8);
addi(ary2, ary2, 8);
- cmpd(CCR0, chr1, chr2);
- bne(CCR0, Ldone);
+ cmpd(CR0, chr1, chr2);
+ bne(CR0, Ldone);
bdnz(Lfastloop);
bind(Lskipfast);
rldicl_(limit, limit, limit_needs_shift ? 64 - 1 : 0, 64 - log2_chars_per_iter); // Remaining characters.
- beq(CCR0, Lskiploop);
+ beq(CR0, Lskiploop);
mtctr(limit);
// Character by character.
@@ -382,8 +381,8 @@ void C2_MacroAssembler::array_equals(bool is_array_equ, Register ary1, Register
addi(ary1, ary1, 2);
addi(ary2, ary2, 2);
}
- cmpw(CCR0, chr1, chr2);
- bne(CCR0, Ldone);
+ cmpw(CR0, chr1, chr2);
+ bne(CR0, Ldone);
bdnz(Lloop);
bind(Lskiploop);
@@ -415,9 +414,9 @@ void C2_MacroAssembler::string_indexof(Register result, Register haystack, Regis
clrldi(haycnt, haycnt, 32); // Ensure positive int is valid as 64 bit value.
addi(addr, haystack, -h_csize); // Accesses use pre-increment.
if (needlecntval == 0) { // variable needlecnt
- cmpwi(CCR6, needlecnt, 2);
+ cmpwi(CR6, needlecnt, 2);
clrldi(needlecnt, needlecnt, 32); // Ensure positive int is valid as 64 bit value.
- blt(CCR6, L_TooShort); // Variable needlecnt: handle short needle separately.
+ blt(CR6, L_TooShort); // Variable needlecnt: handle short needle separately.
}
if (n_csize == 2) { lwz(n_start, 0, needle); } else { lhz(n_start, 0, needle); } // Load first 2 characters of needle.
@@ -448,7 +447,7 @@ void C2_MacroAssembler::string_indexof(Register result, Register haystack, Regis
subf(addr_diff, addr, last_addr); // Difference between already checked address and last address to check.
addi(addr, addr, h_csize); // This is the new address we want to use for comparing.
srdi_(ch2, addr_diff, h_csize);
- beq(CCR0, L_FinalCheck); // 2 characters left?
+ beq(CR0, L_FinalCheck); // 2 characters left?
mtctr(ch2); // num of characters / 2
bind(L_InnerLoop); // Main work horse (2x unrolled search loop)
if (h_csize == 2) { // Load 2 characters of haystack (ignore alignment).
@@ -458,18 +457,18 @@ void C2_MacroAssembler::string_indexof(Register result, Register haystack, Regis
lhz(ch1, 0, addr);
lhz(ch2, 1, addr);
}
- cmpw(CCR0, ch1, n_start); // Compare 2 characters (1 would be sufficient but try to reduce branches to CompLoop).
- cmpw(CCR1, ch2, n_start);
- beq(CCR0, L_Comp1); // Did we find the needle start?
- beq(CCR1, L_Comp2);
+ cmpw(CR0, ch1, n_start); // Compare 2 characters (1 would be sufficient but try to reduce branches to CompLoop).
+ cmpw(CR1, ch2, n_start);
+ beq(CR0, L_Comp1); // Did we find the needle start?
+ beq(CR1, L_Comp2);
addi(addr, addr, 2 * h_csize);
bdnz(L_InnerLoop);
bind(L_FinalCheck);
andi_(addr_diff, addr_diff, h_csize); // Remaining characters not covered by InnerLoop: (num of characters) & 1.
- beq(CCR0, L_NotFound);
+ beq(CR0, L_NotFound);
if (h_csize == 2) { lwz(ch1, 0, addr); } else { lhz(ch1, 0, addr); } // One position left at which we have to compare.
- cmpw(CCR1, ch1, n_start);
- beq(CCR1, L_Comp1);
+ cmpw(CR1, ch1, n_start);
+ beq(CR1, L_Comp1);
bind(L_NotFound);
li(result, -1); // not found
b(L_End);
@@ -484,8 +483,8 @@ void C2_MacroAssembler::string_indexof(Register result, Register haystack, Regis
if (n_csize == 2) { lhz(n_start, 0, needle); } else { lbz(n_start, 0, needle); } // First character of needle
bind(L_OneCharLoop);
if (h_csize == 2) { lhzu(ch1, 2, addr); } else { lbzu(ch1, 1, addr); }
- cmpw(CCR1, ch1, n_start);
- beq(CCR1, L_Found); // Did we find the one character needle?
+ cmpw(CR1, ch1, n_start);
+ beq(CR1, L_Found); // Did we find the one character needle?
bdnz(L_OneCharLoop);
li(result, -1); // Not found.
b(L_End);
@@ -501,7 +500,7 @@ void C2_MacroAssembler::string_indexof(Register result, Register haystack, Regis
bind(L_Comp1); // Addr points to possible needle start.
if (needlecntval != 2) { // Const needlecnt==2?
if (needlecntval != 3) {
- if (needlecntval == 0) { beq(CCR6, L_Found); } // Variable needlecnt==2?
+ if (needlecntval == 0) { beq(CR6, L_Found); } // Variable needlecnt==2?
Register n_ind = tmp4,
h_ind = n_ind;
li(n_ind, 2 * n_csize); // First 2 characters are already compared, use index 2.
@@ -514,15 +513,15 @@ void C2_MacroAssembler::string_indexof(Register result, Register haystack, Regis
}
if (n_csize == 2) { lhzx(ch2, needle, n_ind); } else { lbzx(ch2, needle, n_ind); }
if (h_csize == 2) { lhzx(ch1, addr, h_ind); } else { lbzx(ch1, addr, h_ind); }
- cmpw(CCR1, ch1, ch2);
- bne(CCR1, L_OuterLoop);
+ cmpw(CR1, ch1, ch2);
+ bne(CR1, L_OuterLoop);
addi(n_ind, n_ind, n_csize);
bdnz(L_CompLoop);
} else { // No loop required if there's only one needle character left.
if (n_csize == 2) { lhz(ch2, 2 * 2, needle); } else { lbz(ch2, 2 * 1, needle); }
if (h_csize == 2) { lhz(ch1, 2 * 2, addr); } else { lbz(ch1, 2 * 1, addr); }
- cmpw(CCR1, ch1, ch2);
- bne(CCR1, L_OuterLoop);
+ cmpw(CR1, ch1, ch2);
+ bne(CR1, L_OuterLoop);
}
}
// Return index ...
@@ -546,7 +545,7 @@ void C2_MacroAssembler::string_indexof_char(Register result, Register haystack,
//4:
srwi_(tmp2, haycnt, 1); // Shift right by exact_log2(UNROLL_FACTOR).
mr(addr, haystack);
- beq(CCR0, L_FinalCheck);
+ beq(CR0, L_FinalCheck);
mtctr(tmp2); // Move to count register.
//8:
bind(L_InnerLoop); // Main work horse (2x unrolled search loop).
@@ -557,19 +556,19 @@ void C2_MacroAssembler::string_indexof_char(Register result, Register haystack,
lbz(ch1, 0, addr);
lbz(ch2, 1, addr);
}
- (needle != R0) ? cmpw(CCR0, ch1, needle) : cmplwi(CCR0, ch1, (unsigned int)needleChar);
- (needle != R0) ? cmpw(CCR1, ch2, needle) : cmplwi(CCR1, ch2, (unsigned int)needleChar);
- beq(CCR0, L_Found1); // Did we find the needle?
- beq(CCR1, L_Found2);
+ (needle != R0) ? cmpw(CR0, ch1, needle) : cmplwi(CR0, ch1, (unsigned int)needleChar);
+ (needle != R0) ? cmpw(CR1, ch2, needle) : cmplwi(CR1, ch2, (unsigned int)needleChar);
+ beq(CR0, L_Found1); // Did we find the needle?
+ beq(CR1, L_Found2);
addi(addr, addr, 2 * h_csize);
bdnz(L_InnerLoop);
//16:
bind(L_FinalCheck);
andi_(R0, haycnt, 1);
- beq(CCR0, L_NotFound);
+ beq(CR0, L_NotFound);
if (!is_byte) { lhz(ch1, 0, addr); } else { lbz(ch1, 0, addr); } // One position left at which we have to compare.
- (needle != R0) ? cmpw(CCR1, ch1, needle) : cmplwi(CCR1, ch1, (unsigned int)needleChar);
- beq(CCR1, L_Found1);
+ (needle != R0) ? cmpw(CR1, ch1, needle) : cmplwi(CR1, ch1, (unsigned int)needleChar);
+ beq(CR1, L_Found1);
//21:
bind(L_NotFound);
li(result, -1); // Not found.
@@ -595,7 +594,7 @@ void C2_MacroAssembler::count_positives(Register src, Register cnt, Register res
lis(tmp1, (int)(short)0x8080); // tmp1 = 0x8080808080808080
srwi_(tmp2, cnt, 4);
mr(result, src); // Use result reg to point to the current position.
- beq(CCR0, Lslow);
+ beq(CR0, Lslow);
ori(tmp1, tmp1, 0x8080);
rldimi(tmp1, tmp1, 32, 0);
mtctr(tmp2);
@@ -608,19 +607,19 @@ void C2_MacroAssembler::count_positives(Register src, Register cnt, Register res
orr(tmp0, tmp2, tmp0);
and_(tmp0, tmp0, tmp1);
- bne(CCR0, Lslow); // Found negative byte.
+ bne(CR0, Lslow); // Found negative byte.
addi(result, result, 16);
bdnz(Lfastloop);
bind(Lslow); // Fallback to slow version.
subf(tmp0, src, result); // Bytes known positive.
subf_(tmp0, tmp0, cnt); // Remaining Bytes.
- beq(CCR0, Ldone);
+ beq(CR0, Ldone);
mtctr(tmp0);
bind(Lloop);
lbz(tmp0, 0, result);
andi_(tmp0, tmp0, 0x80);
- bne(CCR0, Ldone); // Found negative byte.
+ bne(CR0, Ldone); // Found negative byte.
addi(result, result, 1);
bdnz(Lloop);
diff --git a/src/hotspot/cpu/ppc/c2_init_ppc.cpp b/src/hotspot/cpu/ppc/c2_init_ppc.cpp
index d570abc431a..3c524f3b80e 100644
--- a/src/hotspot/cpu/ppc/c2_init_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c2_init_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "opto/compile.hpp"
#include "opto/node.hpp"
#include "runtime/globals.hpp"
diff --git a/src/hotspot/cpu/ppc/compiledIC_ppc.cpp b/src/hotspot/cpu/ppc/compiledIC_ppc.cpp
index a7907b43c4b..8a29da66436 100644
--- a/src/hotspot/cpu/ppc/compiledIC_ppc.cpp
+++ b/src/hotspot/cpu/ppc/compiledIC_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,16 +23,12 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "code/nmethod.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
-#ifdef COMPILER2
-#include "opto/matcher.hpp"
-#endif
// ----------------------------------------------------------------------------
@@ -79,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();
@@ -109,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
@@ -135,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/compressedKlass_ppc.cpp b/src/hotspot/cpu/ppc/compressedKlass_ppc.cpp
index 51012eef865..060eb058cfa 100644
--- a/src/hotspot/cpu/ppc/compressedKlass_ppc.cpp
+++ b/src/hotspot/cpu/ppc/compressedKlass_ppc.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2023, Red Hat, Inc. All rights reserved.
- * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "oops/compressedKlass.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp b/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp
index 45859f33bfb..f12d25ac611 100644
--- a/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp
+++ b/src/hotspot/cpu/ppc/downcallLinker_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2020, 2024 SAP SE. All rights reserved.
- * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2025 SAP SE. 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
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/codeBlob.hpp"
#include "code/codeCache.hpp"
@@ -78,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);
}
@@ -175,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);
}
@@ -283,8 +280,8 @@ void DowncallLinker::StubGenerator::generate() {
__ safepoint_poll(L_safepoint_poll_slow_path, tmp, true /* at_return */, false /* in_nmethod */);
__ lwz(tmp, in_bytes(JavaThread::suspend_flags_offset()), R16_thread);
- __ cmpwi(CCR0, tmp, 0);
- __ bne(CCR0, L_safepoint_poll_slow_path);
+ __ cmpwi(CR0, tmp, 0);
+ __ bne(CR0, L_safepoint_poll_slow_path);
__ bind(L_after_safepoint_poll);
// change thread state
@@ -294,8 +291,8 @@ void DowncallLinker::StubGenerator::generate() {
__ block_comment("reguard stack check");
__ lwz(tmp, in_bytes(JavaThread::stack_guard_state_offset()), R16_thread);
- __ cmpwi(CCR0, tmp, StackOverflow::stack_guard_yellow_reserved_disabled);
- __ beq(CCR0, L_reguard);
+ __ cmpwi(CR0, tmp, StackOverflow::stack_guard_yellow_reserved_disabled);
+ __ beq(CR0, L_reguard);
__ bind(L_after_reguard);
__ reset_last_Java_frame();
diff --git a/src/hotspot/cpu/ppc/foreignGlobals_ppc.cpp b/src/hotspot/cpu/ppc/foreignGlobals_ppc.cpp
index 2143d139499..4d98b763078 100644
--- a/src/hotspot/cpu/ppc/foreignGlobals_ppc.cpp
+++ b/src/hotspot/cpu/ppc/foreignGlobals_ppc.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, 2023, SAP SE. All rights reserved.
- * 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
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/vmreg.inline.hpp"
#include "runtime/jniHandles.hpp"
diff --git a/src/hotspot/cpu/ppc/frame_ppc.cpp b/src/hotspot/cpu/ppc/frame_ppc.cpp
index f698b14d312..6b6a792117d 100644
--- a/src/hotspot/cpu/ppc/frame_ppc.cpp
+++ b/src/hotspot/cpu/ppc/frame_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "compiler/oopMap.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/resourceArea.hpp"
@@ -122,6 +121,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
address sender_pc = (address) sender_abi->lr;
if (Continuation::is_return_barrier_entry(sender_pc)) {
+ // sender_pc might be invalid so check that the frame
+ // actually belongs to a Continuation.
+ if (!Continuation::is_frame_in_continuation(thread, *this)) {
+ return false;
+ }
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
frame s = Continuation::continuation_bottom_sender(thread, *this, sender_sp);
sender_sp = s.sp();
@@ -191,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/g1/g1BarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp
index 39693bdf925..4fb13422f59 100644
--- a/src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2018, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/g1/g1BarrierSet.hpp"
#include "gc/g1/g1BarrierSetAssembler.hpp"
@@ -52,7 +51,7 @@ static void generate_marking_inactive_test(MacroAssembler* masm) {
int active_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
__ lbz(R0, active_offset, R16_thread); // tmp1 := *(mark queue active address)
- __ cmpwi(CCR0, R0, 0);
+ __ cmpwi(CR0, R0, 0);
}
void G1BarrierSetAssembler::gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
@@ -69,7 +68,7 @@ void G1BarrierSetAssembler::gen_write_ref_array_pre_barrier(MacroAssembler* masm
// Is marking active?
generate_marking_inactive_test(masm);
- __ beq(CCR0, filtered);
+ __ beq(CR0, filtered);
__ save_LR(R0);
__ push_frame(frame_size, R0);
@@ -119,8 +118,8 @@ static void generate_queue_insertion(MacroAssembler* masm, ByteSize index_offset
// Can we store a value in the given thread's buffer?
// (The index field is typed as size_t.)
__ ld(temp, in_bytes(index_offset), R16_thread); // temp := *(index address)
- __ cmpdi(CCR0, temp, 0); // jump to runtime if index == 0 (full buffer)
- __ beq(CCR0, runtime);
+ __ cmpdi(CR0, temp, 0); // jump to runtime if index == 0 (full buffer)
+ __ beq(CR0, runtime);
// The buffer is not full, store value into it.
__ ld(R0, in_bytes(buffer_offset), R16_thread); // R0 := buffer address
__ addi(temp, temp, -wordSize); // temp := next index
@@ -155,7 +154,7 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm, Decorator
Label runtime, filtered;
generate_marking_inactive_test(masm);
- __ beq(CCR0, filtered);
+ __ beq(CR0, filtered);
// Do we need to load the previous value?
if (!preloaded) {
@@ -172,12 +171,12 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm, Decorator
// Is the previous value null?
if (preloaded && not_null) {
#ifdef ASSERT
- __ cmpdi(CCR0, pre_val, 0);
+ __ cmpdi(CR0, pre_val, 0);
__ asm_assert_ne("null oop not allowed (G1 pre)"); // Checked by caller.
#endif
} else {
- __ cmpdi(CCR0, pre_val, 0);
- __ beq(CCR0, filtered);
+ __ cmpdi(CR0, pre_val, 0);
+ __ beq(CR0, filtered);
}
if (!preloaded && UseCompressedOops) {
@@ -241,14 +240,14 @@ static Address generate_card_young_test(MacroAssembler* masm, const Register sto
__ load_const_optimized(tmp1, (address)(ct->card_table()->byte_map_base()), tmp2);
__ srdi(tmp2, store_addr, CardTable::card_shift()); // tmp1 := card address relative to card table base
__ lbzx(R0, tmp1, tmp2); // tmp1 := card address
- __ cmpwi(CCR0, R0, (int)G1CardTable::g1_young_card_val());
+ __ cmpwi(CR0, R0, (int)G1CardTable::g1_young_card_val());
return Address(tmp1, tmp2); // return card address
}
static void generate_card_dirty_test(MacroAssembler* masm, Address card_addr) {
__ membar(Assembler::StoreLoad); // Must reload after StoreLoad membar due to concurrent refinement
__ lbzx(R0, card_addr.base(), card_addr.index()); // tmp2 := card
- __ cmpwi(CCR0, R0, (int)G1CardTable::dirty_card_val()); // tmp2 := card == dirty_card_val?
+ __ cmpwi(CR0, R0, (int)G1CardTable::dirty_card_val()); // tmp2 := card == dirty_card_val?
}
void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, DecoratorSet decorators,
@@ -263,24 +262,24 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, Decorato
CardTableBarrierSet* ct = barrier_set_cast(BarrierSet::barrier_set());
generate_region_crossing_test(masm, store_addr, new_val);
- __ beq(CCR0, filtered);
+ __ beq(CR0, filtered);
// Crosses regions, storing null?
if (not_null) {
#ifdef ASSERT
- __ cmpdi(CCR0, new_val, 0);
+ __ cmpdi(CR0, new_val, 0);
__ asm_assert_ne("null oop not allowed (G1 post)"); // Checked by caller.
#endif
} else {
- __ cmpdi(CCR0, new_val, 0);
- __ beq(CCR0, filtered);
+ __ cmpdi(CR0, new_val, 0);
+ __ beq(CR0, filtered);
}
Address card_addr = generate_card_young_test(masm, store_addr, tmp1, tmp2);
- __ beq(CCR0, filtered);
+ __ beq(CR0, filtered);
generate_card_dirty_test(masm, card_addr);
- __ beq(CCR0, filtered);
+ __ beq(CR0, filtered);
__ li(R0, (int)G1CardTable::dirty_card_val());
__ stbx(R0, card_addr.base(), card_addr.index()); // *(card address) := dirty_card_val
@@ -372,14 +371,14 @@ void G1BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value
Register tmp1, Register tmp2,
MacroAssembler::PreservationLevel preservation_level) {
Label done, not_weak;
- __ cmpdi(CCR0, value, 0);
- __ beq(CCR0, done); // Use null as-is.
+ __ cmpdi(CR0, value, 0);
+ __ beq(CR0, done); // Use null as-is.
__ clrrdi(tmp1, value, JNIHandles::tag_size);
__ andi_(tmp2, value, JNIHandles::TypeTag::weak_global);
__ ld(value, 0, tmp1); // Resolve (untagged) jobject.
- __ beq(CCR0, not_weak); // Test for jweak tag.
+ __ beq(CR0, not_weak); // Test for jweak tag.
__ verify_oop(value, FILE_AND_LINE);
g1_write_barrier_pre(masm, IN_NATIVE | ON_PHANTOM_OOP_REF,
noreg, noreg, value,
@@ -410,7 +409,7 @@ void G1BarrierSetAssembler::g1_write_barrier_pre_c2(MacroAssembler* masm,
stub->initialize_registers(obj, pre_val, R16_thread, tmp1, tmp2);
generate_marking_inactive_test(masm);
- __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CCR0, Assembler::equal), *stub->entry());
+ __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CR0, Assembler::equal), *stub->entry());
__ bind(*stub->continuation());
}
@@ -434,8 +433,8 @@ void G1BarrierSetAssembler::generate_c2_pre_barrier_stub(MacroAssembler* masm,
__ ld(pre_val, 0, obj);
}
}
- __ cmpdi(CCR0, pre_val, 0);
- __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CCR0, Assembler::equal), *stub->continuation());
+ __ cmpdi(CR0, pre_val, 0);
+ __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CR0, Assembler::equal), *stub->continuation());
Register pre_val_decoded = pre_val;
if (UseCompressedOops) {
@@ -473,25 +472,25 @@ void G1BarrierSetAssembler::g1_write_barrier_post_c2(MacroAssembler* masm,
if (null_check_required && CompressedOops::base() != nullptr) {
// We prefer doing the null check after the region crossing check.
// Only compressed oop modes with base != null require a null check here.
- __ cmpwi(CCR0, new_val, 0);
- __ beq(CCR0, *stub->continuation());
+ __ cmpwi(CR0, new_val, 0);
+ __ beq(CR0, *stub->continuation());
null_check_required = false;
}
new_val_decoded = __ decode_heap_oop_not_null(tmp2, new_val);
}
generate_region_crossing_test(masm, store_addr, new_val_decoded);
- __ beq(CCR0, *stub->continuation());
+ __ beq(CR0, *stub->continuation());
// crosses regions, storing null?
if (null_check_required) {
- __ cmpdi(CCR0, new_val_decoded, 0);
- __ beq(CCR0, *stub->continuation());
+ __ cmpdi(CR0, new_val_decoded, 0);
+ __ beq(CR0, *stub->continuation());
}
Address card_addr = generate_card_young_test(masm, store_addr, tmp1, tmp2);
assert(card_addr.base() == tmp1 && card_addr.index() == tmp2, "needed by post barrier stub");
- __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CCR0, Assembler::equal), *stub->entry());
+ __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CR0, Assembler::equal), *stub->entry());
__ bind(*stub->continuation());
}
@@ -505,7 +504,7 @@ void G1BarrierSetAssembler::generate_c2_post_barrier_stub(MacroAssembler* masm,
__ bind(*stub->entry());
generate_card_dirty_test(masm, card_addr);
- __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CCR0, Assembler::equal), *stub->continuation());
+ __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CR0, Assembler::equal), *stub->continuation());
__ li(R0, (int)G1CardTable::dirty_card_val());
__ stbx(R0, card_addr.base(), card_addr.index()); // *(card address) := dirty_card_val
@@ -547,8 +546,8 @@ void G1BarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrier
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/);
}
- __ cmpdi(CCR0, pre_val_reg, 0);
- __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CCR0, Assembler::equal), *stub->continuation());
+ __ cmpdi(CR0, pre_val_reg, 0);
+ __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CR0, Assembler::equal), *stub->continuation());
address c_code = bs->pre_barrier_c1_runtime_code_blob()->code_begin();
//__ load_const_optimized(R0, c_code);
@@ -568,8 +567,8 @@ void G1BarrierSetAssembler::gen_post_barrier_stub(LIR_Assembler* ce, G1PostBarri
Register addr_reg = stub->addr()->as_pointer_register();
Register new_val_reg = stub->new_val()->as_register();
- __ cmpdi(CCR0, new_val_reg, 0);
- __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CCR0, Assembler::equal), *stub->continuation());
+ __ cmpdi(CR0, new_val_reg, 0);
+ __ bc_far_optimized(Assembler::bcondCRbiIs1, __ bi0(CR0, Assembler::equal), *stub->continuation());
address c_code = bs->post_barrier_c1_runtime_code_blob()->code_begin();
//__ load_const_optimized(R0, c_code);
@@ -605,7 +604,7 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
// Is marking still active?
generate_marking_inactive_test(sasm);
- __ beq(CCR0, marking_not_active);
+ __ beq(CR0, marking_not_active);
__ bind(restart);
// Load the index into the SATB buffer. SATBMarkQueue::_index is a
@@ -613,8 +612,8 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
__ ld(tmp, satb_q_index_byte_offset, R16_thread);
// index == 0?
- __ cmpdi(CCR0, tmp, 0);
- __ beq(CCR0, refill);
+ __ cmpdi(CR0, tmp, 0);
+ __ beq(CR0, refill);
__ ld(tmp2, satb_q_buf_byte_offset, R16_thread);
__ ld(pre_val, -8, R1_SP); // Load from stack.
@@ -667,15 +666,15 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
__ lbz(tmp, 0, addr); // tmp := [addr + cardtable]
// Return if young card.
- __ cmpwi(CCR0, tmp, G1CardTable::g1_young_card_val());
- __ beq(CCR0, ret);
+ __ cmpwi(CR0, tmp, G1CardTable::g1_young_card_val());
+ __ beq(CR0, ret);
// Return if sequential consistent value is already dirty.
__ membar(Assembler::StoreLoad);
__ lbz(tmp, 0, addr); // tmp := [addr + cardtable]
- __ cmpwi(CCR0, tmp, G1CardTable::dirty_card_val());
- __ beq(CCR0, ret);
+ __ cmpwi(CR0, tmp, G1CardTable::dirty_card_val());
+ __ beq(CR0, ret);
// Not dirty.
@@ -693,8 +692,8 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
__ ld(tmp2, dirty_card_q_index_byte_offset, R16_thread);
// index == 0?
- __ cmpdi(CCR0, tmp2, 0);
- __ beq(CCR0, refill);
+ __ cmpdi(CR0, tmp2, 0);
+ __ beq(CR0, refill);
__ ld(tmp, dirty_card_q_buf_byte_offset, R16_thread);
__ addi(tmp2, tmp2, -oopSize);
diff --git a/src/hotspot/cpu/ppc/gc/g1/g1_ppc.ad b/src/hotspot/cpu/ppc/gc/g1/g1_ppc.ad
index f4163242cad..4f24efe872b 100644
--- a/src/hotspot/cpu/ppc/gc/g1/g1_ppc.ad
+++ b/src/hotspot/cpu/ppc/gc/g1/g1_ppc.ad
@@ -1,6 +1,6 @@
//
-// Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2024 SAP SE. All rights reserved.
+// Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
+// 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
@@ -164,7 +164,7 @@ instruct g1CompareAndExchangeP(iRegPdst res, indirect mem, iRegPsrc oldval, iReg
format %{ "cmpxchgd $newval, $mem" %}
ins_encode %{
Label no_update;
- __ cmpxchgd(CCR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgd(CR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -194,7 +194,7 @@ instruct g1CompareAndExchangeP_acq(iRegPdst res, indirect mem, iRegPsrc oldval,
format %{ "cmpxchgd acq $newval, $mem" %}
ins_encode %{
Label no_update;
- __ cmpxchgd(CCR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgd(CR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -230,7 +230,7 @@ instruct g1CompareAndExchangeN(iRegNdst res, indirect mem, iRegNsrc oldval, iReg
format %{ "cmpxchgw $newval, $mem" %}
ins_encode %{
Label no_update;
- __ cmpxchgw(CCR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgw(CR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -261,7 +261,7 @@ instruct g1CompareAndExchangeN_acq(iRegNdst res, indirect mem, iRegNsrc oldval,
format %{ "cmpxchgw acq $newval, $mem" %}
ins_encode %{
Label no_update;
- __ cmpxchgw(CCR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgw(CR0, $res$$Register, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -299,7 +299,7 @@ instruct g1CompareAndSwapP(iRegIdst res, indirect mem, iRegPsrc oldval, iRegPsrc
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgd(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgd(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -332,7 +332,7 @@ instruct g1CompareAndSwapP_acq(iRegIdst res, indirect mem, iRegPsrc oldval, iReg
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgd(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgd(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -371,7 +371,7 @@ instruct g1CompareAndSwapN(iRegIdst res, indirect mem, iRegNsrc oldval, iRegNsrc
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgw(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgw(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -405,7 +405,7 @@ instruct g1CompareAndSwapN_acq(iRegIdst res, indirect mem, iRegNsrc oldval, iReg
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgw(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgw(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -445,7 +445,7 @@ instruct weakG1CompareAndSwapP(iRegIdst res, indirect mem, iRegPsrc oldval, iReg
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgd(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgd(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -478,7 +478,7 @@ instruct weakG1CompareAndSwapP_acq(iRegIdst res, indirect mem, iRegPsrc oldval,
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgd(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgd(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -517,7 +517,7 @@ instruct weakG1CompareAndSwapN(iRegIdst res, indirect mem, iRegNsrc oldval, iReg
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgw(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgw(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true, true);
// Pass oldval to SATB which is the only value which can get overwritten.
@@ -551,7 +551,7 @@ instruct weakG1CompareAndSwapN_acq(iRegIdst res, indirect mem, iRegNsrc oldval,
ins_encode %{
Label no_update;
__ li($res$$Register, 0);
- __ cmpxchgw(CCR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
+ __ cmpxchgw(CR0, R0, $oldval$$Register, $newval$$Register, $mem$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, &no_update, true, true);
// Pass oldval to SATB which is the only value which can get overwritten.
diff --git a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
index 956b082d194..acf916c8c72 100644
--- a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2018, 2022 SAP SE. All rights reserved.
+ * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/classLoaderData.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
@@ -90,8 +89,8 @@ void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators,
if (UseCompressedOops && in_heap) {
if (L_handle_null != nullptr) { // Label provided.
__ lwz(dst, ind_or_offs, base);
- __ cmpwi(CCR0, dst, 0);
- __ beq(CCR0, *L_handle_null);
+ __ cmpwi(CR0, dst, 0);
+ __ beq(CR0, *L_handle_null);
__ decode_heap_oop_not_null(dst);
} else if (not_null) { // Guaranteed to be not null.
Register narrowOop = (tmp1 != noreg && CompressedOops::base_disjoint()) ? tmp1 : dst;
@@ -104,8 +103,8 @@ void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators,
} else {
__ ld(dst, ind_or_offs, base);
if (L_handle_null != nullptr) {
- __ cmpdi(CCR0, dst, 0);
- __ beq(CCR0, *L_handle_null);
+ __ cmpdi(CR0, dst, 0);
+ __ beq(CR0, *L_handle_null);
}
}
break;
@@ -119,11 +118,11 @@ void BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value,
Register tmp1, Register tmp2,
MacroAssembler::PreservationLevel preservation_level) {
Label done, tagged, weak_tagged, verify;
- __ cmpdi(CCR0, value, 0);
- __ beq(CCR0, done); // Use null as-is.
+ __ cmpdi(CR0, value, 0);
+ __ beq(CR0, done); // Use null as-is.
__ andi_(tmp1, value, JNIHandles::tag_mask);
- __ bne(CCR0, tagged); // Test for tag.
+ __ bne(CR0, tagged); // Test for tag.
__ access_load_at(T_OBJECT, IN_NATIVE | AS_RAW, // no uncoloring
value, (intptr_t)0, value, tmp1, tmp2, preservation_level);
@@ -132,7 +131,7 @@ void BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value,
__ bind(tagged);
__ andi_(tmp1, value, JNIHandles::TypeTag::weak_global);
__ clrrdi(value, value, JNIHandles::tag_size); // Untag.
- __ bne(CCR0, weak_tagged); // Test for jweak tag.
+ __ bne(CR0, weak_tagged); // Test for jweak tag.
__ access_load_at(T_OBJECT, IN_NATIVE,
value, (intptr_t)0, value, tmp1, tmp2, preservation_level);
@@ -153,14 +152,14 @@ void BarrierSetAssembler::resolve_global_jobject(MacroAssembler* masm, Register
MacroAssembler::PreservationLevel preservation_level) {
Label done;
- __ cmpdi(CCR0, value, 0);
- __ beq(CCR0, done); // Use null as-is.
+ __ cmpdi(CR0, value, 0);
+ __ beq(CR0, done); // Use null as-is.
#ifdef ASSERT
{
Label valid_global_tag;
__ andi_(tmp1, value, JNIHandles::TypeTag::global);
- __ bne(CCR0, valid_global_tag); // Test for global tag.
+ __ bne(CR0, valid_global_tag); // Test for global tag.
__ stop("non global jobject using resolve_global_jobject");
__ bind(valid_global_tag);
}
@@ -182,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) {");
@@ -201,9 +196,9 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Register t
// Low order half of 64 bit value is currently used.
__ ld(R0, in_bytes(bs_nm->thread_disarmed_guard_value_offset()), R16_thread);
- __ cmpw(CCR0, R0, tmp);
+ __ cmpw(CR0, R0, tmp);
- __ bnectrl(CCR0);
+ __ bnectrl(CR0);
// Oops may have been changed. Make those updates observable.
// "isync" can serve both, data and instruction patching.
@@ -216,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) {");
@@ -230,8 +220,8 @@ void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler *masm, Register tmp1,
Label bad_call, skip_barrier;
// Fast path: If no method is given, the call is definitely bad.
- __ cmpdi(CCR0, R19_method, 0);
- __ beq(CCR0, bad_call);
+ __ cmpdi(CR0, R19_method, 0);
+ __ beq(CR0, bad_call);
// Load class loader data to determine whether the method's holder is concurrently unloading.
__ load_method_holder(tmp1, R19_method);
@@ -239,14 +229,14 @@ void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler *masm, Register tmp1,
// Fast path: If class loader is strong, the holder cannot be unloaded.
__ lwz(tmp2, in_bytes(ClassLoaderData::keep_alive_ref_count_offset()), tmp1_class_loader_data);
- __ cmpdi(CCR0, tmp2, 0);
- __ bne(CCR0, skip_barrier);
+ __ cmpdi(CR0, tmp2, 0);
+ __ bne(CR0, skip_barrier);
// Class loader is weak. Determine whether the holder is still alive.
__ ld(tmp2, in_bytes(ClassLoaderData::holder_offset()), tmp1_class_loader_data);
__ resolve_weak_handle(tmp2, tmp1, tmp3, MacroAssembler::PreservationLevel::PRESERVATION_FRAME_LR_GP_FP_REGS);
- __ cmpdi(CCR0, tmp2, 0);
- __ bne(CCR0, skip_barrier);
+ __ cmpdi(CR0, tmp2, 0);
+ __ bne(CR0, skip_barrier);
__ bind(bad_call);
diff --git a/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp
index d1d0e5ab024..19084ed27c7 100644
--- a/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2022, 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
@@ -22,7 +22,6 @@
*
*/
-#include "precompiled.hpp"
#include "code/codeBlob.hpp"
#include "code/nmethod.hpp"
#include "code/nativeInst.hpp"
diff --git a/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp
index c9b6b94e1ee..e1272ce508d 100644
--- a/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2018, 2021 SAP SE. All rights reserved.
+ * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/cardTable.hpp"
@@ -50,7 +49,7 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
Label Lskip_loop, Lstore_loop;
__ sldi_(count, count, LogBytesPerHeapOop);
- __ beq(CCR0, Lskip_loop); // zero length
+ __ beq(CR0, Lskip_loop); // zero length
__ addi(count, count, -BytesPerHeapOop);
__ add(count, addr, count);
// Use two shifts to clear out those low order two bits! (Cannot opt. into 1.)
diff --git a/src/hotspot/cpu/ppc/gc/shared/modRefBarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/modRefBarrierSetAssembler_ppc.cpp
index a500a078c2d..4cdf56f6ad6 100644
--- a/src/hotspot/cpu/ppc/gc/shared/modRefBarrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shared/modRefBarrierSetAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2018, 2021 SAP SE. All rights reserved.
+ * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/modRefBarrierSetAssembler.hpp"
#include "runtime/jniHandles.hpp"
@@ -81,8 +80,8 @@ void ModRefBarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register v
Register tmp1, Register tmp2,
MacroAssembler::PreservationLevel preservation_level) {
Label done;
- __ cmpdi(CCR0, value, 0);
- __ beq(CCR0, done); // Use null as-is.
+ __ cmpdi(CR0, value, 0);
+ __ beq(CR0, done); // Use null as-is.
__ clrrdi(tmp1, value, JNIHandles::tag_size);
__ ld(value, 0, tmp1); // Resolve (untagged) jobject.
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 ce12d1fcf03..48422bc6621 100644
--- a/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
diff --git a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
index 9ce0b7c8eb4..842201e1584 100644
--- a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2018, 2024, Red Hat, Inc. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2018, 2025, Red Hat, Inc. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/gcArguments.hpp"
#include "gc/shared/gc_globals.hpp"
@@ -103,8 +102,8 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler *masm, Dec
Label skip_prologue;
// Fast path: Array is of length zero.
- __ cmpdi(CCR0, count, 0);
- __ beq(CCR0, skip_prologue);
+ __ cmpdi(CR0, count, 0);
+ __ beq(CR0, skip_prologue);
/* ==== Check whether barrier is required (gc state) ==== */
__ lbz(R11_tmp, in_bytes(ShenandoahThreadLocalData::gc_state_offset()),
@@ -119,7 +118,7 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler *masm, Dec
: ShenandoahHeap::HAS_FORWARDED | ShenandoahHeap::MARKING;
__ andi_(R11_tmp, R11_tmp, required_states);
- __ beq(CCR0, skip_prologue);
+ __ beq(CR0, skip_prologue);
/* ==== Invoke runtime ==== */
// Save to-be-preserved registers.
@@ -217,7 +216,7 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_impl(MacroAssembler *masm
__ lbz(tmp1, in_bytes(ShenandoahThreadLocalData::gc_state_offset()), R16_thread);
__ andi_(tmp1, tmp1, ShenandoahHeap::MARKING);
- __ beq(CCR0, skip_barrier);
+ __ beq(CR0, skip_barrier);
/* ==== Determine the reference's previous value ==== */
bool preloaded_mode = base == noreg;
@@ -236,12 +235,12 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_impl(MacroAssembler *masm
if ((decorators & IS_NOT_NULL) != 0) {
#ifdef ASSERT
- __ cmpdi(CCR0, pre_val, 0);
+ __ cmpdi(CR0, pre_val, 0);
__ asm_assert_ne("null oop is not allowed");
#endif // ASSERT
} else {
- __ cmpdi(CCR0, pre_val, 0);
- __ beq(CCR0, skip_barrier);
+ __ cmpdi(CR0, pre_val, 0);
+ __ beq(CR0, skip_barrier);
}
} else {
// Load from the reference address to determine the reference's current value (before the store is being performed).
@@ -255,8 +254,8 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_impl(MacroAssembler *masm
__ ld(pre_val, ind_or_offs, base);
}
- __ cmpdi(CCR0, pre_val, 0);
- __ beq(CCR0, skip_barrier);
+ __ cmpdi(CR0, pre_val, 0);
+ __ beq(CR0, skip_barrier);
if (UseCompressedOops) {
__ decode_heap_oop_not_null(pre_val);
@@ -272,8 +271,8 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_impl(MacroAssembler *masm
// If not, jump to the runtime to commit the buffer and to allocate a new one.
// (The buffer's index corresponds to the amount of remaining free space.)
__ ld(Rindex, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_index_offset()), R16_thread);
- __ cmpdi(CCR0, Rindex, 0);
- __ beq(CCR0, runtime); // If index == 0 (buffer is full), goto runtime.
+ __ cmpdi(CR0, Rindex, 0);
+ __ beq(CR0, runtime); // If index == 0 (buffer is full), goto runtime.
// Capacity suffices. Decrement the queue's size by the size of one oop.
// (The buffer is filled contrary to the heap's growing direction, i.e., it is filled downwards.)
@@ -363,9 +362,9 @@ void ShenandoahBarrierSetAssembler::resolve_forward_pointer_not_null(MacroAssemb
"marked value must equal the value obtained when all lock bits are being set");
if (VM_Version::has_isel()) {
__ xori(tmp1, tmp1, markWord::lock_mask_in_place);
- __ isel(dst, CCR0, Assembler::equal, false, tmp1);
+ __ isel(dst, CR0, Assembler::equal, false, tmp1);
} else {
- __ bne(CCR0, done);
+ __ bne(CR0, done);
__ xori(dst, tmp1, markWord::lock_mask_in_place);
}
@@ -403,7 +402,7 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier_impl(
if (is_strong) {
// For strong references, the heap is considered stable if "has forwarded" is not active.
__ andi_(tmp1, tmp2, ShenandoahHeap::HAS_FORWARDED | ShenandoahHeap::EVACUATION);
- __ beq(CCR0, skip_barrier);
+ __ beq(CR0, skip_barrier);
#ifdef ASSERT
// "evacuation" -> (implies) "has forwarded". If we reach this code, "has forwarded" must thus be set.
__ andi_(tmp1, tmp1, ShenandoahHeap::HAS_FORWARDED);
@@ -415,10 +414,10 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier_impl(
// The additional phase conditions are in place to avoid the resurrection of weak references (see JDK-8266440).
Label skip_fastpath;
__ andi_(tmp1, tmp2, ShenandoahHeap::WEAK_ROOTS);
- __ bne(CCR0, skip_fastpath);
+ __ bne(CR0, skip_fastpath);
__ andi_(tmp1, tmp2, ShenandoahHeap::HAS_FORWARDED | ShenandoahHeap::EVACUATION);
- __ beq(CCR0, skip_barrier);
+ __ beq(CR0, skip_barrier);
#ifdef ASSERT
// "evacuation" -> (implies) "has forwarded". If we reach this code, "has forwarded" must thus be set.
__ andi_(tmp1, tmp1, ShenandoahHeap::HAS_FORWARDED);
@@ -454,7 +453,7 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier_impl(
__ srdi(tmp1, dst, ShenandoahHeapRegion::region_size_bytes_shift_jint());
__ lbzx(tmp2, tmp1, tmp2);
__ andi_(tmp2, tmp2, 1);
- __ beq(CCR0, skip_barrier);
+ __ beq(CR0, skip_barrier);
}
/* ==== Invoke runtime ==== */
@@ -588,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()) {
@@ -599,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);
@@ -640,8 +636,8 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler
Label done;
// Fast path: Reference is null (JNI tags are zero for null pointers).
- __ cmpdi(CCR0, obj, 0);
- __ beq(CCR0, done);
+ __ cmpdi(CR0, obj, 0);
+ __ beq(CR0, done);
// Resolve jobject using standard implementation.
BarrierSetAssembler::try_resolve_jobject_in_native(masm, dst, jni_env, obj, tmp, slowpath);
@@ -652,7 +648,7 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler
jni_env);
__ andi_(tmp, tmp, ShenandoahHeap::EVACUATION | ShenandoahHeap::HAS_FORWARDED);
- __ bne(CCR0, slowpath);
+ __ bne(CR0, slowpath);
__ bind(done);
__ block_comment("} try_resolve_jobject_in_native (shenandoahgc)");
@@ -702,23 +698,23 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler *masm, Register b
// Given that 'expected' must refer to the to-space object of an evacuated object (strong to-space invariant),
// no special processing is required.
if (UseCompressedOops) {
- __ cmpxchgw(CCR0, current_value, expected, new_val, base_addr, MacroAssembler::MemBarNone,
+ __ cmpxchgw(CR0, current_value, expected, new_val, base_addr, MacroAssembler::MemBarNone,
false, success_flag, nullptr, true);
} else {
- __ cmpxchgd(CCR0, current_value, expected, new_val, base_addr, MacroAssembler::MemBarNone,
+ __ cmpxchgd(CR0, current_value, expected, new_val, base_addr, MacroAssembler::MemBarNone,
false, success_flag, nullptr, true);
}
// Skip the rest of the barrier if the CAS operation succeeds immediately.
// If it does not, the value stored at the address is either the from-space pointer of the
// referenced object (success criteria s2)) or simply another object.
- __ beq(CCR0, done);
+ __ beq(CR0, done);
/* ==== Step 2 (Null check) ==== */
// The success criteria s2) cannot be matched with a null pointer
// (null pointers cannot be subject to concurrent evacuation). The failure of the CAS operation is thus legitimate.
- __ cmpdi(CCR0, current_value, 0);
- __ beq(CCR0, done);
+ __ cmpdi(CR0, current_value, 0);
+ __ beq(CR0, done);
/* ==== Step 3 (reference pointer refers to from-space version; success criteria s2)) ==== */
// To check whether the reference pointer refers to the from-space version, the forward
@@ -738,15 +734,15 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler *masm, Register b
// Load zero into register for the potential failure case.
__ li(success_flag, 0);
}
- __ cmpd(CCR0, current_value, expected);
- __ bne(CCR0, done);
+ __ cmpd(CR0, current_value, expected);
+ __ bne(CR0, done);
// Discard fetched value as it might be a reference to the from-space version of an object.
if (UseCompressedOops) {
- __ cmpxchgw(CCR0, R0, initial_value, new_val, base_addr, MacroAssembler::MemBarNone,
+ __ cmpxchgw(CR0, R0, initial_value, new_val, base_addr, MacroAssembler::MemBarNone,
false, success_flag);
} else {
- __ cmpxchgd(CCR0, R0, initial_value, new_val, base_addr, MacroAssembler::MemBarNone,
+ __ cmpxchgd(CR0, R0, initial_value, new_val, base_addr, MacroAssembler::MemBarNone,
false, success_flag);
}
@@ -771,7 +767,7 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler *masm, Register b
// guaranteed to be the case.
// In case of a concurrent update, the CAS would be retried again. This is legitimate
// in terms of program correctness (even though it is not desired).
- __ bne(CCR0, step_four);
+ __ bne(CR0, step_four);
__ bind(done);
__ block_comment("} cmpxchg_oop (shenandoahgc)");
@@ -790,7 +786,7 @@ void ShenandoahBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssemb
__ sldi_(count, count, LogBytesPerHeapOop);
// Zero length? Skip.
- __ beq(CCR0, L_skip_loop);
+ __ beq(CR0, L_skip_loop);
__ addi(count, count, -BytesPerHeapOop);
__ add(count, addr, count);
@@ -798,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);
@@ -836,8 +833,8 @@ void ShenandoahBarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler *ce, Shen
}
// Fast path: Reference is null.
- __ cmpdi(CCR0, pre_val, 0);
- __ bc_far_optimized(Assembler::bcondCRbiIs1_bhintNoHint, __ bi0(CCR0, Assembler::equal), *stub->continuation());
+ __ cmpdi(CR0, pre_val, 0);
+ __ bc_far_optimized(Assembler::bcondCRbiIs1_bhintNoHint, __ bi0(CR0, Assembler::equal), *stub->continuation());
// Argument passing via the stack.
__ std(pre_val, -8, R1_SP);
@@ -867,7 +864,7 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble
// Ensure that 'res' is 'R3_ARG1' and contains the same value as 'obj' to reduce the number of required
// copy instructions.
assert(R3_RET == res, "res must be r3");
- __ cmpd(CCR0, res, obj);
+ __ cmpd(CR0, res, obj);
__ asm_assert_eq("result register must contain the reference stored in obj");
#endif
@@ -889,7 +886,7 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble
__ lbzx(tmp2, tmp1, tmp2);
__ andi_(tmp2, tmp2, 1);
- __ bc_far_optimized(Assembler::bcondCRbiIs1_bhintNoHint, __ bi0(CCR0, Assembler::equal), *stub->continuation());
+ __ bc_far_optimized(Assembler::bcondCRbiIs1_bhintNoHint, __ bi0(CR0, Assembler::equal), *stub->continuation());
}
address blob_addr = nullptr;
@@ -947,13 +944,13 @@ void ShenandoahBarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAss
__ lbz(R12_tmp2, in_bytes(ShenandoahThreadLocalData::gc_state_offset()), R16_thread);
__ andi_(R12_tmp2, R12_tmp2, ShenandoahHeap::MARKING);
- __ beq(CCR0, skip_barrier);
+ __ beq(CR0, skip_barrier);
/* ==== Add previous value directly to thread-local SATB mark queue ==== */
// Check queue's capacity. Jump to runtime if no free slot is available.
__ ld(R12_tmp2, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_index_offset()), R16_thread);
- __ cmpdi(CCR0, R12_tmp2, 0);
- __ beq(CCR0, runtime);
+ __ cmpdi(CR0, R12_tmp2, 0);
+ __ beq(CR0, runtime);
// Capacity suffices. Decrement the queue's size by one slot (size of one oop).
__ addi(R12_tmp2, R12_tmp2, -wordSize);
diff --git a/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp b/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp
index 5891d50f715..28a57b2dc29 100644
--- a/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp
@@ -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
@@ -21,7 +21,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "gc/shared/gcLogPrecious.hpp"
#include "gc/shared/gc_globals.hpp"
#include "gc/z/zAddress.inline.hpp"
@@ -82,7 +81,7 @@ static size_t probe_valid_max_address_bit() {
munmap(result_addr, page_size);
}
}
- log_info_p(gc, init)("Probing address space for the highest valid bit: " SIZE_FORMAT, max_address_bit);
+ log_info_p(gc, init)("Probing address space for the highest valid bit: %zu", max_address_bit);
return MAX2(max_address_bit, MINIMUM_MAX_ADDRESS_BIT);
#else // LINUX
return DEFAULT_MAX_ADDRESS_BIT;
diff --git a/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp
index b9ea67dabe3..e30e8c82d23 100644
--- a/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2021, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 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
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "asm/register.hpp"
#include "code/codeBlob.hpp"
@@ -170,7 +169,7 @@ void ZBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators
// if the pointer is not dirty.
// Only dirty pointers must be processed by this barrier, so we can skip it in case the latter condition holds true.
__ and_(tmp1, tmp1, dst);
- __ beq(CCR0, uncolor);
+ __ beq(CR0, uncolor);
/* ==== Invoke barrier ==== */
{
@@ -194,8 +193,8 @@ void ZBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators
// Slow-path has already uncolored
if (L_handle_null != nullptr) {
- __ cmpdi(CCR0, dst, 0);
- __ beq(CCR0, *L_handle_null);
+ __ cmpdi(CR0, dst, 0);
+ __ beq(CR0, *L_handle_null);
}
__ b(done);
@@ -204,7 +203,7 @@ void ZBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators
__ srdi(dst, dst, ZPointerLoadShift);
} else {
__ srdi_(dst, dst, ZPointerLoadShift);
- __ beq(CCR0, *L_handle_null);
+ __ beq(CR0, *L_handle_null);
}
__ bind(done);
@@ -235,7 +234,7 @@ static void emit_store_fast_path_check(MacroAssembler* masm, Register base, Regi
// A not relocatable object could have spurious raw null pointers in its fields after
// getting promoted to the old generation.
__ relocate(barrier_Relocation::spec(), ZBarrierRelocationFormatStoreGoodBits);
- __ cmplwi(CCR0, R0, barrier_Relocation::unpatched);
+ __ cmplwi(CR0, R0, barrier_Relocation::unpatched);
} else {
__ ld(R0, ind_or_offs, base);
// Stores on relocatable objects never need to deal with raw null pointers in fields.
@@ -245,7 +244,7 @@ static void emit_store_fast_path_check(MacroAssembler* masm, Register base, Regi
__ relocate(barrier_Relocation::spec(), ZBarrierRelocationFormatStoreBadMask);
__ andi_(R0, R0, barrier_Relocation::unpatched);
}
- __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CCR0, Assembler::equal), medium_path);
+ __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CR0, Assembler::equal), medium_path);
}
void ZBarrierSetAssembler::store_barrier_fast(MacroAssembler* masm,
@@ -275,7 +274,7 @@ void ZBarrierSetAssembler::store_barrier_fast(MacroAssembler* masm,
__ ld(R0, ind_or_offset, ref_base);
__ ld(rnew_zpointer, in_bytes(ZThreadLocalData::store_bad_mask_offset()), R16_thread);
__ and_(R0, R0, rnew_zpointer);
- __ bne(CCR0, medium_path);
+ __ bne(CR0, medium_path);
__ bind(medium_path_continuation);
__ ld(rnew_zpointer, in_bytes(ZThreadLocalData::store_good_mask_offset()), R16_thread);
}
@@ -294,7 +293,7 @@ static void store_barrier_buffer_add(MacroAssembler* masm,
// Combined pointer bump and check if the buffer is disabled or full
__ ld(R0, in_bytes(ZStoreBarrierBuffer::current_offset()), tmp1);
__ addic_(R0, R0, -(int)sizeof(ZStoreBarrierEntry));
- __ blt(CCR0, slow_path);
+ __ blt(CR0, slow_path);
__ std(R0, in_bytes(ZStoreBarrierBuffer::current_offset()), tmp1);
// Entry is at ZStoreBarrierBuffer (tmp1) + buffer_offset + scaled index (R0)
@@ -328,8 +327,8 @@ void ZBarrierSetAssembler::store_barrier_medium(MacroAssembler* masm,
// Atomic accesses can get to the medium fast path because the value was a
// raw null value. If it was not null, then there is no doubt we need to take a slow path.
__ ld(tmp, ind_or_offs, ref_base);
- __ cmpdi(CCR0, tmp, 0);
- __ bne(CCR0, slow_path);
+ __ cmpdi(CR0, tmp, 0);
+ __ bne(CR0, slow_path);
// If we get this far, we know there is a young raw null value in the field.
// Try to self-heal null values for atomic accesses
@@ -339,12 +338,12 @@ void ZBarrierSetAssembler::store_barrier_medium(MacroAssembler* masm,
need_restore = true;
}
__ ld(R0, in_bytes(ZThreadLocalData::store_good_mask_offset()), R16_thread);
- __ cmpxchgd(CCR0, tmp, (intptr_t)0, R0, ref_base,
+ __ cmpxchgd(CR0, tmp, (intptr_t)0, R0, ref_base,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, need_restore ? nullptr : &slow_path);
if (need_restore) {
__ sub(ref_base, ref_base, ind_or_offs);
- __ bne(CCR0, slow_path);
+ __ bne(CR0, slow_path);
}
} else {
// A non-atomic relocatable object won't get to the medium fast path due to a
@@ -448,7 +447,7 @@ void ZBarrierSetAssembler::copy_load_at_fast(MacroAssembler* masm,
Label& continuation) const {
__ ldx(zpointer, addr);
__ and_(R0, zpointer, load_bad_mask);
- __ bne(CCR0, slow_path);
+ __ bne(CR0, slow_path);
__ bind(continuation);
}
void ZBarrierSetAssembler::copy_load_at_slow(MacroAssembler* masm,
@@ -481,7 +480,7 @@ void ZBarrierSetAssembler::copy_store_at_fast(MacroAssembler* masm,
if (!dest_uninitialized) {
__ ldx(R0, addr);
__ and_(R0, R0, store_bad_mask);
- __ bne(CCR0, medium_path);
+ __ bne(CR0, medium_path);
__ bind(continuation);
}
__ rldimi(zpointer, store_good_mask, 0, 64 - ZPointerLoadShift); // Replace color bits.
@@ -516,8 +515,8 @@ void ZBarrierSetAssembler::copy_store_at_slow(MacroAssembler* masm,
void ZBarrierSetAssembler::generate_disjoint_oop_copy(MacroAssembler* masm, bool dest_uninitialized) {
const Register zpointer = R2, tmp = R9;
Label done, loop, load_bad, load_good, store_bad, store_good;
- __ cmpdi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, done);
+ __ cmpdi(CR0, R5_ARG3, 0);
+ __ beq(CR0, done);
__ mtctr(R5_ARG3);
__ align(32);
@@ -540,7 +539,7 @@ void ZBarrierSetAssembler::generate_conjoint_oop_copy(MacroAssembler* masm, bool
const Register zpointer = R2, tmp = R9;
Label done, loop, load_bad, load_good, store_bad, store_good;
__ sldi_(R0, R5_ARG3, 3);
- __ beq(CCR0, done);
+ __ beq(CR0, done);
__ mtctr(R5_ARG3);
// Point behind last elements and copy backwards.
__ add(R3_ARG1, R3_ARG1, R0);
@@ -571,12 +570,12 @@ void ZBarrierSetAssembler::check_oop(MacroAssembler *masm, Register obj, const c
Label done, skip_uncolor;
// Skip (colored) null.
__ srdi_(R0, obj, ZPointerLoadShift);
- __ beq(CCR0, done);
+ __ beq(CR0, done);
// Check if ZAddressHeapBase << ZPointerLoadShift is set. If so, we need to uncolor.
__ rldicl_(R0, obj, 64 - ZAddressHeapBaseShift - ZPointerLoadShift, 63);
__ mr(R0, obj);
- __ beq(CCR0, skip_uncolor);
+ __ beq(CR0, skip_uncolor);
__ srdi(R0, obj, ZPointerLoadShift);
__ bind(skip_uncolor);
@@ -595,7 +594,7 @@ void ZBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, R
// Test for tag
__ andi_(tmp, obj, JNIHandles::tag_mask);
- __ bne(CCR0, tagged);
+ __ bne(CR0, tagged);
// Resolve local handle
__ ld(dst, 0, obj);
@@ -606,7 +605,7 @@ void ZBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, R
// Test for weak tag
__ andi_(tmp, obj, JNIHandles::TypeTag::weak_global);
__ clrrdi(dst, obj, JNIHandles::tag_size); // Untag.
- __ bne(CCR0, weak_tagged);
+ __ bne(CR0, weak_tagged);
// Resolve global handle
__ ld(dst, 0, dst);
@@ -621,7 +620,7 @@ void ZBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, R
__ bind(check_color);
__ and_(tmp, tmp, dst);
- __ bne(CCR0, slowpath);
+ __ bne(CR0, slowpath);
// Uncolor
__ srdi(dst, dst, ZPointerLoadShift);
@@ -667,7 +666,7 @@ void ZBarrierSetAssembler::generate_c1_load_barrier(LIR_Assembler* ce,
ZLoadBarrierStubC1* stub,
bool on_non_strong) const {
check_color(ce, ref, on_non_strong);
- __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CCR0, Assembler::equal), *stub->entry());
+ __ bc_far_optimized(Assembler::bcondCRbiIs0, __ bi0(CR0, Assembler::equal), *stub->entry());
z_uncolor(ce, ref);
__ bind(*stub->continuation());
}
diff --git a/src/hotspot/cpu/ppc/gc/z/z_ppc.ad b/src/hotspot/cpu/ppc/gc/z/z_ppc.ad
index 5205138a6ee..65fb206ad7e 100644
--- a/src/hotspot/cpu/ppc/gc/z/z_ppc.ad
+++ b/src/hotspot/cpu/ppc/gc/z/z_ppc.ad
@@ -1,6 +1,6 @@
//
-// Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2021 SAP SE. All rights reserved.
+// Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
+// 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
@@ -70,7 +70,7 @@ static void z_load_barrier(MacroAssembler* masm, const MachNode* node, Address r
check_color(masm, ref, on_non_strong);
ZLoadBarrierStubC2* const stub = ZLoadBarrierStubC2::create(node, ref_addr, ref);
- __ bne_far(CCR0, *stub->entry(), MacroAssembler::bc_far_optimize_on_relocate);
+ __ bne_far(CR0, *stub->entry(), MacroAssembler::bc_far_optimize_on_relocate);
z_uncolor(masm, ref);
__ bind(*stub->continuation());
@@ -97,7 +97,7 @@ static void z_compare_and_swap(MacroAssembler* masm, const MachNode* node,
Register rold_zpointer = tmp1, rnew_zpointer = tmp2;
z_store_barrier(masm, node, mem, 0, newval, rnew_zpointer, true /* is_atomic */);
z_color(masm, rold_zpointer, oldval);
- __ cmpxchgd(CCR0, R0, rold_zpointer, rnew_zpointer, mem,
+ __ cmpxchgd(CR0, R0, rold_zpointer, rnew_zpointer, mem,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(), res, nullptr, true,
false /* we could support weak, but benefit is questionable */);
@@ -119,7 +119,7 @@ static void z_compare_and_exchange(MacroAssembler* masm, const MachNode* node,
Register rold_zpointer = R0, rnew_zpointer = tmp;
z_store_barrier(masm, node, mem, 0, newval, rnew_zpointer, true /* is_atomic */);
z_color(masm, rold_zpointer, oldval);
- __ cmpxchgd(CCR0, res, rold_zpointer, rnew_zpointer, mem,
+ __ cmpxchgd(CR0, res, rold_zpointer, rnew_zpointer, mem,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(), noreg, nullptr, true,
false /* we could support weak, but benefit is questionable */);
z_uncolor(masm, res);
diff --git a/src/hotspot/cpu/ppc/icache_ppc.cpp b/src/hotspot/cpu/ppc/icache_ppc.cpp
index 6901efc37b7..05ad3c7a30d 100644
--- a/src/hotspot/cpu/ppc/icache_ppc.cpp
+++ b/src/hotspot/cpu/ppc/icache_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "runtime/icache.hpp"
// Use inline assembler to implement icache flush.
diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc.hpp b/src/hotspot/cpu/ppc/interp_masm_ppc.hpp
index 7277ac3bc1a..99ac037e4b7 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 67b9bdc0414..7a75dfd3de1 100644
--- a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2003, 2025, Oracle and/or its affiliates. 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
@@ -24,7 +24,6 @@
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
@@ -127,10 +126,10 @@ void InterpreterMacroAssembler::check_and_handle_popframe(Register scratch_reg)
// means that this code is called *during* popframe handling - we
// don't want to reenter.
andi_(R0, scratch_reg, JavaThread::popframe_pending_bit);
- beq(CCR0, L);
+ beq(CR0, L);
andi_(R0, scratch_reg, JavaThread::popframe_processing_bit);
- bne(CCR0, L);
+ bne(CR0, L);
// Call the Interpreter::remove_activation_preserving_args_entry()
// func to get the address of the same-named entrypoint in the
@@ -151,12 +150,12 @@ void InterpreterMacroAssembler::check_and_handle_earlyret(Register scratch_reg)
if (JvmtiExport::can_force_early_return()) {
Label Lno_early_ret;
ld(Rthr_state_addr, in_bytes(JavaThread::jvmti_thread_state_offset()), R16_thread);
- cmpdi(CCR0, Rthr_state_addr, 0);
- beq(CCR0, Lno_early_ret);
+ cmpdi(CR0, Rthr_state_addr, 0);
+ beq(CR0, Lno_early_ret);
lwz(R0, in_bytes(JvmtiThreadState::earlyret_state_offset()), Rthr_state_addr);
- cmpwi(CCR0, R0, JvmtiThreadState::earlyret_pending);
- bne(CCR0, Lno_early_ret);
+ cmpwi(CR0, R0, JvmtiThreadState::earlyret_pending);
+ bne(CR0, Lno_early_ret);
// Jump to Interpreter::_earlyret_entry.
lwz(R3_ARG1, in_bytes(JvmtiThreadState::earlyret_tos_offset()), Rthr_state_addr);
@@ -230,7 +229,7 @@ void InterpreterMacroAssembler::dispatch_Lbyte_code(TosState state, Register byt
ld(R0, in_bytes(JavaThread::polling_word_offset()), R16_thread);
// Armed page has poll_bit set, if poll bit is cleared just continue.
andi_(R0, R0, SafepointMechanism::poll_bit());
- beq(CCR0, dispatch);
+ beq(CR0, dispatch);
load_dispatch_table(R11_scratch1, sfpt_tbl);
align(32, 16);
bind(dispatch);
@@ -529,8 +528,8 @@ void InterpreterMacroAssembler::load_resolved_reference_at_index(Register result
Label index_ok;
lwa(R0, arrayOopDesc::length_offset_in_bytes(), result);
sldi(R0, R0, LogBytesPerHeapOop);
- cmpd(CCR0, index, R0);
- blt(CCR0, index_ok);
+ cmpd(CR0, index, R0);
+ blt(CR0, index_ok);
stop("resolved reference index out of bounds");
bind(index_ok);
#endif
@@ -593,8 +592,8 @@ void InterpreterMacroAssembler::index_check_without_pop(Register Rarray, Registe
// Array nullcheck
if (!ImplicitNullChecks) {
- cmpdi(CCR0, Rarray, 0);
- beq(CCR0, LisNull);
+ cmpdi(CR0, Rarray, 0);
+ beq(CR0, LisNull);
} else {
null_check_throw(Rarray, arrayOopDesc::length_offset_in_bytes(), /*temp*/RsxtIndex);
}
@@ -606,9 +605,9 @@ void InterpreterMacroAssembler::index_check_without_pop(Register Rarray, Registe
// Index check
lwz(Rlength, arrayOopDesc::length_offset_in_bytes(), Rarray);
- cmplw(CCR0, Rindex, Rlength);
+ cmplw(CR0, Rindex, Rlength);
sldi(RsxtIndex, RsxtIndex, index_shift);
- blt(CCR0, LnotOOR);
+ blt(CR0, LnotOOR);
// Index should be in R17_tos, array should be in R4_ARG2.
mr_if_needed(R17_tos, Rindex);
mr_if_needed(R4_ARG2, Rarray);
@@ -681,18 +680,18 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
// Check if synchronized method or unlocking prevented by
// JavaThread::do_not_unlock_if_synchronized flag.
lbz(Rdo_not_unlock_flag, in_bytes(JavaThread::do_not_unlock_if_synchronized_offset()), R16_thread);
- lwz(Raccess_flags, in_bytes(Method::access_flags_offset()), R19_method);
+ lhz(Raccess_flags, in_bytes(Method::access_flags_offset()), R19_method);
li(R0, 0);
stb(R0, in_bytes(JavaThread::do_not_unlock_if_synchronized_offset()), R16_thread); // reset flag
push(state);
// Skip if we don't have to unlock.
- rldicl_(R0, Raccess_flags, 64-JVM_ACC_SYNCHRONIZED_BIT, 63); // Extract bit and compare to 0.
- beq(CCR0, Lunlocked);
+ testbitdi(CR0, R0, Raccess_flags, JVM_ACC_SYNCHRONIZED_BIT);
+ beq(CR0, Lunlocked);
- cmpwi(CCR0, Rdo_not_unlock_flag, 0);
- bne(CCR0, Lno_unlock);
+ cmpwi(CR0, Rdo_not_unlock_flag, 0);
+ bne(CR0, Lno_unlock);
}
// Unlock
@@ -706,8 +705,8 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
-(frame::ijava_state_size + frame::interpreter_frame_monitor_size_in_bytes())); // Monitor base
ld(R0, BasicObjectLock::obj_offset(), Rmonitor_base);
- cmpdi(CCR0, R0, 0);
- bne(CCR0, Lunlock);
+ cmpdi(CR0, R0, 0);
+ bne(CR0, Lunlock);
// If it's already unlocked, throw exception.
if (throw_monitor_exception) {
@@ -741,7 +740,7 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
addi(Rmonitor_base, Rmonitor_base, - frame::ijava_state_size); // Monitor base
subf_(Riterations, R26_monitor, Rmonitor_base);
- ble(CCR0, Lno_unlock);
+ ble(CR0, Lno_unlock);
addi(Rcurrent_obj_addr, Rmonitor_base,
in_bytes(BasicObjectLock::obj_offset()) - frame::interpreter_frame_monitor_size_in_bytes());
@@ -760,8 +759,8 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
bind(Lloop);
// Check if current entry is used.
- cmpdi(CCR0, Rcurrent_obj, 0);
- bne(CCR0, Lexception);
+ cmpdi(CR0, Rcurrent_obj, 0);
+ bne(CR0, Lexception);
// Preload next iteration's compare value.
ld(Rcurrent_obj, 0, Rcurrent_obj_addr);
addi(Rcurrent_obj_addr, Rcurrent_obj_addr, -delta);
@@ -817,29 +816,29 @@ void InterpreterMacroAssembler::narrow(Register result) {
Label notBool, notByte, notChar, done;
// common case first
- cmpwi(CCR0, ret_type, T_INT);
- beq(CCR0, done);
+ cmpwi(CR0, ret_type, T_INT);
+ beq(CR0, done);
- cmpwi(CCR0, ret_type, T_BOOLEAN);
- bne(CCR0, notBool);
+ cmpwi(CR0, ret_type, T_BOOLEAN);
+ bne(CR0, notBool);
andi(result, result, 0x1);
b(done);
bind(notBool);
- cmpwi(CCR0, ret_type, T_BYTE);
- bne(CCR0, notByte);
+ cmpwi(CR0, ret_type, T_BYTE);
+ bne(CR0, notByte);
extsb(result, result);
b(done);
bind(notByte);
- cmpwi(CCR0, ret_type, T_CHAR);
- bne(CCR0, notChar);
+ cmpwi(CR0, ret_type, T_CHAR);
+ bne(CR0, notChar);
andi(result, result, 0xffff);
b(done);
bind(notChar);
- // cmpwi(CCR0, ret_type, T_SHORT); // all that's left
- // bne(CCR0, done);
+ // cmpwi(CR0, ret_type, T_SHORT); // all that's left
+ // bne(CR0, done);
extsh(result, result);
// Nothing to do for T_INT
@@ -894,8 +893,8 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
// check if already enabled - if so no re-enabling needed
assert(sizeof(StackOverflow::StackGuardState) == 4, "unexpected size");
lwz(R0, in_bytes(JavaThread::stack_guard_state_offset()), R16_thread);
- cmpwi(CCR0, R0, StackOverflow::stack_guard_enabled);
- beq_predict_taken(CCR0, no_reserved_zone_enabling);
+ cmpwi(CR0, R0, StackOverflow::stack_guard_enabled);
+ beq_predict_taken(CR0, no_reserved_zone_enabling);
// Compare frame pointers. There is no good stack pointer, as with stack
// frame compression we can get different SPs when we do calls. A subsequent
@@ -903,8 +902,8 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
// inner call of the method annotated with ReservedStack.
ld_ptr(R0, JavaThread::reserved_stack_activation_offset(), R16_thread);
ld_ptr(R11_scratch1, _abi0(callers_sp), R1_SP); // Load frame pointer.
- cmpld(CCR0, R11_scratch1, R0);
- blt_predict_taken(CCR0, no_reserved_zone_enabling);
+ cmpld(CR0, R11_scratch1, R0);
+ blt_predict_taken(CR0, no_reserved_zone_enabling);
// Enable reserved zone again, throw stack overflow exception.
call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::enable_stack_reserved_zone), R16_thread);
@@ -962,8 +961,8 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
if (DiagnoseSyncOnValueBasedClasses != 0) {
load_klass(tmp, object);
lbz(tmp, in_bytes(Klass::misc_flags_offset()), tmp);
- testbitdi(CCR0, R0, tmp, exact_log2(KlassFlags::_misc_is_value_based_class));
- bne(CCR0, slow_case);
+ testbitdi(CR0, R0, tmp, exact_log2(KlassFlags::_misc_is_value_based_class));
+ bne(CR0, slow_case);
}
if (LockingMode == LM_LIGHTWEIGHT) {
@@ -990,8 +989,8 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
addi(object_mark_addr, object, oopDesc::mark_offset_in_bytes());
// Must fence, otherwise, preceding store(s) may float below cmpxchg.
- // CmpxchgX sets CCR0 to cmpX(current, displaced).
- cmpxchgd(/*flag=*/CCR0,
+ // CmpxchgX sets CR0 to cmpX(current, displaced).
+ cmpxchgd(/*flag=*/CR0,
/*current_value=*/current_header,
/*compare_value=*/header, /*exchange_value=*/monitor,
/*where=*/object_mark_addr,
@@ -1022,7 +1021,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
and_(R0/*==0?*/, current_header, tmp);
// If condition is true we are done and hence we can store 0 in the displaced
// header indicating it is a recursive lock.
- bne(CCR0, slow_case);
+ bne(CR0, slow_case);
std(R0/*==0!*/, mark_offset, monitor);
b(count_locking);
}
@@ -1088,8 +1087,8 @@ void InterpreterMacroAssembler::unlock_object(Register monitor) {
BasicLock::displaced_header_offset_in_bytes(), monitor);
// If the displaced header is zero, we have a recursive unlock.
- cmpdi(CCR0, header, 0);
- beq(CCR0, free_slot); // recursive unlock
+ cmpdi(CR0, header, 0);
+ beq(CR0, free_slot); // recursive unlock
}
// } else if (Atomic::cmpxchg(obj->mark_addr(), monitor, displaced_header) == monitor) {
@@ -1109,8 +1108,8 @@ void InterpreterMacroAssembler::unlock_object(Register monitor) {
// We have the displaced header in displaced_header. If the lock is still
// lightweight, it will contain the monitor address and we'll store the
// displaced header back into the object's mark word.
- // CmpxchgX sets CCR0 to cmpX(current, monitor).
- cmpxchgd(/*flag=*/CCR0,
+ // CmpxchgX sets CR0 to cmpX(current, monitor).
+ cmpxchgd(/*flag=*/CR0,
/*current_value=*/current_header,
/*compare_value=*/monitor, /*exchange_value=*/header,
/*where=*/object_mark_addr,
@@ -1171,8 +1170,8 @@ void InterpreterMacroAssembler::call_from_interpreter(Register Rtarget_method, R
// compiled code in threads for which the event is enabled. Check here for
// interp_only_mode if these events CAN be enabled.
Label done;
- cmpwi(CCR0, Rinterp_only, 0);
- beq(CCR0, done);
+ cmpwi(CR0, Rinterp_only, 0);
+ beq(CR0, done);
ld(Rtarget_addr, in_bytes(Method::interpreter_entry_offset()), Rtarget_method);
align(32, 12);
bind(done);
@@ -1181,8 +1180,8 @@ void InterpreterMacroAssembler::call_from_interpreter(Register Rtarget_method, R
#ifdef ASSERT
{
Label Lok;
- cmpdi(CCR0, Rtarget_addr, 0);
- bne(CCR0, Lok);
+ cmpdi(CR0, Rtarget_addr, 0);
+ bne(CR0, Lok);
stop("null entry point");
bind(Lok);
}
@@ -1212,7 +1211,7 @@ void InterpreterMacroAssembler::call_from_interpreter(Register Rtarget_method, R
sldi(Rscratch1, Rscratch1, Interpreter::logStackElementSize);
add(Rscratch1, Rscratch1, Rscratch2); // Rscratch2 contains fp
// Compare sender_sp with the derelativized top_frame_sp
- cmpd(CCR0, R21_sender_SP, Rscratch1);
+ cmpd(CR0, R21_sender_SP, Rscratch1);
asm_assert_eq("top_frame_sp incorrect");
#endif
@@ -1235,8 +1234,8 @@ void InterpreterMacroAssembler::set_method_data_pointer_for_bcp() {
// Test ImethodDataPtr. If it is null, continue at the specified label.
void InterpreterMacroAssembler::test_method_data_pointer(Label& zero_continue) {
assert(ProfileInterpreter, "must be profiling interpreter");
- cmpdi(CCR0, R28_mdx, 0);
- beq(CCR0, zero_continue);
+ cmpdi(CR0, R28_mdx, 0);
+ beq(CR0, zero_continue);
}
void InterpreterMacroAssembler::verify_method_data_pointer() {
@@ -1251,8 +1250,8 @@ void InterpreterMacroAssembler::verify_method_data_pointer() {
ld(R12_scratch2, in_bytes(Method::const_offset()), R19_method);
addi(R11_scratch1, R11_scratch1, in_bytes(ConstMethod::codes_offset()));
add(R11_scratch1, R12_scratch2, R12_scratch2);
- cmpd(CCR0, R11_scratch1, R14_bcp);
- beq(CCR0, verify_continue);
+ cmpd(CR0, R11_scratch1, R14_bcp);
+ beq(CR0, verify_continue);
call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::verify_mdp ), R19_method, R14_bcp, R28_mdx);
@@ -1335,8 +1334,8 @@ void InterpreterMacroAssembler::test_mdp_data_at(int offset,
assert(ProfileInterpreter, "must be profiling interpreter");
ld(test_out, offset, R28_mdx);
- cmpd(CCR0, value, test_out);
- bne(CCR0, not_equal_continue);
+ cmpd(CR0, value, test_out);
+ bne(CR0, not_equal_continue);
}
// Update the method data pointer by the displacement located at some fixed
@@ -1492,8 +1491,8 @@ void InterpreterMacroAssembler::profile_virtual_call(Register Rreceiver,
Label skip_receiver_profile;
if (receiver_can_be_null) {
Label not_null;
- cmpdi(CCR0, Rreceiver, 0);
- bne(CCR0, not_null);
+ cmpdi(CR0, Rreceiver, 0);
+ bne(CR0, not_null);
// We are making a call. Increment the count for null receiver.
increment_mdp_data_at(in_bytes(CounterData::count_offset()), Rscratch1, Rscratch2);
b(skip_receiver_profile);
@@ -1682,8 +1681,8 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
if (start_row == last_row) {
// The only thing left to do is handle the null case.
// Scratch1 contains test_out from test_mdp_data_at.
- cmpdi(CCR0, scratch1, 0);
- beq(CCR0, found_null);
+ cmpdi(CR0, scratch1, 0);
+ beq(CR0, found_null);
// Receiver did not match any saved receiver and there is no empty row for it.
// Increment total counter to indicate polymorphic case.
increment_mdp_data_at(in_bytes(CounterData::count_offset()), scratch1, scratch2);
@@ -1692,8 +1691,8 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
break;
}
// Since null is rare, make it be the branch-taken case.
- cmpdi(CCR0, scratch1, 0);
- beq(CCR0, found_null);
+ cmpdi(CR0, scratch1, 0);
+ beq(CR0, found_null);
// Put all the "Case 3" tests here.
record_klass_in_profile_helper(receiver, scratch1, scratch2, start_row + 1, done);
@@ -1735,27 +1734,27 @@ void InterpreterMacroAssembler::profile_obj_type(Register obj, Register mdo_addr
ld(tmp, mdo_addr_offs, mdo_addr_base);
// Set null_seen if obj is 0.
- cmpdi(CCR0, obj, 0);
+ cmpdi(CR0, obj, 0);
ori(R0, tmp, TypeEntries::null_seen);
- beq(CCR0, do_update);
+ beq(CR0, do_update);
load_klass(klass, obj);
clrrdi(R0, tmp, exact_log2(-TypeEntries::type_klass_mask));
// Basically same as andi(R0, tmp, TypeEntries::type_klass_mask);
- cmpd(CCR1, R0, klass);
+ cmpd(CR1, R0, klass);
// Klass seen before, nothing to do (regardless of unknown bit).
- //beq(CCR1, do_nothing);
+ //beq(CR1, do_nothing);
andi_(R0, tmp, TypeEntries::type_unknown);
// Already unknown. Nothing to do anymore.
- //bne(CCR0, do_nothing);
- crorc(CCR0, Assembler::equal, CCR1, Assembler::equal); // cr0 eq = cr1 eq or cr0 ne
- beq(CCR0, do_nothing);
+ //bne(CR0, do_nothing);
+ crorc(CR0, Assembler::equal, CR1, Assembler::equal); // cr0 eq = cr1 eq or cr0 ne
+ beq(CR0, do_nothing);
clrrdi_(R0, tmp, exact_log2(-TypeEntries::type_mask));
orr(R0, klass, tmp); // Combine klass and null_seen bit (only used if (tmp & type_mask)==0).
- beq(CCR0, do_update); // First time here. Set profile type.
+ beq(CR0, do_update); // First time here. Set profile type.
// Different than before. Cannot keep accurate profile.
ori(R0, tmp, TypeEntries::type_unknown);
@@ -1786,8 +1785,8 @@ void InterpreterMacroAssembler::profile_arguments_type(Register callee,
in_bytes(VirtualCallData::virtual_call_data_size()) : in_bytes(CounterData::counter_data_size());
lbz(tmp1, in_bytes(DataLayout::tag_offset()) - off_to_start, R28_mdx);
- cmpwi(CCR0, tmp1, is_virtual ? DataLayout::virtual_call_type_data_tag : DataLayout::call_type_data_tag);
- bne(CCR0, profile_continue);
+ cmpwi(CR0, tmp1, is_virtual ? DataLayout::virtual_call_type_data_tag : DataLayout::call_type_data_tag);
+ bne(CR0, profile_continue);
if (MethodData::profile_arguments()) {
Label done;
@@ -1798,9 +1797,9 @@ void InterpreterMacroAssembler::profile_arguments_type(Register callee,
if (i > 0 || MethodData::profile_return()) {
// If return value type is profiled we may have no argument to profile.
ld(tmp1, in_bytes(TypeEntriesAtCall::cell_count_offset())-off_to_args, R28_mdx);
- cmpdi(CCR0, tmp1, (i+1)*TypeStackSlotEntries::per_arg_count());
+ cmpdi(CR0, tmp1, (i+1)*TypeStackSlotEntries::per_arg_count());
addi(tmp1, tmp1, -i*TypeStackSlotEntries::per_arg_count());
- blt(CCR0, done);
+ blt(CR0, done);
}
ld(tmp1, in_bytes(Method::const_offset()), callee);
lhz(tmp1, in_bytes(ConstMethod::size_of_parameters_offset()), tmp1);
@@ -1866,12 +1865,12 @@ void InterpreterMacroAssembler::profile_return_type(Register ret, Register tmp1,
// length.
lbz(tmp1, 0, R14_bcp);
lbz(tmp2, in_bytes(Method::intrinsic_id_offset()), R19_method);
- cmpwi(CCR0, tmp1, Bytecodes::_invokedynamic);
- cmpwi(CCR1, tmp1, Bytecodes::_invokehandle);
- cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
- cmpwi(CCR1, tmp2, static_cast(vmIntrinsics::_compiledLambdaForm));
- cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
- bne(CCR0, profile_continue);
+ cmpwi(CR0, tmp1, Bytecodes::_invokedynamic);
+ cmpwi(CR1, tmp1, Bytecodes::_invokehandle);
+ cror(CR0, Assembler::equal, CR1, Assembler::equal);
+ cmpwi(CR1, tmp2, static_cast(vmIntrinsics::_compiledLambdaForm));
+ cror(CR0, Assembler::equal, CR1, Assembler::equal);
+ bne(CR0, profile_continue);
}
profile_obj_type(ret, R28_mdx, -in_bytes(ReturnTypeEntry::size()), tmp1, tmp2);
@@ -1891,8 +1890,8 @@ void InterpreterMacroAssembler::profile_parameters_type(Register tmp1, Register
// Load the offset of the area within the MDO used for
// parameters. If it's negative we're not profiling any parameters.
lwz(tmp1, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset()), R28_mdx);
- cmpwi(CCR0, tmp1, 0);
- blt(CCR0, profile_continue);
+ cmpwi(CR0, tmp1, 0);
+ blt(CR0, profile_continue);
// Compute a pointer to the area for parameters from the offset
// and move the pointer to the slot for the last
@@ -1937,9 +1936,9 @@ void InterpreterMacroAssembler::profile_parameters_type(Register tmp1, Register
// Go to next parameter.
int delta = TypeStackSlotEntries::per_arg_count() * DataLayout::cell_size + (type_base - off_base);
- cmpdi(CCR0, entry_offset, off_base + delta);
+ cmpdi(CR0, entry_offset, off_base + delta);
addi(entry_offset, entry_offset, -delta);
- bge(CCR0, loop);
+ bge(CR0, loop);
align(32, 12);
bind(profile_continue);
@@ -1976,7 +1975,7 @@ void InterpreterMacroAssembler::add_monitor_to_stack(bool stack_is_empty, Regist
subf(n_slots, esp, R26_monitor);
srdi_(n_slots, n_slots, LogBytesPerWord); // Compute number of slots to copy.
assert(LogBytesPerWord == 3, "conflicts assembler instructions");
- beq(CCR0, copy_slot_finished); // Nothing to copy.
+ beq(CR0, copy_slot_finished); // Nothing to copy.
mtctr(n_slots);
@@ -2116,8 +2115,8 @@ void InterpreterMacroAssembler::check_and_forward_exception(Register Rscratch1,
Label Ldone;
// Get pending exception oop.
ld(Rexception, thread_(pending_exception));
- cmpdi(CCR0, Rexception, 0);
- beq(CCR0, Ldone);
+ cmpdi(CR0, Rexception, 0);
+ beq(CR0, Ldone);
li(Rtmp, 0);
mr_if_needed(R3, Rexception);
std(Rtmp, thread_(pending_exception)); // Clear exception in thread
@@ -2169,7 +2168,7 @@ void InterpreterMacroAssembler::call_VM_preemptable(Register oop_result, address
Label resume_pc, not_preempted;
DEBUG_ONLY(ld(R0, in_bytes(JavaThread::preempt_alternate_return_offset()), R16_thread));
- DEBUG_ONLY(cmpdi(CCR0, R0, 0));
+ DEBUG_ONLY(cmpdi(CR0, R0, 0));
asm_assert_eq("Should not have alternate return address set");
// Preserve 2 registers
@@ -2187,8 +2186,8 @@ void InterpreterMacroAssembler::call_VM_preemptable(Register oop_result, address
// Jump to handler if the call was preempted
ld(R0, in_bytes(JavaThread::preempt_alternate_return_offset()), R16_thread);
- cmpdi(CCR0, R0, 0);
- beq(CCR0, not_preempted);
+ cmpdi(CR0, R0, 0);
+ beq(CR0, not_preempted);
mtlr(R0);
li(R0, 0);
std(R0, in_bytes(JavaThread::preempt_alternate_return_offset()), R16_thread);
@@ -2216,8 +2215,8 @@ void InterpreterMacroAssembler::restore_after_resume(Register fp) {
{
Label ok;
ld(R12_scratch2, 0, R1_SP); // load fp
- cmpd(CCR0, R12_scratch2, R11_scratch1);
- beq(CCR0, ok);
+ cmpd(CR0, R12_scratch2, R11_scratch1);
+ beq(CR0, ok);
stop(FILE_AND_LINE ": FP is expected in R11_scratch1");
bind(ok);
}
@@ -2299,8 +2298,8 @@ void InterpreterMacroAssembler::restore_interpreter_state(Register scratch, bool
{
Label Lok;
subf(R0, R1_SP, scratch);
- cmpdi(CCR0, R0, frame::top_ijava_frame_abi_size + frame::ijava_state_size);
- bge(CCR0, Lok);
+ cmpdi(CR0, R0, frame::top_ijava_frame_abi_size + frame::ijava_state_size);
+ bge(CR0, Lok);
stop("frame too small (restore istate)");
bind(Lok);
}
@@ -2313,13 +2312,13 @@ void InterpreterMacroAssembler::get_method_counters(Register method,
BLOCK_COMMENT("Load and ev. allocate counter object {");
Label has_counters;
ld(Rcounters, in_bytes(Method::method_counters_offset()), method);
- cmpdi(CCR0, Rcounters, 0);
- bne(CCR0, has_counters);
+ cmpdi(CR0, Rcounters, 0);
+ bne(CR0, has_counters);
call_VM(noreg, CAST_FROM_FN_PTR(address,
InterpreterRuntime::build_method_counters), method);
ld(Rcounters, in_bytes(Method::method_counters_offset()), method);
- cmpdi(CCR0, Rcounters, 0);
- beq(CCR0, skip); // No MethodCounters, OutOfMemory.
+ cmpdi(CR0, Rcounters, 0);
+ beq(CR0, skip); // No MethodCounters, OutOfMemory.
BLOCK_COMMENT("} Load and ev. allocate counter object");
bind(has_counters);
@@ -2382,12 +2381,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;
@@ -2399,7 +2392,7 @@ void InterpreterMacroAssembler::verify_oop_or_return_address(Register reg, Regis
const int log2_bytecode_size_limit = 16;
srdi_(Rtmp, reg, log2_bytecode_size_limit);
- bne(CCR0, test);
+ bne(CR0, test);
address fd = CAST_FROM_FN_PTR(address, verify_return_address);
const int nbytes_save = MacroAssembler::num_volatile_regs * 8;
@@ -2443,8 +2436,8 @@ void InterpreterMacroAssembler::notify_method_entry() {
Label jvmti_post_done;
lwz(R0, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
- cmpwi(CCR0, R0, 0);
- beq(CCR0, jvmti_post_done);
+ cmpwi(CR0, R0, 0);
+ beq(CR0, jvmti_post_done);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_entry));
bind(jvmti_post_done);
@@ -2477,8 +2470,8 @@ void InterpreterMacroAssembler::notify_method_exit(bool is_native_method, TosSta
Label jvmti_post_done;
lwz(R0, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
- cmpwi(CCR0, R0, 0);
- beq(CCR0, jvmti_post_done);
+ cmpwi(CR0, R0, 0);
+ beq(CR0, jvmti_post_done);
if (!is_native_method) { push(state); } // Expose tos to GC.
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_exit), check_exceptions);
if (!is_native_method) { pop(state); }
diff --git a/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp b/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp
index e2043db7100..dd2503bd54b 100644
--- a/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp
+++ b/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "interpreter/interp_masm.hpp"
#include "interpreter/interpreter.hpp"
@@ -104,9 +103,9 @@ void InterpreterRuntime::SignatureHandlerGenerator::pass_object() {
Label do_null;
if (do_null_check) {
__ ld(R0, locals_j_arg_at(offset()));
- __ cmpdi(CCR0, R0, 0);
+ __ cmpdi(CR0, R0, 0);
__ li(r, 0);
- __ beq(CCR0, do_null);
+ __ beq(CR0, do_null);
}
__ addir(r, locals_j_arg_at(offset()));
__ bind(do_null);
diff --git a/src/hotspot/cpu/ppc/jniFastGetField_ppc.cpp b/src/hotspot/cpu/ppc/jniFastGetField_ppc.cpp
index 819ecaf550e..1c48ee4412e 100644
--- a/src/hotspot/cpu/ppc/jniFastGetField_ppc.cpp
+++ b/src/hotspot/cpu/ppc/jniFastGetField_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
@@ -76,7 +75,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
__ ld(Rcounter, counter_offs, Rcounter_addr);
__ andi_(R0, Rcounter, 1);
- __ bne(CCR0, slow);
+ __ bne(CR0, slow);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
// Field may be volatile.
@@ -92,8 +91,8 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
int fac_offs = __ load_const_optimized(Rtmp, JvmtiExport::get_field_access_count_addr(),
R0, true);
__ lwa(Rtmp, fac_offs, Rtmp);
- __ cmpwi(CCR0, Rtmp, 0);
- __ bne(CCR0, slow);
+ __ cmpwi(CR0, Rtmp, 0);
+ __ bne(CR0, slow);
}
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
@@ -119,8 +118,8 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
// Order preceding load(s) wrt. succeeding check (LoadStore for volatile field).
if (is_fp) {
Label next;
- __ fcmpu(CCR0, F1_RET, F1_RET);
- __ bne(CCR0, next);
+ __ fcmpu(CR0, F1_RET, F1_RET);
+ __ bne(CR0, next);
__ bind(next);
} else {
__ twi_0(Rtmp);
@@ -128,8 +127,8 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
__ isync();
__ ld(R0, counter_offs, Rcounter_addr);
- __ cmpd(CCR0, R0, Rcounter);
- __ bne(CCR0, slow);
+ __ cmpd(CR0, R0, Rcounter);
+ __ bne(CR0, slow);
if (!is_fp) {
__ mr(R3_RET, Rtmp);
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
index 971ed99f9eb..40019ef9f4b 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "compiler/disassembler.hpp"
@@ -1285,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);
@@ -1304,17 +1297,13 @@ int MacroAssembler::ic_check(int end_alignment) {
mtctr(tmp1);
if (!implicit_null_checks_available) {
- cmpdi(CCR0, receiver, 0);
- beqctr(CCR0);
- }
- if (UseCompressedClassPointers) {
- lwz(tmp1, oopDesc::klass_offset_in_bytes(), receiver);
- } else {
- ld(tmp1, oopDesc::klass_offset_in_bytes(), receiver);
+ cmpdi(CR0, receiver, 0);
+ beqctr(CR0);
}
+ load_klass_no_decode(tmp1, receiver); // 2 instructions with UseCompactObjectHeaders
ld(tmp2, in_bytes(CompiledICData::speculated_klass_offset()), data);
- cmpd(CCR0, tmp1, tmp2);
- bnectr(CCR0);
+ cmpd(CR0, tmp1, tmp2);
+ bnectr(CR0);
}
assert((offset() % end_alignment) == 0, "Misaligned verified entry point");
@@ -1528,8 +1517,8 @@ void MacroAssembler::reserved_stack_check(Register return_pc) {
Label no_reserved_zone_enabling;
ld_ptr(R0, JavaThread::reserved_stack_activation_offset(), R16_thread);
- cmpld(CCR0, R1_SP, R0);
- blt_predict_taken(CCR0, no_reserved_zone_enabling);
+ cmpld(CR0, R1_SP, R0);
+ blt_predict_taken(CR0, no_reserved_zone_enabling);
// Enable reserved zone again, throw stack overflow exception.
push_frame_reg_args(0, R0);
@@ -1552,9 +1541,9 @@ void MacroAssembler::getandsetd(Register dest_current_value, Register exchange_v
ldarx(dest_current_value, addr_base, cmpxchgx_hint);
stdcx_(exchange_value, addr_base);
if (UseStaticBranchPredictionInCompareAndSwapPPC64) {
- bne_predict_not_taken(CCR0, retry); // StXcx_ sets CCR0.
+ bne_predict_not_taken(CR0, retry); // StXcx_ sets CR0.
} else {
- bne( CCR0, retry); // StXcx_ sets CCR0.
+ bne( CR0, retry); // StXcx_ sets CR0.
}
}
@@ -1566,9 +1555,9 @@ void MacroAssembler::getandaddd(Register dest_current_value, Register inc_value,
add(tmp, dest_current_value, inc_value);
stdcx_(tmp, addr_base);
if (UseStaticBranchPredictionInCompareAndSwapPPC64) {
- bne_predict_not_taken(CCR0, retry); // StXcx_ sets CCR0.
+ bne_predict_not_taken(CR0, retry); // StXcx_ sets CR0.
} else {
- bne( CCR0, retry); // StXcx_ sets CCR0.
+ bne( CR0, retry); // StXcx_ sets CR0.
}
}
@@ -1639,9 +1628,9 @@ void MacroAssembler::atomic_get_and_modify_generic(Register dest_current_value,
}
if (UseStaticBranchPredictionInCompareAndSwapPPC64) {
- bne_predict_not_taken(CCR0, retry); // StXcx_ sets CCR0.
+ bne_predict_not_taken(CR0, retry); // StXcx_ sets CR0.
} else {
- bne( CCR0, retry); // StXcx_ sets CCR0.
+ bne( CR0, retry); // StXcx_ sets CR0.
}
// l?arx zero-extends, but Java wants byte/short values sign-extended.
@@ -1745,7 +1734,7 @@ void MacroAssembler::cmpxchg_generic(ConditionRegister flag, Register dest_curre
bool preset_result_reg = (int_flag_success != dest_current_value && int_flag_success != compare_value.register_or_noreg() &&
int_flag_success != exchange_value && int_flag_success != addr_base &&
int_flag_success != tmp1 && int_flag_success != tmp2);
- assert(!weak || flag == CCR0, "weak only supported with CCR0");
+ assert(!weak || flag == CR0, "weak only supported with CR0");
assert(int_flag_success == noreg || failed_ext == nullptr, "cannot have both");
assert(size == 1 || size == 2 || size == 4, "unsupported");
@@ -1774,9 +1763,9 @@ void MacroAssembler::cmpxchg_generic(ConditionRegister flag, Register dest_curre
retry, failed, cmpxchgx_hint, size);
if (!weak || use_result_reg || failed_ext) {
if (UseStaticBranchPredictionInCompareAndSwapPPC64) {
- bne_predict_not_taken(CCR0, weak ? failed : retry); // StXcx_ sets CCR0.
+ bne_predict_not_taken(CR0, weak ? failed : retry); // StXcx_ sets CR0.
} else {
- bne( CCR0, weak ? failed : retry); // StXcx_ sets CCR0.
+ bne( CR0, weak ? failed : retry); // StXcx_ sets CR0.
}
}
// fall through => (flag == eq), (dest_current_value == compare_value), (swapped)
@@ -1838,7 +1827,7 @@ void MacroAssembler::cmpxchgd(ConditionRegister flag, Register dest_current_valu
bool use_result_reg = (int_flag_success!=noreg);
bool preset_result_reg = (int_flag_success!=dest_current_value && int_flag_success!=compare_value.register_or_noreg() &&
int_flag_success!=exchange_value && int_flag_success!=addr_base);
- assert(!weak || flag == CCR0, "weak only supported with CCR0");
+ assert(!weak || flag == CR0, "weak only supported with CR0");
assert(int_flag_success == noreg || failed_ext == nullptr, "cannot have both");
if (use_result_reg && preset_result_reg) {
@@ -1871,9 +1860,9 @@ void MacroAssembler::cmpxchgd(ConditionRegister flag, Register dest_current_valu
stdcx_(exchange_value, addr_base);
if (!weak || use_result_reg || failed_ext) {
if (UseStaticBranchPredictionInCompareAndSwapPPC64) {
- bne_predict_not_taken(CCR0, weak ? failed : retry); // stXcx_ sets CCR0
+ bne_predict_not_taken(CR0, weak ? failed : retry); // stXcx_ sets CR0
} else {
- bne( CCR0, weak ? failed : retry); // stXcx_ sets CCR0
+ bne( CR0, weak ? failed : retry); // stXcx_ sets CR0
}
}
@@ -1961,12 +1950,12 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
// Check that this entry is non-null. A null entry means that
// the receiver class doesn't implement the interface, and wasn't the
// same as when the caller was compiled.
- cmpd(CCR0, temp2, intf_klass);
+ cmpd(CR0, temp2, intf_klass);
if (peel) {
- beq(CCR0, found_method);
+ beq(CR0, found_method);
} else {
- bne(CCR0, search);
+ bne(CR0, search);
// (invert the test to fall through to found_method...)
}
@@ -1974,8 +1963,8 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
bind(search);
- cmpdi(CCR0, temp2, 0);
- beq(CCR0, L_no_such_interface);
+ cmpdi(CR0, temp2, 0);
+ beq(CR0, L_no_such_interface);
addi(scan_temp, scan_temp, scan_step);
}
@@ -2045,8 +2034,8 @@ void MacroAssembler::check_klass_subtype_fast_path(Register sub_klass,
// We move this check to the front of the fast path because many
// type checks are in fact trivially successful in this manner,
// so we get a nicely predicted branch right at the start of the check.
- cmpd(CCR0, sub_klass, super_klass);
- beq(CCR0, *L_success);
+ cmpd(CR0, sub_klass, super_klass);
+ beq(CR0, *L_success);
// Check the supertype display:
if (must_load_sco) {
@@ -2059,7 +2048,7 @@ void MacroAssembler::check_klass_subtype_fast_path(Register sub_klass,
// The loaded value is the offset from Klass.
ld(cached_super, super_check_offset, sub_klass);
- cmpd(CCR0, cached_super, super_klass);
+ cmpd(CR0, cached_super, super_klass);
// This check has worked decisively for primary supers.
// Secondary supers are sought in the super_cache ('super_cache_addr').
@@ -2075,29 +2064,29 @@ void MacroAssembler::check_klass_subtype_fast_path(Register sub_klass,
#define FINAL_JUMP(label) if (&(label) != &L_fallthrough) { b(label); }
if (super_check_offset.is_register()) {
- beq(CCR0, *L_success);
- cmpwi(CCR0, super_check_offset.as_register(), sc_offset);
+ beq(CR0, *L_success);
+ cmpwi(CR0, super_check_offset.as_register(), sc_offset);
if (L_failure == &L_fallthrough) {
- beq(CCR0, *L_slow_path);
+ beq(CR0, *L_slow_path);
} else {
- bne(CCR0, *L_failure);
+ bne(CR0, *L_failure);
FINAL_JUMP(*L_slow_path);
}
} else {
if (super_check_offset.as_constant() == sc_offset) {
// Need a slow path; fast failure is impossible.
if (L_slow_path == &L_fallthrough) {
- beq(CCR0, *L_success);
+ beq(CR0, *L_success);
} else {
- bne(CCR0, *L_slow_path);
+ bne(CR0, *L_slow_path);
FINAL_JUMP(*L_success);
}
} else {
// No slow path; it's a fast decision.
if (L_failure == &L_fallthrough) {
- beq(CCR0, *L_success);
+ beq(CR0, *L_success);
} else {
- bne(CCR0, *L_failure);
+ bne(CR0, *L_failure);
FINAL_JUMP(*L_success);
}
}
@@ -2107,16 +2096,17 @@ void MacroAssembler::check_klass_subtype_fast_path(Register sub_klass,
#undef FINAL_JUMP
}
-void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
- Register super_klass,
- Register temp1_reg,
- Register temp2_reg,
- Label* L_success,
- Register result_reg) {
+void MacroAssembler::check_klass_subtype_slow_path_linear(Register sub_klass,
+ Register super_klass,
+ Register temp1_reg,
+ Register temp2_reg,
+ Label* L_success,
+ Register result_reg) {
const Register array_ptr = temp1_reg; // current value from cache array
const Register temp = temp2_reg;
assert_different_registers(sub_klass, super_klass, array_ptr, temp);
+ assert(L_success == nullptr || result_reg == noreg, "can't have both");
int source_offset = in_bytes(Klass::secondary_supers_offset());
int target_offset = in_bytes(Klass::secondary_super_cache_offset());
@@ -2130,32 +2120,125 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
// TODO: PPC port: assert(4 == arrayOopDesc::length_length_in_bytes(), "precondition violated.");
lwz(temp, length_offset, array_ptr);
- cmpwi(CCR0, temp, 0);
- beq(CCR0, result_reg!=noreg ? failure : fallthru); // length 0
+ cmpwi(CR0, temp, 0);
+ beq(CR0, (L_success == nullptr) ? failure : fallthru); // indicate failure if length 0
mtctr(temp); // load ctr
bind(loop);
// Oops in table are NO MORE compressed.
ld(temp, base_offset, array_ptr);
- cmpd(CCR0, temp, super_klass);
- beq(CCR0, hit);
+ cmpd(CR0, temp, super_klass);
+ beq(CR0, hit);
addi(array_ptr, array_ptr, BytesPerWord);
bdnz(loop);
bind(failure);
- if (result_reg!=noreg) li(result_reg, 1); // load non-zero result (indicates a miss)
+ if (result_reg != noreg) {
+ li(result_reg, 1); // load non-zero result (indicates a miss)
+ } else if (L_success == nullptr) {
+ crandc(CR0, Assembler::equal, CR0, Assembler::equal); // miss indicated by CR0.ne
+ }
b(fallthru);
bind(hit);
std(super_klass, target_offset, sub_klass); // save result to cache
- if (result_reg != noreg) { li(result_reg, 0); } // load zero result (indicates a hit)
- if (L_success != nullptr) { b(*L_success); }
- else if (result_reg == noreg) { blr(); } // return with CR0.eq if neither label nor result reg provided
+ if (result_reg != noreg) {
+ li(result_reg, 0); // load zero result (indicates a hit)
+ } else if (L_success != nullptr) {
+ b(*L_success);
+ }
bind(fallthru);
}
+Register MacroAssembler::allocate_if_noreg(Register r,
+ RegSetIterator &available_regs,
+ RegSet ®s_to_push) {
+ if (!r->is_valid()) {
+ r = *available_regs++;
+ regs_to_push += r;
+ }
+ return r;
+}
+
+void MacroAssembler::push_set(RegSet set)
+{
+ int spill_offset = 0;
+ for (RegSetIterator it = set.begin(); *it != noreg; ++it) {
+ spill_offset += wordSize;
+ std(*it, -spill_offset, R1_SP);
+ }
+}
+
+void MacroAssembler::pop_set(RegSet set)
+{
+ int spill_offset = 0;
+ for (RegSetIterator it = set.begin(); *it != noreg; ++it) {
+ spill_offset += wordSize;
+ ld(*it, -spill_offset, R1_SP);
+ }
+}
+
+void MacroAssembler::check_klass_subtype_slow_path_table(Register sub_klass,
+ Register super_klass,
+ Register temp1_reg,
+ Register temp2_reg,
+ Label* L_success,
+ Register result_reg) {
+ RegSet temps = RegSet::of(temp1_reg, temp2_reg);
+
+ assert_different_registers(sub_klass, super_klass, temp1_reg, temp2_reg, result_reg, R0);
+
+ Register temp3_reg = noreg, temp4_reg = noreg;
+ bool result_reg_provided = (result_reg != noreg); // otherwise, result will be in CR0
+
+ BLOCK_COMMENT("check_klass_subtype_slow_path_table");
+
+ RegSetIterator available_regs
+ = (RegSet::range(R2, R12) - temps - sub_klass - super_klass).begin();
+
+ RegSet pushed_regs;
+
+ temp1_reg = allocate_if_noreg(temp1_reg, available_regs, pushed_regs);
+ temp2_reg = allocate_if_noreg(temp2_reg, available_regs, pushed_regs);
+ temp3_reg = allocate_if_noreg(temp3_reg, available_regs, pushed_regs);
+ temp4_reg = allocate_if_noreg(temp4_reg, available_regs, pushed_regs);
+ result_reg = allocate_if_noreg(result_reg, available_regs, pushed_regs);
+
+ push_set(pushed_regs);
+
+ lookup_secondary_supers_table_var(sub_klass, super_klass,
+ temp1_reg, temp2_reg, temp3_reg, temp4_reg,
+ result_reg);
+
+ if (L_success != nullptr || !result_reg_provided) {
+ // result_reg may get overwritten by pop_set
+ cmpdi(CR0, result_reg, 0);
+ }
+
+ // Unspill the temp. registers:
+ pop_set(pushed_regs);
+
+ if (L_success != nullptr) {
+ beq(CR0, *L_success);
+ }
+}
+
+void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
+ Register super_klass,
+ Register temp1_reg,
+ Register temp2_reg,
+ Label* L_success,
+ Register result_reg) {
+ if (UseSecondarySupersTable) {
+ check_klass_subtype_slow_path_table(sub_klass, super_klass, temp1_reg, temp2_reg, L_success, result_reg);
+ } else {
+ if (temp2_reg == noreg) temp2_reg = R0;
+ check_klass_subtype_slow_path_linear(sub_klass, super_klass, temp1_reg, temp2_reg, L_success, result_reg);
+ }
+}
+
// Try fast path, then go to slow one if not successful
void MacroAssembler::check_klass_subtype(Register sub_klass,
Register super_klass,
@@ -2172,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;
+ Label Lloop, Lafter_loop, Lexit;
-#ifdef ASSERT
- {
- Label ok;
- cmpdi(CCR0, count, 0);
- bgt(CCR0, ok);
- stop("count must be positive");
- bind(ok);
- }
-#endif
+ srdi_(scratch, count, 1);
+ beq(CR0, Lafter_loop);
+ mtctr(scratch);
- mtctr(count);
-
- bind(Lloop);
- ld(scratch, 0 , addr);
+ bind(Lloop); // 2x unrolled
+ ld(scratch, 0, addr);
xor_(scratch, scratch, value);
- beq(CCR0, Lexit);
- addi(addr, addr, wordSize);
+ beq(CR0, Lexit);
+ ld(scratch, 8, addr);
+ xor_(scratch, scratch, value);
+ beq(CR0, Lexit);
+ 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);
}
@@ -2208,19 +2292,19 @@ do { \
(result == R8_ARG6 || result == noreg), "registers must match ppc64.ad"); \
} while(0)
-void MacroAssembler::lookup_secondary_supers_table(Register r_sub_klass,
- Register r_super_klass,
- Register temp1,
- Register temp2,
- Register temp3,
- Register temp4,
- Register result,
- u1 super_klass_slot) {
+void MacroAssembler::lookup_secondary_supers_table_const(Register r_sub_klass,
+ Register r_super_klass,
+ Register temp1,
+ Register temp2,
+ Register temp3,
+ Register temp4,
+ Register result,
+ u1 super_klass_slot) {
assert_different_registers(r_sub_klass, r_super_klass, temp1, temp2, temp3, temp4, result);
Label L_done;
- BLOCK_COMMENT("lookup_secondary_supers_table {");
+ BLOCK_COMMENT("lookup_secondary_supers_table_const {");
const Register
r_array_base = temp1,
@@ -2228,7 +2312,7 @@ void MacroAssembler::lookup_secondary_supers_table(Register r_sub_klass,
r_array_index = temp3,
r_bitmap = temp4;
- LOOKUP_SECONDARY_SUPERS_TABLE_REGISTERS;
+ LOOKUP_SECONDARY_SUPERS_TABLE_REGISTERS; // Required for stub call below.
ld(r_bitmap, in_bytes(Klass::secondary_supers_bitmap_offset()), r_sub_klass);
@@ -2243,7 +2327,7 @@ void MacroAssembler::lookup_secondary_supers_table(Register r_sub_klass,
li(result, 1); // failure
// We test the MSB of r_array_index, i.e. its sign bit
- bge(CCR0, L_done);
+ bge(CR0, L_done);
// We will consult the secondary-super array.
ld(r_array_base, in_bytes(Klass::secondary_supers_offset()), r_sub_klass);
@@ -2267,11 +2351,11 @@ void MacroAssembler::lookup_secondary_supers_table(Register r_sub_klass,
}
xor_(result, result, r_super_klass);
- beq(CCR0, L_done); // Found a match (result == 0)
+ beq(CR0, L_done); // Found a match (result == 0)
// Is there another entry to check? Consult the bitmap.
- testbitdi(CCR0, /* temp */ r_array_length, r_bitmap, (bit + 1) & Klass::SECONDARY_SUPERS_TABLE_MASK);
- beq(CCR0, L_done); // (result != 0)
+ testbitdi(CR0, /* temp */ r_array_length, r_bitmap, (bit + 1) & Klass::SECONDARY_SUPERS_TABLE_MASK);
+ beq(CR0, L_done); // (result != 0)
// Linear probe. Rotate the bitmap so that the next bit to test is
// in Bit 2 for the look-ahead check in the slow path.
@@ -2290,7 +2374,90 @@ void MacroAssembler::lookup_secondary_supers_table(Register r_sub_klass,
bctrl();
bind(L_done);
- BLOCK_COMMENT("} lookup_secondary_supers_table");
+ BLOCK_COMMENT("} lookup_secondary_supers_table_const");
+
+ if (VerifySecondarySupers) {
+ verify_secondary_supers_table(r_sub_klass, r_super_klass, result,
+ temp1, temp2, temp3);
+ }
+}
+
+// At runtime, return 0 in result if r_super_klass is a superclass of
+// r_sub_klass, otherwise return nonzero. Use this version of
+// lookup_secondary_supers_table() if you don't know ahead of time
+// which superclass will be searched for. Used by interpreter and
+// runtime stubs. It is larger and has somewhat greater latency than
+// the version above, which takes a constant super_klass_slot.
+void MacroAssembler::lookup_secondary_supers_table_var(Register r_sub_klass,
+ Register r_super_klass,
+ Register temp1,
+ Register temp2,
+ Register temp3,
+ Register temp4,
+ Register result) {
+ assert_different_registers(r_sub_klass, r_super_klass, temp1, temp2, temp3, temp4, result, R0);
+
+ Label L_done;
+
+ BLOCK_COMMENT("lookup_secondary_supers_table_var {");
+
+ const Register
+ r_array_base = temp1,
+ slot = temp2,
+ r_array_index = temp3,
+ r_bitmap = temp4;
+
+ lbz(slot, in_bytes(Klass::hash_slot_offset()), r_super_klass);
+ ld(r_bitmap, in_bytes(Klass::secondary_supers_bitmap_offset()), r_sub_klass);
+
+ li(result, 1); // Make sure that result is nonzero if the test below misses.
+
+ // First check the bitmap to see if super_klass might be present. If
+ // the bit is zero, we are certain that super_klass is not one of
+ // the secondary supers.
+ xori(R0, slot, Klass::SECONDARY_SUPERS_TABLE_SIZE - 1); // slot ^ 63 === 63 - slot (mod 64)
+ sld_(r_array_index, r_bitmap, R0); // shift left by 63-slot
+
+ // We test the MSB of r_array_index, i.e. its sign bit
+ bge(CR0, L_done);
+
+ // We will consult the secondary-super array.
+ ld(r_array_base, in_bytes(Klass::secondary_supers_offset()), r_sub_klass);
+
+ // The value i in r_array_index is >= 1, so even though r_array_base
+ // points to the length, we don't need to adjust it to point to the data.
+ assert(Array::base_offset_in_bytes() == wordSize, "Adjust this code");
+ assert(Array::length_offset_in_bytes() == 0, "Adjust this code");
+
+ // Get the first array index that can contain super_klass into r_array_index.
+ popcntd(r_array_index, r_array_index);
+
+ // NB! r_array_index is off by 1. It is compensated by keeping r_array_base off by 1 word.
+ sldi(r_array_index, r_array_index, LogBytesPerWord); // scale
+
+ ldx(R0, r_array_base, r_array_index);
+ xor_(result, R0, r_super_klass);
+ beq(CR0, L_done); // found a match, result is 0 in this case
+
+ // Linear probe. Rotate the bitmap so that the next bit to test is
+ // in Bit 1.
+ neg(R0, slot); // rotate right
+ rldcl(r_bitmap, r_bitmap, R0, 0);
+ Register temp = slot;
+ andi_(temp, r_bitmap, 2);
+ beq(CR0, L_done); // fail (result != 0)
+
+ // The slot we just inspected is at secondary_supers[r_array_index - 1].
+ // The next slot to be inspected, by the logic we're about to call,
+ // is secondary_supers[r_array_index]. Bits 0 and 1 in the bitmap
+ // have been checked.
+ lookup_secondary_supers_table_slow_path(r_super_klass, r_array_base, r_array_index,
+ r_bitmap, result, temp);
+ // return whatever we got from slow path
+
+ bind(L_done);
+
+ BLOCK_COMMENT("} lookup_secondary_supers_table_var");
if (VerifySecondarySupers) {
verify_secondary_supers_table(r_sub_klass, r_super_klass, result,
@@ -2313,8 +2480,6 @@ void MacroAssembler::lookup_secondary_supers_table_slow_path(Register r_super_kl
r_array_length = temp1,
r_sub_klass = noreg;
- LOOKUP_SECONDARY_SUPERS_TABLE_REGISTERS;
-
Label L_done;
// Load the array length.
@@ -2329,8 +2494,8 @@ void MacroAssembler::lookup_secondary_supers_table_slow_path(Register r_super_kl
// The bitmap is full to bursting.
// Implicit invariant: BITMAP_FULL implies (length > 0)
- cmpwi(CCR0, r_array_length, (int32_t)Klass::SECONDARY_SUPERS_TABLE_SIZE - 2);
- bgt(CCR0, L_huge);
+ cmpwi(CR0, r_array_length, (int32_t)Klass::SECONDARY_SUPERS_TABLE_SIZE - 2);
+ bgt(CR0, L_huge);
// NB! Our caller has checked bits 0 and 1 in the bitmap. The
// current slot (at secondary_supers[r_array_index]) has not yet
@@ -2348,8 +2513,8 @@ void MacroAssembler::lookup_secondary_supers_table_slow_path(Register r_super_kl
// We should only reach here after having found a bit in the bitmap.
// Invariant: array_length == popcount(bitmap)
Label ok;
- cmpdi(CCR0, r_array_length, 0);
- bgt(CCR0, ok);
+ cmpdi(CR0, r_array_length, 0);
+ bgt(CR0, ok);
stop("array_length must be positive");
bind(ok);
}
@@ -2363,16 +2528,16 @@ void MacroAssembler::lookup_secondary_supers_table_slow_path(Register r_super_kl
bind(L_loop);
// Check for wraparound.
- cmpd(CCR0, r_array_index, r_array_length);
- isel_0(r_array_index, CCR0, Assembler::greater);
+ cmpd(CR0, r_array_index, r_array_length);
+ isel_0(r_array_index, CR0, Assembler::greater);
ldx(result, r_array_base, r_array_index);
xor_(result, result, r_super_klass);
- beq(CCR0, L_done); // success (result == 0)
+ beq(CR0, L_done); // success (result == 0)
// look-ahead check (Bit 2); result is non-zero
- testbitdi(CCR0, R0, r_bitmap, 2);
- beq(CCR0, L_done); // fail (result != 0)
+ testbitdi(CR0, R0, r_bitmap, 2);
+ beq(CR0, L_done); // fail (result != 0)
rldicl(r_bitmap, r_bitmap, 64 - 1, 0);
addi(r_array_index, r_array_index, BytesPerWord);
@@ -2405,8 +2570,6 @@ void MacroAssembler::verify_secondary_supers_table(Register r_sub_klass,
r_array_index = temp3,
r_bitmap = noreg; // unused
- LOOKUP_SECONDARY_SUPERS_TABLE_REGISTERS;
-
BLOCK_COMMENT("verify_secondary_supers_table {");
Label passed, failure;
@@ -2422,24 +2585,28 @@ void MacroAssembler::verify_secondary_supers_table(Register r_sub_klass,
normalize_bool(result, R0, true);
const Register linear_result = r_array_index; // reuse
li(linear_result, 1);
- cmpdi(CCR0, r_array_length, 0);
- ble(CCR0, failure);
+ cmpdi(CR0, r_array_length, 0);
+ ble(CR0, failure);
repne_scan(r_array_base, r_super_klass, r_array_length, linear_result);
bind(failure);
// convert !=0 to 1
normalize_bool(linear_result, R0, true);
- cmpd(CCR0, result, linear_result);
- beq(CCR0, passed);
+ cmpd(CR0, result, linear_result);
+ beq(CR0, passed);
+
+ // report fatal error and terminate VM
+
+ // Argument shuffle. Using stack to avoid clashes.
+ std(r_super_klass, -8, R1_SP);
+ std(r_sub_klass, -16, R1_SP);
+ std(linear_result, -24, R1_SP);
+ mr_if_needed(R6_ARG4, result);
+ ld(R3_ARG1, -8, R1_SP);
+ ld(R4_ARG2, -16, R1_SP);
+ ld(R5_ARG3, -24, R1_SP);
- assert_different_registers(R3_ARG1, r_sub_klass, linear_result, result);
- mr_if_needed(R3_ARG1, r_super_klass);
- assert_different_registers(R4_ARG2, linear_result, result);
- mr_if_needed(R4_ARG2, r_sub_klass);
- assert_different_registers(R5_ARG3, result);
- neg(R5_ARG3, linear_result);
- neg(R6_ARG4, result);
const char* msg = "mismatch";
load_const_optimized(R7_ARG5, (intptr_t)msg, R0);
call_VM_leaf(CAST_FROM_FN_PTR(address, Klass::on_secondary_supers_verification_failure));
@@ -2463,19 +2630,19 @@ void MacroAssembler::clinit_barrier(Register klass, Register thread, Label* L_fa
// Fast path check: class is fully initialized
lbz(R0, in_bytes(InstanceKlass::init_state_offset()), klass);
// acquire by cmp-branch-isync if fully_initialized
- cmpwi(CCR0, R0, InstanceKlass::fully_initialized);
- bne(CCR0, L_check_thread);
+ cmpwi(CR0, R0, InstanceKlass::fully_initialized);
+ bne(CR0, L_check_thread);
isync();
b(*L_fast_path);
// Fast path check: current thread is initializer thread
bind(L_check_thread);
ld(R0, in_bytes(InstanceKlass::init_thread_offset()), klass);
- cmpd(CCR0, thread, R0);
+ cmpd(CR0, thread, R0);
if (L_slow_path == &L_fallthrough) {
- beq(CCR0, *L_fast_path);
+ beq(CR0, *L_fast_path);
} else if (L_fast_path == &L_fallthrough) {
- bne(CCR0, *L_slow_path);
+ bne(CR0, *L_slow_path);
} else {
Unimplemented();
}
@@ -2523,15 +2690,15 @@ void MacroAssembler::tlab_allocate(
} else {
add(new_top, obj, var_size_in_bytes);
}
- cmpld(CCR0, new_top, R0);
- bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::greater), slow_case);
+ cmpld(CR0, new_top, R0);
+ bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::greater), slow_case);
#ifdef ASSERT
// make sure new free pointer is properly aligned
{
Label L;
andi_(R0, new_top, MinObjAlignmentInBytesMask);
- beq(CCR0, L);
+ beq(CR0, L);
stop("updated TLAB free is not properly aligned");
bind(L);
}
@@ -2608,7 +2775,7 @@ void MacroAssembler::compiler_fast_lock_object(ConditionRegister flag, Register
// Handle existing monitor.
// The object has an existing monitor iff (mark & monitor_value) != 0.
andi_(temp, displaced_header, markWord::monitor_value);
- bne(CCR0, object_has_monitor);
+ bne(CR0, object_has_monitor);
if (LockingMode == LM_MONITOR) {
// Set NE to indicate 'failure' -> take slow-path.
@@ -2654,10 +2821,10 @@ void MacroAssembler::compiler_fast_lock_object(ConditionRegister flag, Register
// displaced header in the box, which indicates that it is a recursive lock.
std(R0/*==0, perhaps*/, BasicLock::displaced_header_offset_in_bytes(), box);
- if (flag != CCR0) {
- mcrf(flag, CCR0);
+ if (flag != CR0) {
+ mcrf(flag, CR0);
}
- beq(CCR0, success);
+ beq(CR0, success);
b(failure);
}
@@ -2730,7 +2897,7 @@ void MacroAssembler::compiler_fast_unlock_object(ConditionRegister flag, Registe
// The object has an existing monitor iff (mark & monitor_value) != 0.
ld(current_header, oopDesc::mark_offset_in_bytes(), oop);
andi_(R0, current_header, markWord::monitor_value);
- bne(CCR0, object_has_monitor);
+ bne(CR0, object_has_monitor);
if (LockingMode == LM_MONITOR) {
// Set NE to indicate 'failure' -> take slow-path.
@@ -2761,12 +2928,12 @@ void MacroAssembler::compiler_fast_unlock_object(ConditionRegister flag, Registe
ld(displaced_header, in_bytes(ObjectMonitor::recursions_offset()), current_header);
addic_(displaced_header, displaced_header, -1);
- blt(CCR0, not_recursive); // Not recursive if negative after decrement.
+ blt(CR0, not_recursive); // Not recursive if negative after decrement.
// Recursive unlock
std(displaced_header, in_bytes(ObjectMonitor::recursions_offset()), current_header);
- if (flag == CCR0) { // Otherwise, flag is already EQ, here.
- crorc(CCR0, Assembler::equal, CCR0, Assembler::equal); // Set CCR0 EQ
+ if (flag == CR0) { // Otherwise, flag is already EQ, here.
+ crorc(CR0, Assembler::equal, CR0, Assembler::equal); // Set CR0 EQ
}
b(success);
@@ -2781,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.
@@ -2825,7 +2990,7 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
Register tmp1, Register tmp2, Register tmp3) {
assert_different_registers(obj, box, tmp1, tmp2, tmp3);
assert(UseObjectMonitorTable || tmp3 == noreg, "tmp3 not needed");
- assert(flag == CCR0, "bad condition register");
+ assert(flag == CR0, "bad condition register");
// Handle inflated monitor.
Label inflated;
@@ -2843,8 +3008,8 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
if (DiagnoseSyncOnValueBasedClasses != 0) {
load_klass(tmp1, obj);
lbz(tmp1, in_bytes(Klass::misc_flags_offset()), tmp1);
- testbitdi(CCR0, R0, tmp1, exact_log2(KlassFlags::_misc_is_value_based_class));
- bne(CCR0, slow_path);
+ testbitdi(CR0, R0, tmp1, exact_log2(KlassFlags::_misc_is_value_based_class));
+ bne(CR0, slow_path);
}
Register mark = tmp1;
@@ -2858,8 +3023,8 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
// Check if lock-stack is full.
lwz(top, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
- cmplwi(CCR0, top, LockStack::end_offset() - 1);
- bgt(CCR0, slow_path);
+ cmplwi(CR0, top, LockStack::end_offset() - 1);
+ bgt(CR0, slow_path);
// The underflow check is elided. The recursive check will always fail
// when the lock stack is empty because of the _bad_oop_sentinel field.
@@ -2867,15 +3032,15 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
// Check if recursive.
subi(R0, top, oopSize);
ldx(R0, R16_thread, R0);
- cmpd(CCR0, obj, R0);
- beq(CCR0, push);
+ cmpd(CR0, obj, R0);
+ beq(CR0, push);
// Check for monitor (0b10) or locked (0b00).
ld(mark, oopDesc::mark_offset_in_bytes(), obj);
andi_(R0, mark, markWord::lock_mask_in_place);
- cmpldi(CCR0, R0, markWord::unlocked_value);
- bgt(CCR0, inflated);
- bne(CCR0, slow_path);
+ cmpldi(CR0, R0, markWord::unlocked_value);
+ bgt(CR0, inflated);
+ bne(CR0, slow_path);
// Not inflated.
@@ -2915,8 +3080,8 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
const int num_unrolled = 2;
for (int i = 0; i < num_unrolled; i++) {
ld(R0, 0, cache_addr);
- cmpd(CCR0, R0, obj);
- beq(CCR0, monitor_found);
+ cmpd(CR0, R0, obj);
+ beq(CR0, monitor_found);
addi(cache_addr, cache_addr, in_bytes(OMCache::oop_to_oop_difference()));
}
@@ -2927,14 +3092,14 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
// Check for match.
ld(R0, 0, cache_addr);
- cmpd(CCR0, R0, obj);
- beq(CCR0, monitor_found);
+ cmpd(CR0, R0, obj);
+ beq(CR0, monitor_found);
// Search until null encountered, guaranteed _null_sentinel at end.
addi(cache_addr, cache_addr, in_bytes(OMCache::oop_to_oop_difference()));
- cmpdi(CCR1, R0, 0);
- bne(CCR1, loop);
- // Cache Miss, CCR0.NE set from cmp above
+ cmpdi(CR1, R0, 0);
+ bne(CR1, loop);
+ // Cache Miss, CR0.NE set from cmp above
b(slow_path);
bind(monitor_found);
@@ -2947,18 +3112,18 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
// Try to CAS owner (no owner => current thread's _monitor_owner_id).
assert_different_registers(thread_id, monitor, owner_addr, box, R0);
ld(thread_id, in_bytes(JavaThread::monitor_owner_id_offset()), R16_thread);
- cmpxchgd(/*flag=*/CCR0,
+ cmpxchgd(/*flag=*/CR0,
/*current_value=*/R0,
/*compare_value=*/(intptr_t)0,
/*exchange_value=*/thread_id,
/*where=*/owner_addr,
MacroAssembler::MemBarRel | MacroAssembler::MemBarAcq,
MacroAssembler::cmpxchgx_hint_acquire_lock());
- beq(CCR0, monitor_locked);
+ beq(CR0, monitor_locked);
// Check if recursive.
- cmpd(CCR0, R0, thread_id);
- bne(CCR0, slow_path);
+ cmpd(CR0, R0, thread_id);
+ bne(CR0, slow_path);
// Recursive.
if (!UseObjectMonitorTable) {
@@ -2984,13 +3149,13 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
#ifdef ASSERT
// Check that locked label is reached with flag == EQ.
Label flag_correct;
- beq(CCR0, flag_correct);
+ beq(CR0, flag_correct);
stop("Fast Lock Flag != EQ");
#endif
bind(slow_path);
#ifdef ASSERT
// Check that slow_path label is reached with flag == NE.
- bne(CCR0, flag_correct);
+ bne(CR0, flag_correct);
stop("Fast Lock Flag != NE");
bind(flag_correct);
#endif
@@ -3000,7 +3165,7 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister flag, Register obj, Register box,
Register tmp1, Register tmp2, Register tmp3) {
assert_different_registers(obj, tmp1, tmp2, tmp3);
- assert(flag == CCR0, "bad condition register");
+ assert(flag == CR0, "bad condition register");
// Handle inflated monitor.
Label inflated, inflated_load_monitor;
@@ -3020,9 +3185,9 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
lwz(top, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
subi(top, top, oopSize);
ldx(t, R16_thread, top);
- cmpd(CCR0, obj, t);
+ cmpd(CR0, obj, t);
// Top of lock stack was not obj. Must be monitor.
- bne(CCR0, inflated_load_monitor);
+ bne(CR0, inflated_load_monitor);
// Pop lock-stack.
DEBUG_ONLY(li(t, 0);)
@@ -3035,8 +3200,8 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
// Check if recursive.
subi(t, top, oopSize);
ldx(t, R16_thread, t);
- cmpd(CCR0, obj, t);
- beq(CCR0, unlocked);
+ cmpd(CR0, obj, t);
+ beq(CR0, unlocked);
// Not recursive.
@@ -3044,16 +3209,16 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
ld(mark, oopDesc::mark_offset_in_bytes(), obj);
andi_(t, mark, markWord::monitor_value);
if (!UseObjectMonitorTable) {
- bne(CCR0, inflated);
+ bne(CR0, inflated);
} else {
- bne(CCR0, push_and_slow);
+ bne(CR0, push_and_slow);
}
#ifdef ASSERT
// Check header not unlocked (0b01).
Label not_unlocked;
andi_(t, mark, markWord::unlocked_value);
- beq(CCR0, not_unlocked);
+ beq(CR0, not_unlocked);
stop("lightweight_unlock already unlocked");
bind(not_unlocked);
#endif
@@ -3075,7 +3240,7 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
ld(mark, oopDesc::mark_offset_in_bytes(), obj);
#ifdef ASSERT
andi_(t, mark, markWord::monitor_value);
- bne(CCR0, inflated);
+ bne(CR0, inflated);
stop("Fast Unlock not monitor");
#endif
@@ -3084,11 +3249,11 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
#ifdef ASSERT
Label check_done;
subi(top, top, oopSize);
- cmplwi(CCR0, top, in_bytes(JavaThread::lock_stack_base_offset()));
- blt(CCR0, check_done);
+ cmplwi(CR0, top, in_bytes(JavaThread::lock_stack_base_offset()));
+ blt(CR0, check_done);
ldx(t, R16_thread, top);
- cmpd(CCR0, obj, t);
- bne(CCR0, inflated);
+ cmpd(CR0, obj, t);
+ bne(CR0, inflated);
stop("Fast Unlock lock on stack");
bind(check_done);
#endif
@@ -3103,8 +3268,8 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
} else {
ld(monitor, BasicLock::object_monitor_cache_offset_in_bytes(), box);
// null check with Flags == NE, no valid pointer below alignof(ObjectMonitor*)
- cmpldi(CCR0, monitor, checked_cast(alignof(ObjectMonitor*)));
- blt(CCR0, slow_path);
+ cmpldi(CR0, monitor, checked_cast(alignof(ObjectMonitor*)));
+ blt(CR0, slow_path);
}
const Register recursions = tmp2;
@@ -3113,17 +3278,15 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
// Check if recursive.
ld(recursions, in_bytes(ObjectMonitor::recursions_offset()), monitor);
addic_(recursions, recursions, -1);
- blt(CCR0, not_recursive);
+ blt(CR0, not_recursive);
// Recursive unlock.
std(recursions, in_bytes(ObjectMonitor::recursions_offset()), monitor);
- crorc(CCR0, Assembler::equal, CCR0, Assembler::equal);
+ crorc(CR0, Assembler::equal, CR0, Assembler::equal);
b(unlocked);
bind(not_recursive);
- const Register t2 = tmp2;
-
// Set owner to null.
// Release to satisfy the JMM
release();
@@ -3133,19 +3296,17 @@ 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);
- cmpdi(CCR0, t, 0);
- beq(CCR0, unlocked); // If so we are done.
+ // 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.
// Check if there is a successor.
ld(t, in_bytes(ObjectMonitor::succ_offset()), monitor);
- cmpdi(CCR0, t, 0);
+ cmpdi(CR0, t, 0);
// Invert equal bit
crnand(flag, Assembler::equal, flag, Assembler::equal);
- beq(CCR0, unlocked); // If there is a successor we are done.
+ beq(CR0, unlocked); // If there is a successor we are done.
// Save the monitor pointer in the current thread, so we can try
// to reacquire the lock in SharedRuntime::monitor_exit_helper().
@@ -3158,13 +3319,13 @@ void MacroAssembler::compiler_fast_unlock_lightweight_object(ConditionRegister f
#ifdef ASSERT
// Check that unlocked label is reached with flag == EQ.
Label flag_correct;
- beq(CCR0, flag_correct);
+ beq(CR0, flag_correct);
stop("Fast Lock Flag != EQ");
#endif
bind(slow_path);
#ifdef ASSERT
// Check that slow_path label is reached with flag == NE.
- bne(CCR0, flag_correct);
+ bne(CR0, flag_correct);
stop("Fast Lock Flag != NE");
bind(flag_correct);
#endif
@@ -3181,21 +3342,21 @@ void MacroAssembler::safepoint_poll(Label& slow_path, Register temp, bool at_ret
relocate(relocInfo::poll_return_type);
td(traptoGreaterThanUnsigned, R1_SP, temp);
} else {
- cmpld(CCR0, R1_SP, temp);
+ cmpld(CR0, R1_SP, temp);
// Stub may be out of range for short conditional branch.
- bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::greater), slow_path);
+ bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::greater), slow_path);
}
} else { // Not in nmethod.
// Frame still on stack, need to get fp.
Register fp = R0;
ld(fp, _abi0(callers_sp), R1_SP);
- cmpld(CCR0, fp, temp);
- bgt(CCR0, slow_path);
+ cmpld(CR0, fp, temp);
+ bgt(CR0, slow_path);
}
} else { // Normal safepoint poll. Not at return.
assert(!in_nmethod, "should use load_from_polling_page");
andi_(temp, temp, SafepointMechanism::poll_bit());
- bne(CCR0, slow_path);
+ bne(CR0, slow_path);
}
}
@@ -3365,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:
@@ -3436,8 +3602,8 @@ void MacroAssembler::resolve_weak_handle(Register result, Register tmp1, Registe
Label resolved;
// A null weak handle resolves to null.
- cmpdi(CCR0, result, 0);
- beq(CCR0, resolved);
+ cmpdi(CR0, result, 0);
+ beq(CR0, resolved);
access_load_at(T_OBJECT, IN_NATIVE | ON_PHANTOM_OOP_REF, result, noreg, result, tmp1, tmp2,
preservation_level);
@@ -3498,11 +3664,11 @@ void MacroAssembler::clear_memory_doubleword(Register base_ptr, Register cnt_dwo
load_const_optimized(cnt_dwords, const_cnt, tmp);
} else {
// cnt_dwords already loaded in register. Need to check size.
- cmpdi(CCR1, cnt_dwords, min_cnt); // Big enough? (ensure >= dcbz_min lines included).
- blt(CCR1, small_rest);
+ cmpdi(CR1, cnt_dwords, min_cnt); // Big enough? (ensure >= dcbz_min lines included).
+ blt(CR1, small_rest);
}
rldicl_(tmp, base_ptr, 64-3, 64-cl_dw_addr_bits); // Extract dword offset within first cache line.
- beq(CCR0, fast); // Already 128byte aligned.
+ beq(CR0, fast); // Already 128byte aligned.
subfic(tmp, tmp, cl_dwords);
mtctr(tmp); // Set ctr to hit 128byte boundary (0=mainLoop_stepping is guaranteed).
} else {
sub(tmp, len, tmp2); // Remaining bytes for main loop.
- cmpdi(CCR0, tmp, mainLoop_stepping);
- blt(CCR0, L_tail); // For less than one mainloop_stepping left, do only tail processing
+ cmpdi(CR0, tmp, mainLoop_stepping);
+ blt(CR0, L_tail); // For less than one mainloop_stepping left, do only tail processing
mr(len, tmp); // remaining bytes for main loop (>=mainLoop_stepping is guaranteed).
}
update_byteLoop_crc32(crc, buf, tmp2, table, data, false);
@@ -3831,8 +3997,8 @@ void MacroAssembler::kernel_crc32_vpmsum(Register crc, Register buf, Register le
neg(prealign, buf);
addi(t1, len, -threshold);
andi(prealign, prealign, alignment - 1);
- cmpw(CCR0, t1, prealign);
- blt(CCR0, L_tail); // len - prealign < threshold?
+ cmpw(CR0, t1, prealign);
+ blt(CR0, L_tail); // len - prealign < threshold?
subf(len, prealign, len);
update_byteLoop_crc32(crc, buf, prealign, constants, t2, false);
@@ -3956,8 +4122,8 @@ void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Reg
#define BE_swap_bytes(x) vperm(x, x, x, swap_bytes)
#endif
- cmpd(CCR0, len, num_bytes);
- blt(CCR0, L_last);
+ cmpd(CR0, len, num_bytes);
+ blt(CR0, L_last);
addi(cur_const, constants, outer_consts_size); // Point to consts for inner loop
load_const_optimized(loop_count, unroll_factor / (2 * unroll_factor2) - 1); // One double-iteration peeled off.
@@ -4044,8 +4210,8 @@ void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Reg
vxor(data0[j], data0[j], data0[j+i]);
}
}
- cmpd(CCR0, len, num_bytes);
- bge(CCR0, L_outer_loop);
+ cmpd(CR0, len, num_bytes);
+ bge(CR0, L_outer_loop);
// Last chance with lower num_bytes.
bind(L_last);
@@ -4057,7 +4223,7 @@ void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Reg
subf(cur_const, R0, cur_const); // Point to constant to be used first.
addic_(loop_count, loop_count, -1); // One double-iteration peeled off.
- bgt(CCR0, L_outer_loop);
+ bgt(CR0, L_outer_loop);
// ********** Main loop end **********
// Restore DSCR pre-fetch value.
@@ -4072,7 +4238,7 @@ void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Reg
srdi_(t0, len, 4); // 16 bytes per iteration
clrldi(len, len, 64-4);
- beq(CCR0, L_done);
+ beq(CR0, L_done);
// Point to const (same as last const for inner loop).
add_const_optimized(cur_const, constants, outer_consts_size + inner_consts_size - 16);
@@ -4191,7 +4357,7 @@ void MacroAssembler::multiply_64_x_64_loop(Register x, Register xstart,
Label L_one_x, L_one_y, L_multiply;
addic_(xstart, xstart, -1);
- blt(CCR0, L_one_x); // Special case: length of x is 1.
+ blt(CR0, L_one_x); // Special case: length of x is 1.
// Load next two integers of x.
sldi(tmp, xstart, LogBytesPerInt);
@@ -4203,10 +4369,10 @@ void MacroAssembler::multiply_64_x_64_loop(Register x, Register xstart,
align(32, 16);
bind(L_first_loop);
- cmpdi(CCR0, idx, 1);
- blt(CCR0, L_first_loop_exit);
+ cmpdi(CR0, idx, 1);
+ blt(CR0, L_first_loop_exit);
addi(idx, idx, -2);
- beq(CCR0, L_one_y);
+ beq(CR0, L_one_y);
// Load next two integers of y.
sldi(tmp, idx, LogBytesPerInt);
@@ -4314,7 +4480,7 @@ void MacroAssembler::multiply_128_x_128_loop(Register x_xstart,
// Scale the index.
srdi_(jdx, idx, 2);
- beq(CCR0, L_third_loop_exit);
+ beq(CR0, L_third_loop_exit);
mtctr(jdx);
align(32, 16);
@@ -4332,12 +4498,12 @@ void MacroAssembler::multiply_128_x_128_loop(Register x_xstart,
bind(L_third_loop_exit); // Handle any left-over operand parts.
andi_(idx, idx, 0x3);
- beq(CCR0, L_post_third_loop_done);
+ beq(CR0, L_post_third_loop_done);
Label L_check_1;
addic_(idx, idx, -2);
- blt(CCR0, L_check_1);
+ blt(CR0, L_check_1);
multiply_add_128_x_128(x_xstart, y, z, yz_idx, idx, carry, product_high, product, tmp, 0);
mr_if_needed(carry, product_high);
@@ -4347,7 +4513,7 @@ void MacroAssembler::multiply_128_x_128_loop(Register x_xstart,
addi(idx, idx, 0x2);
andi_(idx, idx, 0x1);
addic_(idx, idx, -1);
- blt(CCR0, L_post_third_loop_done);
+ blt(CR0, L_post_third_loop_done);
sldi(tmp, idx, LogBytesPerInt);
lwzx(yz_idx, y, tmp);
@@ -4375,12 +4541,12 @@ void MacroAssembler::muladd(Register out, Register in,
Label LOOP, SKIP;
// Make sure length is positive.
- cmpdi (CCR0, len, 0);
+ cmpdi (CR0, len, 0);
// Prepare variables
subi (offset, offset, 4);
li (carry, 0);
- ble (CCR0, SKIP);
+ ble (CR0, SKIP);
mtctr (len);
subi (len, len, 1 );
@@ -4452,20 +4618,20 @@ void MacroAssembler::multiply_to_len(Register x, Register xlen,
Label L_done;
addic_(xstart, xlen, -1);
- blt(CCR0, L_done);
+ blt(CR0, L_done);
multiply_64_x_64_loop(x, xstart, x_xstart, y, y_idx, z,
carry, product_high, product, idx, kdx, tmp);
Label L_second_loop;
- cmpdi(CCR0, kdx, 0);
- beq(CCR0, L_second_loop);
+ cmpdi(CR0, kdx, 0);
+ beq(CR0, L_second_loop);
Label L_carry;
addic_(kdx, kdx, -1);
- beq(CCR0, L_carry);
+ beq(CR0, L_carry);
// Store lower 32 bits of carry.
sldi(tmp, kdx, LogBytesPerInt);
@@ -4500,7 +4666,7 @@ void MacroAssembler::multiply_to_len(Register x, Register xlen,
li(carry, 0); // carry = 0;
addic_(xstart, xstart, -1); // i = xstart-1;
- blt(CCR0, L_done);
+ blt(CR0, L_done);
Register zsave = tmp10;
@@ -4513,7 +4679,7 @@ void MacroAssembler::multiply_to_len(Register x, Register xlen,
add(z, z, tmp); // z = z + k - j
addi(z, z, 4);
addic_(xstart, xstart, -1); // i = xstart-1;
- blt(CCR0, L_last_x);
+ blt(CR0, L_last_x);
sldi(tmp, xstart, LogBytesPerInt);
ldx(x_xstart, x, tmp);
@@ -4547,7 +4713,7 @@ void MacroAssembler::multiply_to_len(Register x, Register xlen,
sldi(tmp, tmp3, LogBytesPerInt);
stwx(carry, z, tmp);
addic_(tmp3, tmp3, -1);
- blt(CCR0, L_done);
+ blt(CR0, L_done);
srdi(carry, carry, 32);
sldi(tmp, tmp3, LogBytesPerInt);
@@ -4567,9 +4733,9 @@ void MacroAssembler::asm_assert(bool check_equal, const char *msg) {
#ifdef ASSERT
Label ok;
if (check_equal) {
- beq(CCR0, ok);
+ beq(CR0, ok);
} else {
- bne(CCR0, ok);
+ bne(CR0, ok);
}
stop(msg);
bind(ok);
@@ -4582,11 +4748,11 @@ void MacroAssembler::asm_assert_mems_zero(bool check_equal, int size, int mem_of
switch (size) {
case 4:
lwz(R0, mem_offset, mem_base);
- cmpwi(CCR0, R0, 0);
+ cmpwi(CR0, R0, 0);
break;
case 8:
ld(R0, mem_offset, mem_base);
- cmpdi(CCR0, R0, 0);
+ cmpdi(CR0, R0, 0);
break;
default:
ShouldNotReachHere();
@@ -4708,8 +4874,8 @@ void MacroAssembler::zap_from_to(Register low, int before, Register high, int af
bind(loop);
std(val, 0, addr);
addi(addr, addr, 8);
- cmpd(CCR6, addr, high);
- ble(CCR6, loop);
+ cmpd(CR6, addr, high);
+ ble(CR6, loop);
if (after) addi(high, high, -after * BytesPerWord); // Correct back to old value.
}
BLOCK_COMMENT("} zap memory region");
@@ -4741,8 +4907,8 @@ void MacroAssembler::push_cont_fastpath() {
Label done;
ld_ptr(R0, JavaThread::cont_fastpath_offset(), R16_thread);
- cmpld(CCR0, R1_SP, R0);
- ble(CCR0, done);
+ cmpld(CR0, R1_SP, R0);
+ ble(CR0, done);
st_ptr(R1_SP, JavaThread::cont_fastpath_offset(), R16_thread);
bind(done);
}
@@ -4752,48 +4918,48 @@ void MacroAssembler::pop_cont_fastpath() {
Label done;
ld_ptr(R0, JavaThread::cont_fastpath_offset(), R16_thread);
- cmpld(CCR0, R1_SP, R0);
- ble(CCR0, done);
+ cmpld(CR0, R1_SP, R0);
+ ble(CR0, done);
li(R0, 0);
st_ptr(R0, JavaThread::cont_fastpath_offset(), R16_thread);
bind(done);
}
-// Note: Must preserve CCR0 EQ (invariant).
+// Note: Must preserve CR0 EQ (invariant).
void MacroAssembler::inc_held_monitor_count(Register tmp) {
assert(LockingMode == LM_LEGACY, "");
ld(tmp, in_bytes(JavaThread::held_monitor_count_offset()), R16_thread);
#ifdef ASSERT
Label ok;
- cmpdi(CCR0, tmp, 0);
- bge_predict_taken(CCR0, ok);
+ cmpdi(CR0, tmp, 0);
+ bge_predict_taken(CR0, ok);
stop("held monitor count is negativ at increment");
bind(ok);
- crorc(CCR0, Assembler::equal, CCR0, Assembler::equal); // Restore CCR0 EQ
+ crorc(CR0, Assembler::equal, CR0, Assembler::equal); // Restore CR0 EQ
#endif
addi(tmp, tmp, 1);
std(tmp, in_bytes(JavaThread::held_monitor_count_offset()), R16_thread);
}
-// Note: Must preserve CCR0 EQ (invariant).
+// Note: Must preserve CR0 EQ (invariant).
void MacroAssembler::dec_held_monitor_count(Register tmp) {
assert(LockingMode == LM_LEGACY, "");
ld(tmp, in_bytes(JavaThread::held_monitor_count_offset()), R16_thread);
#ifdef ASSERT
Label ok;
- cmpdi(CCR0, tmp, 0);
- bgt_predict_taken(CCR0, ok);
+ cmpdi(CR0, tmp, 0);
+ bgt_predict_taken(CR0, ok);
stop("held monitor count is <= 0 at decrement");
bind(ok);
- crorc(CCR0, Assembler::equal, CCR0, Assembler::equal); // Restore CCR0 EQ
+ crorc(CR0, Assembler::equal, CR0, Assembler::equal); // Restore CR0 EQ
#endif
addi(tmp, tmp, -1);
std(tmp, in_bytes(JavaThread::held_monitor_count_offset()), R16_thread);
}
// Function to flip between unlocked and locked state (fast locking).
-// Branches to failed if the state is not as expected with CCR0 NE.
-// Falls through upon success with CCR0 EQ.
+// Branches to failed if the state is not as expected with CR0 NE.
+// Falls through upon success with CR0 EQ.
// This requires fewer instructions and registers and is easier to use than the
// cmpxchg based implementation.
void MacroAssembler::atomically_flip_locked_state(bool is_unlock, Register obj, Register tmp, Label& failed, int semantics) {
@@ -4810,15 +4976,15 @@ void MacroAssembler::atomically_flip_locked_state(bool is_unlock, Register obj,
ldarx(tmp, obj, MacroAssembler::cmpxchgx_hint_acquire_lock());
xori(tmp, tmp, markWord::unlocked_value); // flip unlocked bit
andi_(R0, tmp, markWord::lock_mask_in_place);
- bne(CCR0, failed); // failed if new header doesn't contain locked_value (which is 0)
+ bne(CR0, failed); // failed if new header doesn't contain locked_value (which is 0)
} else {
ldarx(tmp, obj, MacroAssembler::cmpxchgx_hint_release_lock());
andi_(R0, tmp, markWord::lock_mask_in_place);
- bne(CCR0, failed); // failed if old header doesn't contain locked_value (which is 0)
+ bne(CR0, failed); // failed if old header doesn't contain locked_value (which is 0)
ori(tmp, tmp, markWord::unlocked_value); // set unlocked bit
}
stdcx_(tmp, obj);
- bne(CCR0, retry);
+ bne(CR0, retry);
if (semantics & MemBarFenceAfter) {
fence();
@@ -4848,8 +5014,8 @@ void MacroAssembler::lightweight_lock(Register box, Register obj, Register t1, R
// Check if the lock-stack is full.
lwz(top, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
- cmplwi(CCR0, top, LockStack::end_offset());
- bge(CCR0, slow);
+ cmplwi(CR0, top, LockStack::end_offset());
+ bge(CR0, slow);
// The underflow check is elided. The recursive check will always fail
// when the lock stack is empty because of the _bad_oop_sentinel field.
@@ -4857,14 +5023,14 @@ void MacroAssembler::lightweight_lock(Register box, Register obj, Register t1, R
// Check for recursion.
subi(t, top, oopSize);
ldx(t, R16_thread, t);
- cmpd(CCR0, obj, t);
- beq(CCR0, push);
+ cmpd(CR0, obj, t);
+ beq(CR0, push);
// Check header for monitor (0b10) or locked (0b00).
ld(mark, oopDesc::mark_offset_in_bytes(), obj);
xori(t, mark, markWord::unlocked_value);
andi_(t, t, markWord::lock_mask_in_place);
- bne(CCR0, slow);
+ bne(CR0, slow);
// Try to lock. Transition lock bits 0b01 => 0b00
atomically_flip_locked_state(/* is_unlock */ false, obj, mark, slow, MacroAssembler::MemBarAcq);
@@ -4893,8 +5059,8 @@ void MacroAssembler::lightweight_unlock(Register obj, Register t1, Label& slow)
// Check for lock-stack underflow.
Label stack_ok;
lwz(t1, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
- cmplwi(CCR0, t1, LockStack::start_offset());
- bge(CCR0, stack_ok);
+ cmplwi(CR0, t1, LockStack::start_offset());
+ bge(CR0, stack_ok);
stop("Lock-stack underflow");
bind(stack_ok);
}
@@ -4909,8 +5075,8 @@ void MacroAssembler::lightweight_unlock(Register obj, Register t1, Label& slow)
lwz(top, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
subi(top, top, oopSize);
ldx(t, R16_thread, top);
- cmpd(CCR0, obj, t);
- bne(CCR0, slow);
+ cmpd(CR0, obj, t);
+ bne(CR0, slow);
// Pop lock-stack.
DEBUG_ONLY(li(t, 0);)
@@ -4923,8 +5089,8 @@ void MacroAssembler::lightweight_unlock(Register obj, Register t1, Label& slow)
// Check if recursive.
subi(t, top, oopSize);
ldx(t, R16_thread, t);
- cmpd(CCR0, obj, t);
- beq(CCR0, unlocked);
+ cmpd(CR0, obj, t);
+ beq(CR0, unlocked);
// Use top as tmp
t = top;
@@ -4932,13 +5098,13 @@ void MacroAssembler::lightweight_unlock(Register obj, Register t1, Label& slow)
// Not recursive. Check header for monitor (0b10).
ld(mark, oopDesc::mark_offset_in_bytes(), obj);
andi_(t, mark, markWord::monitor_value);
- bne(CCR0, push_and_slow);
+ bne(CR0, push_and_slow);
#ifdef ASSERT
// Check header not unlocked (0b01).
Label not_unlocked;
andi_(t, mark, markWord::unlocked_value);
- beq(CCR0, not_unlocked);
+ beq(CR0, not_unlocked);
stop("lightweight_unlock already unlocked");
bind(not_unlocked);
#endif
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
index 3e82c1c6785..b709cf16713 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2002, 2025, Oracle and/or its affiliates. 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
@@ -179,8 +179,8 @@ class MacroAssembler: public Assembler {
//
// branch, jump
//
- // set dst to -1, 0, +1 as follows: if CCR0bi is "greater than", dst is set to 1,
- // if CCR0bi is "equal", dst is set to 0, otherwise it's set to -1.
+ // set dst to -1, 0, +1 as follows: if CR0bi is "greater than", dst is set to 1,
+ // if CR0bi is "equal", dst is set to 0, otherwise it's set to -1.
void inline set_cmp3(Register dst);
// set dst to (treat_unordered_like_less ? -1 : +1)
void inline set_cmpu3(Register dst, bool treat_unordered_like_less);
@@ -612,6 +612,20 @@ class MacroAssembler: public Assembler {
// The temp_reg can be noreg, if no temps are available.
// It can also be sub_klass or super_klass, meaning it's OK to kill that one.
// Updates the sub's secondary super cache as necessary.
+ void check_klass_subtype_slow_path_linear(Register sub_klass,
+ Register super_klass,
+ Register temp1_reg,
+ Register temp2_reg,
+ Label* L_success = nullptr,
+ Register result_reg = noreg);
+
+ void check_klass_subtype_slow_path_table(Register sub_klass,
+ Register super_klass,
+ Register temp1_reg,
+ Register temp2_reg,
+ Label* L_success = nullptr,
+ Register result_reg = noreg);
+
void check_klass_subtype_slow_path(Register sub_klass,
Register super_klass,
Register temp1_reg,
@@ -619,6 +633,25 @@ class MacroAssembler: public Assembler {
Label* L_success = nullptr,
Register result_reg = noreg);
+ void lookup_secondary_supers_table_var(Register sub_klass,
+ Register r_super_klass,
+ Register temp1,
+ Register temp2,
+ Register temp3,
+ Register temp4,
+ Register result);
+
+ // If r is valid, return r.
+ // If r is invalid, remove a register r2 from available_regs, add r2
+ // to regs_to_push, then return r2.
+ Register allocate_if_noreg(const Register r,
+ RegSetIterator &available_regs,
+ RegSet ®s_to_push);
+
+ // Frameless register spills (negative offset from SP)
+ void push_set(RegSet set);
+ void pop_set(RegSet set);
+
// Simplified, combined version, good for typical uses.
// Falls through on failure.
void check_klass_subtype(Register sub_klass,
@@ -631,14 +664,14 @@ class MacroAssembler: public Assembler {
// As above, but with a constant super_klass.
// The result is in Register result, not the condition codes.
- void lookup_secondary_supers_table(Register r_sub_klass,
- Register r_super_klass,
- Register temp1,
- Register temp2,
- Register temp3,
- Register temp4,
- Register result,
- u1 super_klass_slot);
+ void lookup_secondary_supers_table_const(Register r_sub_klass,
+ Register r_super_klass,
+ Register temp1,
+ Register temp2,
+ Register temp3,
+ Register temp4,
+ Register result,
+ u1 super_klass_slot);
void verify_secondary_supers_table(Register r_sub_klass,
Register r_super_klass,
@@ -769,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/macroAssembler_ppc.inline.hpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
index 6f5cd8fbd96..b2bcf72bd35 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2002, 2025, Oracle and/or its affiliates. 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
@@ -248,14 +248,14 @@ inline bool MacroAssembler::is_bc_far_variant3_at(address instruction_addr) {
is_endgroup(instruction_2);
}
-// set dst to -1, 0, +1 as follows: if CCR0bi is "greater than", dst is set to 1,
-// if CCR0bi is "equal", dst is set to 0, otherwise it's set to -1.
+// set dst to -1, 0, +1 as follows: if CR0bi is "greater than", dst is set to 1,
+// if CR0bi is "equal", dst is set to 0, otherwise it's set to -1.
inline void MacroAssembler::set_cmp3(Register dst) {
assert_different_registers(dst, R0);
// P10, prefer using setbc instructions
if (VM_Version::has_brw()) {
- setbc(R0, CCR0, Assembler::greater); // Set 1 to R0 if CCR0bi is "greater than", otherwise 0
- setnbc(dst, CCR0, Assembler::less); // Set -1 to dst if CCR0bi is "less than", otherwise 0
+ setbc(R0, CR0, Assembler::greater); // Set 1 to R0 if CR0bi is "greater than", otherwise 0
+ setnbc(dst, CR0, Assembler::less); // Set -1 to dst if CR0bi is "less than", otherwise 0
} else {
mfcr(R0); // copy CR register to R0
srwi(dst, R0, 30); // copy the first two bits to dst
@@ -267,9 +267,9 @@ inline void MacroAssembler::set_cmp3(Register dst) {
// set dst to (treat_unordered_like_less ? -1 : +1)
inline void MacroAssembler::set_cmpu3(Register dst, bool treat_unordered_like_less) {
if (treat_unordered_like_less) {
- cror(CCR0, Assembler::less, CCR0, Assembler::summary_overflow); // treat unordered like less
+ cror(CR0, Assembler::less, CR0, Assembler::summary_overflow); // treat unordered like less
} else {
- cror(CCR0, Assembler::greater, CCR0, Assembler::summary_overflow); // treat unordered like greater
+ cror(CR0, Assembler::greater, CR0, Assembler::summary_overflow); // treat unordered like greater
}
set_cmp3(dst);
}
@@ -280,11 +280,11 @@ inline void MacroAssembler::normalize_bool(Register dst, Register temp, bool is_
if (VM_Version::has_brw()) {
if (is_64bit) {
- cmpdi(CCR0, dst, 0);
+ cmpdi(CR0, dst, 0);
} else {
- cmpwi(CCR0, dst, 0);
+ cmpwi(CR0, dst, 0);
}
- setbcr(dst, CCR0, Assembler::equal);
+ setbcr(dst, CR0, Assembler::equal);
} else {
assert_different_registers(temp, dst);
neg(temp, dst);
@@ -373,8 +373,8 @@ inline void MacroAssembler::null_check_throw(Register a, int offset, Register te
trap_null_check(a);
} else {
Label ok;
- cmpdi(CCR0, a, 0);
- bne(CCR0, ok);
+ cmpdi(CR0, a, 0);
+ bne(CR0, ok);
load_const_optimized(temp_reg, exception_entry);
mtctr(temp_reg);
bctr();
@@ -390,8 +390,8 @@ inline void MacroAssembler::null_check(Register a, int offset, Label *Lis_null)
trap_null_check(a);
} else if (Lis_null){
Label ok;
- cmpdi(CCR0, a, 0);
- beq(CCR0, *Lis_null);
+ cmpdi(CR0, a, 0);
+ beq(CR0, *Lis_null);
}
}
}
@@ -468,14 +468,14 @@ inline Register MacroAssembler::encode_heap_oop_not_null(Register d, Register sr
inline Register MacroAssembler::encode_heap_oop(Register d, Register src) {
if (CompressedOops::base() != nullptr) {
if (VM_Version::has_isel()) {
- cmpdi(CCR0, src, 0);
+ cmpdi(CR0, src, 0);
Register co = encode_heap_oop_not_null(d, src);
assert(co == d, "sanity");
- isel_0(d, CCR0, Assembler::equal);
+ isel_0(d, CR0, Assembler::equal);
} else {
Label isNull;
or_(d, src, src); // move and compare 0
- beq(CCR0, isNull);
+ beq(CR0, isNull);
encode_heap_oop_not_null(d, src);
bind(isNull);
}
@@ -509,16 +509,16 @@ inline void MacroAssembler::decode_heap_oop(Register d) {
Label isNull;
bool use_isel = false;
if (CompressedOops::base() != nullptr) {
- cmpwi(CCR0, d, 0);
+ cmpwi(CR0, d, 0);
if (VM_Version::has_isel()) {
use_isel = true;
} else {
- beq(CCR0, isNull);
+ beq(CR0, isNull);
}
}
decode_heap_oop_not_null(d);
if (use_isel) {
- isel_0(d, CCR0, Assembler::equal);
+ isel_0(d, CR0, Assembler::equal);
}
bind(isNull);
}
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc_sha.cpp b/src/hotspot/cpu/ppc/macroAssembler_ppc_sha.cpp
index 3d0b5dab2db..bdf2d8d268a 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc_sha.cpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc_sha.cpp
@@ -93,7 +93,7 @@ void MacroAssembler::sha256_load_h_vec(const VectorRegister a,
lvx (a, hptr);
addi (tmp, hptr, 16);
lvx (e, tmp);
- beq (CCR0, sha256_aligned);
+ beq (CR0, sha256_aligned);
// handle unaligned accesses
load_perm(vRb, hptr);
@@ -121,7 +121,7 @@ void MacroAssembler::sha256_load_w_plus_k_vec(const Register buf_in,
VectorRegister vRb = VR6;
andi_ (tmp, buf_in, 0xF);
- beq (CCR0, w_aligned); // address ends with 0x0, not 0x8
+ beq (CR0, w_aligned); // address ends with 0x0, not 0x8
// deal with unaligned addresses
lvx (ws[0], buf_in);
@@ -318,7 +318,7 @@ void MacroAssembler::sha256_update_sha_state(const VectorRegister a,
li (of16, 16);
lvx (vt0, hptr);
lvx (vt5, of16, hptr);
- beq (CCR0, state_load_aligned);
+ beq (CR0, state_load_aligned);
// handle unaligned accesses
li (of32, 32);
@@ -538,8 +538,8 @@ void MacroAssembler::sha256(bool multi_block) {
if (multi_block) {
addi(buf_in, buf_in, buf_size);
addi(ofs, ofs, buf_size);
- cmplw(CCR0, ofs, limit);
- ble(CCR0, sha_loop);
+ cmplw(CR0, ofs, limit);
+ ble(CR0, sha_loop);
// return ofs
mr(R3_RET, ofs);
@@ -567,7 +567,7 @@ void MacroAssembler::sha512_load_w_vec(const Register buf_in,
Label is_aligned, after_alignment;
andi_ (tmp, buf_in, 0xF);
- beq (CCR0, is_aligned); // address ends with 0x0, not 0x8
+ beq (CR0, is_aligned); // address ends with 0x0, not 0x8
// deal with unaligned addresses
lvx (ws[0], buf_in);
@@ -623,7 +623,7 @@ void MacroAssembler::sha512_update_sha_state(const Register state,
VectorRegister aux = VR9;
andi_(tmp, state, 0xf);
- beq(CCR0, state_save_aligned);
+ beq(CR0, state_save_aligned);
// deal with unaligned addresses
{
@@ -860,7 +860,7 @@ void MacroAssembler::sha512_load_h_vec(const Register state,
Label state_aligned, after_state_aligned;
andi_(tmp, state, 0xf);
- beq(CCR0, state_aligned);
+ beq(CR0, state_aligned);
// deal with unaligned addresses
VectorRegister aux = VR9;
@@ -1121,8 +1121,8 @@ void MacroAssembler::sha512(bool multi_block) {
if (multi_block) {
addi(buf_in, buf_in, buf_size);
addi(ofs, ofs, buf_size);
- cmplw(CCR0, ofs, limit);
- ble(CCR0, sha_loop);
+ cmplw(CR0, ofs, limit);
+ ble(CR0, sha_loop);
// return ofs
mr(R3_RET, ofs);
diff --git a/src/hotspot/cpu/ppc/matcher_ppc.hpp b/src/hotspot/cpu/ppc/matcher_ppc.hpp
index aaac79325c4..666bec9e0c8 100644
--- a/src/hotspot/cpu/ppc/matcher_ppc.hpp
+++ b/src/hotspot/cpu/ppc/matcher_ppc.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
@@ -37,10 +37,12 @@
return false;
}
- // PPC implementation uses VSX load/store instructions (if
- // SuperwordUseVSX) which support 4 byte but not arbitrary alignment
+ // The PPC implementation uses VSX lxvd2x/stxvd2x instructions (if
+ // SuperwordUseVSX). They do not have alignment requirements.
+ // Some VSX storage access instructions cannot encode arbitrary displacements
+ // (e.g. lxv). None of them is currently used.
static constexpr bool misaligned_vectors_ok() {
- return false;
+ return true;
}
// Whether code generation need accurate ConvI2L types.
@@ -113,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/methodHandles_ppc.cpp b/src/hotspot/cpu/ppc/methodHandles_ppc.cpp
index ccec05e7105..13fb8ef79d6 100644
--- a/src/hotspot/cpu/ppc/methodHandles_ppc.cpp
+++ b/src/hotspot/cpu/ppc/methodHandles_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "classfile/vmClasses.hpp"
@@ -84,16 +83,16 @@ void MethodHandles::verify_klass(MacroAssembler* _masm,
Label L_ok, L_bad;
BLOCK_COMMENT("verify_klass {");
__ verify_oop(obj_reg, FILE_AND_LINE);
- __ cmpdi(CCR0, obj_reg, 0);
- __ beq(CCR0, L_bad);
+ __ cmpdi(CR0, obj_reg, 0);
+ __ beq(CR0, L_bad);
__ load_klass(temp_reg, obj_reg);
__ load_const_optimized(temp2_reg, (address) klass_addr);
__ ld(temp2_reg, 0, temp2_reg);
- __ cmpd(CCR0, temp_reg, temp2_reg);
- __ beq(CCR0, L_ok);
+ __ cmpd(CR0, temp_reg, temp2_reg);
+ __ beq(CR0, L_ok);
__ ld(temp_reg, klass->super_check_offset(), temp_reg);
- __ cmpd(CCR0, temp_reg, temp2_reg);
- __ beq(CCR0, L_ok);
+ __ cmpd(CR0, temp_reg, temp2_reg);
+ __ beq(CR0, L_ok);
__ BIND(L_bad);
__ stop(error_message);
__ BIND(L_ok);
@@ -108,8 +107,8 @@ void MethodHandles::verify_ref_kind(MacroAssembler* _masm, int ref_kind, Registe
// assert(sizeof(u4) == sizeof(java.lang.invoke.MemberName.flags), "");
__ srwi( temp, temp, java_lang_invoke_MemberName::MN_REFERENCE_KIND_SHIFT);
__ andi(temp, temp, java_lang_invoke_MemberName::MN_REFERENCE_KIND_MASK);
- __ cmpwi(CCR1, temp, ref_kind);
- __ beq(CCR1, L);
+ __ cmpwi(CR1, temp, ref_kind);
+ __ beq(CR1, L);
{ char* buf = NEW_C_HEAP_ARRAY(char, 100, mtInternal);
jio_snprintf(buf, 100, "verify_ref_kind expected %x", ref_kind);
if (ref_kind == JVM_REF_invokeVirtual ||
@@ -136,11 +135,11 @@ void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register meth
// compiled code in threads for which the event is enabled. Check here for
// interp_only_mode if these events CAN be enabled.
__ lwz(temp, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
- __ cmplwi(CCR0, temp, 0);
- __ beq(CCR0, run_compiled_code);
+ __ cmplwi(CR0, temp, 0);
+ __ beq(CR0, run_compiled_code);
// Null method test is replicated below in compiled case.
- __ cmplwi(CCR0, R19_method, 0);
- __ beq(CCR0, L_no_such_method);
+ __ cmplwi(CR0, R19_method, 0);
+ __ beq(CR0, L_no_such_method);
__ ld(target, in_bytes(Method::interpreter_entry_offset()), R19_method);
__ mtctr(target);
__ bctr();
@@ -148,8 +147,8 @@ void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register meth
}
// Compiled case, either static or fall-through from runtime conditional
- __ cmplwi(CCR0, R19_method, 0);
- __ beq(CCR0, L_no_such_method);
+ __ cmplwi(CR0, R19_method, 0);
+ __ beq(CR0, L_no_such_method);
const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :
Method::from_interpreted_offset();
@@ -201,8 +200,8 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
// assert(sizeof(u2) == sizeof(ConstMethod::_size_of_parameters), "");
Label L;
__ ld(temp2, __ argument_offset(temp2, temp2, 0), R15_esp);
- __ cmpd(CCR1, temp2, recv);
- __ beq(CCR1, L);
+ __ cmpd(CR1, temp2, recv);
+ __ beq(CR1, L);
__ stop("receiver not on stack");
__ BIND(L);
}
@@ -249,8 +248,8 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
BLOCK_COMMENT("verify_intrinsic_id {");
__ load_sized_value(R30_tmp1, in_bytes(Method::intrinsic_id_offset()), R19_method,
sizeof(u2), /*is_signed*/ false);
- __ cmpwi(CCR1, R30_tmp1, (int) iid);
- __ beq(CCR1, L);
+ __ cmpwi(CR1, R30_tmp1, (int) iid);
+ __ beq(CR1, L);
if (iid == vmIntrinsics::_linkToVirtual ||
iid == vmIntrinsics::_linkToSpecial) {
// could do this for all kinds, but would explode assembly code size
@@ -426,8 +425,8 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
if (VerifyMethodHandles) {
Label L_index_ok;
- __ cmpdi(CCR1, temp2_index, 0);
- __ bge(CCR1, L_index_ok);
+ __ cmpdi(CR1, temp2_index, 0);
+ __ bge(CR1, L_index_ok);
__ stop("no virtual index");
__ BIND(L_index_ok);
}
@@ -458,8 +457,8 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
__ ld(vtable_index, NONZERO(java_lang_invoke_MemberName::vmindex_offset()), member_reg);
if (VerifyMethodHandles) {
Label L_index_ok;
- __ cmpdi(CCR1, vtable_index, 0);
- __ bge(CCR1, L_index_ok);
+ __ cmpdi(CR1, vtable_index, 0);
+ __ bge(CR1, L_index_ok);
__ stop("invalid vtable index for MH.invokeInterface");
__ BIND(L_index_ok);
}
diff --git a/src/hotspot/cpu/ppc/nativeInst_ppc.cpp b/src/hotspot/cpu/ppc/nativeInst_ppc.cpp
index 78ed81be9cb..1114da60d2b 100644
--- a/src/hotspot/cpu/ppc/nativeInst_ppc.cpp
+++ b/src/hotspot/cpu/ppc/nativeInst_ppc.cpp
@@ -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) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad
index 808dd022738..022a70d52a2 100644
--- a/src/hotspot/cpu/ppc/ppc.ad
+++ b/src/hotspot/cpu/ppc/ppc.ad
@@ -1,6 +1,6 @@
//
-// Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+// Copyright (c) 2011, 2025, Oracle and/or its affiliates. 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
@@ -236,14 +236,14 @@ register %{
// in the CR register.
// types: v = volatile, nv = non-volatile, s = system
- reg_def CCR0(SOC, SOC, Op_RegFlags, 0, CCR0->as_VMReg()); // v
- reg_def CCR1(SOC, SOC, Op_RegFlags, 1, CCR1->as_VMReg()); // v
- reg_def CCR2(SOC, SOC, Op_RegFlags, 2, CCR2->as_VMReg()); // nv
- reg_def CCR3(SOC, SOC, Op_RegFlags, 3, CCR3->as_VMReg()); // nv
- reg_def CCR4(SOC, SOC, Op_RegFlags, 4, CCR4->as_VMReg()); // nv
- reg_def CCR5(SOC, SOC, Op_RegFlags, 5, CCR5->as_VMReg()); // v
- reg_def CCR6(SOC, SOC, Op_RegFlags, 6, CCR6->as_VMReg()); // v
- reg_def CCR7(SOC, SOC, Op_RegFlags, 7, CCR7->as_VMReg()); // v
+ reg_def CR0(SOC, SOC, Op_RegFlags, 0, CR0->as_VMReg()); // v
+ reg_def CR1(SOC, SOC, Op_RegFlags, 1, CR1->as_VMReg()); // v
+ reg_def CR2(SOC, SOC, Op_RegFlags, 2, CR2->as_VMReg()); // nv
+ reg_def CR3(SOC, SOC, Op_RegFlags, 3, CR3->as_VMReg()); // nv
+ reg_def CR4(SOC, SOC, Op_RegFlags, 4, CR4->as_VMReg()); // nv
+ reg_def CR5(SOC, SOC, Op_RegFlags, 5, CR5->as_VMReg()); // v
+ reg_def CR6(SOC, SOC, Op_RegFlags, 6, CR6->as_VMReg()); // v
+ reg_def CR7(SOC, SOC, Op_RegFlags, 7, CR7->as_VMReg()); // v
// Special registers of PPC64
@@ -443,14 +443,14 @@ alloc_class chunk1 (
alloc_class chunk2 (
// Chunk2 contains *all* 8 condition code registers.
- CCR0,
- CCR1,
- CCR2,
- CCR3,
- CCR4,
- CCR5,
- CCR6,
- CCR7
+ CR0,
+ CR1,
+ CR2,
+ CR3,
+ CR4,
+ CR5,
+ CR6,
+ CR7
);
alloc_class chunk3 (
@@ -803,30 +803,30 @@ reg_class bits64_reg_ro(
// Special Class for Condition Code Flags Register
reg_class int_flags(
-/*CCR0*/ // scratch
-/*CCR1*/ // scratch
-/*CCR2*/ // nv!
-/*CCR3*/ // nv!
-/*CCR4*/ // nv!
- CCR5,
- CCR6,
- CCR7
+/*CR0*/ // scratch
+/*CR1*/ // scratch
+/*CR2*/ // nv!
+/*CR3*/ // nv!
+/*CR4*/ // nv!
+ CR5,
+ CR6,
+ CR7
);
reg_class int_flags_ro(
- CCR0,
- CCR1,
- CCR2,
- CCR3,
- CCR4,
- CCR5,
- CCR6,
- CCR7
+ CR0,
+ CR1,
+ CR2,
+ CR3,
+ CR4,
+ CR5,
+ CR6,
+ CR7
);
-reg_class int_flags_CR0(CCR0);
-reg_class int_flags_CR1(CCR1);
-reg_class int_flags_CR6(CCR6);
+reg_class int_flags_CR0(CR0);
+reg_class int_flags_CR1(CR1);
+reg_class int_flags_CR6(CR6);
reg_class ctr_reg(SR_CTR);
// ----------------------------
@@ -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;
@@ -5568,8 +5573,8 @@ instruct loadF_ac(regF dst, memory mem, flagsRegCR0 cr0) %{
int Idisp = $mem$$disp + frame_slots_bias($mem$$base, ra_);
Label next;
__ lfs($dst$$FloatRegister, Idisp, $mem$$base$$Register);
- __ fcmpu(CCR0, $dst$$FloatRegister, $dst$$FloatRegister);
- __ bne(CCR0, next);
+ __ fcmpu(CR0, $dst$$FloatRegister, $dst$$FloatRegister);
+ __ bne(CR0, next);
__ bind(next);
__ isync();
%}
@@ -5604,8 +5609,8 @@ instruct loadD_ac(regD dst, memory mem, flagsRegCR0 cr0) %{
int Idisp = $mem$$disp + frame_slots_bias($mem$$base, ra_);
Label next;
__ lfd($dst$$FloatRegister, Idisp, $mem$$base$$Register);
- __ fcmpu(CCR0, $dst$$FloatRegister, $dst$$FloatRegister);
- __ bne(CCR0, next);
+ __ fcmpu(CR0, $dst$$FloatRegister, $dst$$FloatRegister);
+ __ bne(CR0, next);
__ bind(next);
__ isync();
%}
@@ -7394,8 +7399,8 @@ instruct compareAndSwapB_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iRegIsrc
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "CMPXCHGB $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7413,8 +7418,8 @@ instruct compareAndSwapB4_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr, iRegIs
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP tmp2, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "CMPXCHGB $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7432,8 +7437,8 @@ instruct compareAndSwapS_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iRegIsrc
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "CMPXCHGH $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7451,8 +7456,8 @@ instruct compareAndSwapS4_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr, iRegIs
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP tmp2, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "CMPXCHGH $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7469,8 +7474,8 @@ instruct compareAndSwapI_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iRegIsrc
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "CMPXCHGW $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7488,8 +7493,8 @@ instruct compareAndSwapN_regP_regN_regN(iRegIdst res, iRegPdst mem_ptr, iRegNsrc
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "CMPXCHGW $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7506,8 +7511,8 @@ instruct compareAndSwapL_regP_regL_regL(iRegIdst res, iRegPdst mem_ptr, iRegLsrc
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "CMPXCHGD $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgd(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgd(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7525,8 +7530,8 @@ instruct compareAndSwapP_regP_regP_regP(iRegIdst res, iRegPdst mem_ptr, iRegPsrc
predicate(n->as_LoadStore()->barrier_data() == 0);
format %{ "CMPXCHGD $res, $mem_ptr, $src1, $src2; as bool; ptr" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgd(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgd(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
$res$$Register, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7546,8 +7551,8 @@ instruct weakCompareAndSwapB_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGB $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7560,8 +7565,8 @@ instruct weakCompareAndSwapB4_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr, iR
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP tmp2, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGB $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7574,8 +7579,8 @@ instruct weakCompareAndSwapB_acq_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGB acq $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7588,8 +7593,8 @@ instruct weakCompareAndSwapB4_acq_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP tmp2, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGB acq $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7602,8 +7607,8 @@ instruct weakCompareAndSwapS_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGH $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7616,8 +7621,8 @@ instruct weakCompareAndSwapS4_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr, iR
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP tmp2, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGH $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7630,8 +7635,8 @@ instruct weakCompareAndSwapS_acq_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGH acq $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7644,8 +7649,8 @@ instruct weakCompareAndSwapS4_acq_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP tmp2, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGH acq $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, $tmp2$$Register,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7658,8 +7663,8 @@ instruct weakCompareAndSwapI_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGW $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7672,10 +7677,10 @@ instruct weakCompareAndSwapI_acq_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGW acq $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
// Acquire only needed in successful case. Weak node is allowed to report unsuccessful in additional rare cases and
// value is never passed to caller.
- __ cmpxchgw(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ __ cmpxchgw(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7688,8 +7693,8 @@ instruct weakCompareAndSwapN_regP_regN_regN(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGW $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7702,10 +7707,10 @@ instruct weakCompareAndSwapN_acq_regP_regN_regN(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGW acq $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
// Acquire only needed in successful case. Weak node is allowed to report unsuccessful in additional rare cases and
// value is never passed to caller.
- __ cmpxchgw(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ __ cmpxchgw(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7718,9 +7723,9 @@ instruct weakCompareAndSwapL_regP_regL_regL(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGD $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
// value is never passed to caller.
- __ cmpxchgd(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ __ cmpxchgd(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7733,10 +7738,10 @@ instruct weakCompareAndSwapL_acq_regP_regL_regL(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGD acq $res, $mem_ptr, $src1, $src2; as bool" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
// Acquire only needed in successful case. Weak node is allowed to report unsuccessful in additional rare cases and
// value is never passed to caller.
- __ cmpxchgd(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ __ cmpxchgd(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7749,8 +7754,8 @@ instruct weakCompareAndSwapP_regP_regP_regP(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGD $res, $mem_ptr, $src1, $src2; as bool; ptr" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgd(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgd(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7763,10 +7768,10 @@ instruct weakCompareAndSwapP_acq_regP_regP_regP(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0); // TEMP_DEF to avoid jump
format %{ "weak CMPXCHGD acq $res, $mem_ptr, $src1, $src2; as bool; ptr" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
// Acquire only needed in successful case. Weak node is allowed to report unsuccessful in additional rare cases and
// value is never passed to caller.
- __ cmpxchgd(CCR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ __ cmpxchgd(CR0, R0, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
support_IRIW_for_not_multiple_copy_atomic_cpu ? MacroAssembler::MemBarAcq : MacroAssembler::MemBarFenceAfter,
MacroAssembler::cmpxchgx_hint_atomic_update(), $res$$Register, nullptr, true, /*weak*/ true);
%}
@@ -7781,8 +7786,8 @@ instruct compareAndExchangeB_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGB $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -7795,8 +7800,8 @@ instruct compareAndExchangeB4_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr, iR
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP cr0);
format %{ "CMPXCHGB $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -7809,8 +7814,8 @@ instruct compareAndExchangeB_acq_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGB acq $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7829,8 +7834,8 @@ instruct compareAndExchangeB4_acq_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP cr0);
format %{ "CMPXCHGB acq $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgb(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgb(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7849,8 +7854,8 @@ instruct compareAndExchangeS_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGH $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -7863,8 +7868,8 @@ instruct compareAndExchangeS4_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr, iR
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP cr0);
format %{ "CMPXCHGH $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -7877,8 +7882,8 @@ instruct compareAndExchangeS_acq_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGH acq $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, noreg, noreg,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7897,8 +7902,8 @@ instruct compareAndExchangeS4_acq_regP_regI_regI(iRegIdst res, rarg3RegP mem_ptr
effect(TEMP_DEF res, USE_KILL src2, USE_KILL mem_ptr, TEMP tmp1, TEMP cr0);
format %{ "CMPXCHGH acq $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgh(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgh(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register, $tmp1$$Register, R0,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7917,8 +7922,8 @@ instruct compareAndExchangeI_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGW $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -7931,8 +7936,8 @@ instruct compareAndExchangeI_acq_regP_regI_regI(iRegIdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGW acq $res, $mem_ptr, $src1, $src2; as int" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7951,8 +7956,8 @@ instruct compareAndExchangeN_regP_regN_regN(iRegNdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGW $res, $mem_ptr, $src1, $src2; as narrow oop" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -7965,8 +7970,8 @@ instruct compareAndExchangeN_acq_regP_regN_regN(iRegNdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGW acq $res, $mem_ptr, $src1, $src2; as narrow oop" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgw(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgw(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -7985,8 +7990,8 @@ instruct compareAndExchangeL_regP_regL_regL(iRegLdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGD $res, $mem_ptr, $src1, $src2; as long" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgd(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgd(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -7999,8 +8004,8 @@ instruct compareAndExchangeL_acq_regP_regL_regL(iRegLdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGD acq $res, $mem_ptr, $src1, $src2; as long" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgd(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgd(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -8020,8 +8025,8 @@ instruct compareAndExchangeP_regP_regP_regP(iRegPdst res, iRegPdst mem_ptr, iReg
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGD $res, $mem_ptr, $src1, $src2; as ptr; ptr" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgd(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgd(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
%}
@@ -8035,8 +8040,8 @@ instruct compareAndExchangeP_acq_regP_regP_regP(iRegPdst res, iRegPdst mem_ptr,
effect(TEMP_DEF res, TEMP cr0);
format %{ "CMPXCHGD acq $res, $mem_ptr, $src1, $src2; as ptr; ptr" %}
ins_encode %{
- // CmpxchgX sets CCR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
- __ cmpxchgd(CCR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
+ // CmpxchgX sets CR0 to cmpX(src1, src2) and Rres to 'true'/'false'.
+ __ cmpxchgd(CR0, $res$$Register, $src1$$Register, $src2$$Register, $mem_ptr$$Register,
MacroAssembler::MemBarNone, MacroAssembler::cmpxchgx_hint_atomic_update(),
noreg, nullptr, true);
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
@@ -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
@@ -11389,7 +11372,7 @@ instruct cmpL3_reg_reg(iRegIdst dst, iRegLsrc src1, iRegLsrc src2, flagsRegCR0 c
format %{ "cmpL3_reg_reg $dst, $src1, $src2" %}
ins_encode %{
- __ cmpd(CCR0, $src1$$Register, $src2$$Register);
+ __ cmpd(CR0, $src1$$Register, $src2$$Register);
__ set_cmp3($dst$$Register);
%}
ins_pipe(pipe_class_default);
@@ -11661,11 +11644,11 @@ instruct cmpF_reg_reg_Ex(flagsReg crx, regF src1, regF src2) %{
//
// block BXX:
// 0: instruct cmpFUnordered_reg_reg (cmpF_reg_reg-0):
- // cmpFUrd CCR6, F11, F9
+ // cmpFUrd CR6, F11, F9
// 4: instruct cmov_bns_less (cmpF_reg_reg-1):
- // cmov CCR6
+ // cmov CR6
// 8: instruct branchConSched:
- // B_FARle CCR6, B56 P=0.500000 C=-1.000000
+ // B_FARle CR6, B56 P=0.500000 C=-1.000000
match(Set crx (CmpF src1 src2));
ins_cost(DEFAULT_COST+BRANCH_COST);
@@ -11724,7 +11707,7 @@ instruct cmpF3_reg_reg(iRegIdst dst, regF src1, regF src2, flagsRegCR0 cr0) %{
format %{ "cmpF3_reg_reg $dst, $src1, $src2" %}
ins_encode %{
- __ fcmpu(CCR0, $src1$$FloatRegister, $src2$$FloatRegister);
+ __ fcmpu(CR0, $src1$$FloatRegister, $src2$$FloatRegister);
__ set_cmpu3($dst$$Register, true); // C2 requires unordered to get treated like less
%}
ins_pipe(pipe_class_default);
@@ -11808,7 +11791,7 @@ instruct cmpD3_reg_reg(iRegIdst dst, regD src1, regD src2, flagsRegCR0 cr0) %{
format %{ "cmpD3_reg_reg $dst, $src1, $src2" %}
ins_encode %{
- __ fcmpu(CCR0, $src1$$FloatRegister, $src2$$FloatRegister);
+ __ fcmpu(CR0, $src1$$FloatRegister, $src2$$FloatRegister);
__ set_cmpu3($dst$$Register, true); // C2 requires unordered to get treated like less
%}
ins_pipe(pipe_class_default);
@@ -12069,6 +12052,7 @@ instruct branchLoopEndFar(cmpOp cmp, flagsRegSrc crx, label labl) %{
instruct partialSubtypeCheck(iRegPdst result, iRegP_N2P subklass, iRegP_N2P superklass,
iRegPdst tmp_klass, iRegPdst tmp_arrayptr) %{
match(Set result (PartialSubtypeCheck subklass superklass));
+ predicate(!UseSecondarySupersTable);
effect(TEMP_DEF result, TEMP tmp_klass, TEMP tmp_arrayptr);
ins_cost(DEFAULT_COST*10);
@@ -12080,6 +12064,30 @@ instruct partialSubtypeCheck(iRegPdst result, iRegP_N2P subklass, iRegP_N2P supe
ins_pipe(pipe_class_default);
%}
+// Two versions of partialSubtypeCheck, both used when we need to
+// search for a super class in the secondary supers array. The first
+// is used when we don't know _a priori_ the class being searched
+// for. The second, far more common, is used when we do know: this is
+// used for instanceof, checkcast, and any case where C2 can determine
+// it by constant propagation.
+instruct partialSubtypeCheckVarSuper(iRegPsrc sub, iRegPsrc super, iRegPdst result,
+ iRegPdst tempR1, iRegPdst tempR2, iRegPdst tempR3, iRegPdst tempR4,
+ flagsRegCR0 cr0, regCTR ctr)
+%{
+ match(Set result (PartialSubtypeCheck sub super));
+ predicate(UseSecondarySupersTable);
+ effect(KILL cr0, KILL ctr, TEMP_DEF result, TEMP tempR1, TEMP tempR2, TEMP tempR3, TEMP tempR4);
+
+ ins_cost(DEFAULT_COST * 10); // slightly larger than the next version
+ format %{ "partialSubtypeCheck $result, $sub, $super" %}
+ ins_encode %{
+ __ lookup_secondary_supers_table_var($sub$$Register, $super$$Register,
+ $tempR1$$Register, $tempR2$$Register, $tempR3$$Register, $tempR4$$Register,
+ $result$$Register);
+ %}
+ ins_pipe(pipe_class_memory);
+%}
+
instruct partialSubtypeCheckConstSuper(rarg3RegP sub, rarg2RegP super_reg, immP super_con, rarg6RegP result,
rarg1RegP tempR1, rarg5RegP tempR2, rarg4RegP tempR3, rscratch1RegP tempR4,
flagsRegCR0 cr0, regCTR ctr)
@@ -12094,9 +12102,9 @@ instruct partialSubtypeCheckConstSuper(rarg3RegP sub, rarg2RegP super_reg, immP
ins_encode %{
u1 super_klass_slot = ((Klass*)$super_con$$constant)->hash_slot();
if (InlineSecondarySupersTest) {
- __ lookup_secondary_supers_table($sub$$Register, $super_reg$$Register,
- $tempR1$$Register, $tempR2$$Register, $tempR3$$Register, $tempR4$$Register,
- $result$$Register, super_klass_slot);
+ __ lookup_secondary_supers_table_const($sub$$Register, $super_reg$$Register,
+ $tempR1$$Register, $tempR2$$Register, $tempR3$$Register, $tempR4$$Register,
+ $result$$Register, super_klass_slot);
} else {
address stub = StubRoutines::lookup_secondary_supers_table_stub(super_klass_slot);
Register r_stub_addr = $tempR1$$Register;
@@ -12745,7 +12753,7 @@ instruct string_inflate(Universe dummy, rarg1RegP src, rarg2RegP dst, iRegIsrc l
__ string_inflate_16($src$$Register, $dst$$Register, $len$$Register, $tmp1$$Register,
$tmp2$$Register, $tmp3$$Register, $tmp4$$Register, $tmp5$$Register);
__ rldicl_($tmp1$$Register, $len$$Register, 0, 64-3); // Remaining characters.
- __ beq(CCR0, Ldone);
+ __ beq(CR0, Ldone);
__ string_inflate($src$$Register, $dst$$Register, $tmp1$$Register, $tmp2$$Register);
__ bind(Ldone);
%}
@@ -12829,8 +12837,8 @@ instruct minI_reg_reg_isel(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsRegC
ins_cost(DEFAULT_COST*2);
ins_encode %{
- __ cmpw(CCR0, $src1$$Register, $src2$$Register);
- __ isel($dst$$Register, CCR0, Assembler::less, /*invert*/false, $src1$$Register, $src2$$Register);
+ __ cmpw(CR0, $src1$$Register, $src2$$Register);
+ __ isel($dst$$Register, CR0, Assembler::less, /*invert*/false, $src1$$Register, $src2$$Register);
%}
ins_pipe(pipe_class_default);
%}
@@ -12862,8 +12870,8 @@ instruct maxI_reg_reg_isel(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsRegC
ins_cost(DEFAULT_COST*2);
ins_encode %{
- __ cmpw(CCR0, $src1$$Register, $src2$$Register);
- __ isel($dst$$Register, CCR0, Assembler::greater, /*invert*/false, $src1$$Register, $src2$$Register);
+ __ cmpw(CR0, $src1$$Register, $src2$$Register);
+ __ isel($dst$$Register, CR0, Assembler::greater, /*invert*/false, $src1$$Register, $src2$$Register);
%}
ins_pipe(pipe_class_default);
%}
@@ -14052,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 %{
@@ -14080,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) %{
diff --git a/src/hotspot/cpu/ppc/register_ppc.cpp b/src/hotspot/cpu/ppc/register_ppc.cpp
index e84f89373ad..4591d3ec2e4 100644
--- a/src/hotspot/cpu/ppc/register_ppc.cpp
+++ b/src/hotspot/cpu/ppc/register_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "register_ppc.hpp"
const char* Register::name() const {
diff --git a/src/hotspot/cpu/ppc/register_ppc.hpp b/src/hotspot/cpu/ppc/register_ppc.hpp
index 1a7f4969347..565542ad7c0 100644
--- a/src/hotspot/cpu/ppc/register_ppc.hpp
+++ b/src/hotspot/cpu/ppc/register_ppc.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2023 SAP SE. All rights reserved.
+ * Copyright (c) 2000, 2025, Oracle and/or its affiliates. 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
@@ -179,14 +179,14 @@ inline constexpr ConditionRegister as_ConditionRegister(int encoding) {
return ConditionRegister(encoding);
}
-constexpr ConditionRegister CCR0 = as_ConditionRegister(0);
-constexpr ConditionRegister CCR1 = as_ConditionRegister(1);
-constexpr ConditionRegister CCR2 = as_ConditionRegister(2);
-constexpr ConditionRegister CCR3 = as_ConditionRegister(3);
-constexpr ConditionRegister CCR4 = as_ConditionRegister(4);
-constexpr ConditionRegister CCR5 = as_ConditionRegister(5);
-constexpr ConditionRegister CCR6 = as_ConditionRegister(6);
-constexpr ConditionRegister CCR7 = as_ConditionRegister(7);
+constexpr ConditionRegister CR0 = as_ConditionRegister(0);
+constexpr ConditionRegister CR1 = as_ConditionRegister(1);
+constexpr ConditionRegister CR2 = as_ConditionRegister(2);
+constexpr ConditionRegister CR3 = as_ConditionRegister(3);
+constexpr ConditionRegister CR4 = as_ConditionRegister(4);
+constexpr ConditionRegister CR5 = as_ConditionRegister(5);
+constexpr ConditionRegister CR6 = as_ConditionRegister(6);
+constexpr ConditionRegister CR7 = as_ConditionRegister(7);
class VectorSRegister;
diff --git a/src/hotspot/cpu/ppc/relocInfo_ppc.cpp b/src/hotspot/cpu/ppc/relocInfo_ppc.cpp
index c0fe87a1e13..559d30a8f23 100644
--- a/src/hotspot/cpu/ppc/relocInfo_ppc.cpp
+++ b/src/hotspot/cpu/ppc/relocInfo_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "code/relocInfo.hpp"
#include "nativeInst_ppc.hpp"
diff --git a/src/hotspot/cpu/ppc/runtime_ppc.cpp b/src/hotspot/cpu/ppc/runtime_ppc.cpp
index eceebc45c94..94e8c08ebf5 100644
--- a/src/hotspot/cpu/ppc/runtime_ppc.cpp
+++ b/src/hotspot/cpu/ppc/runtime_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2023 SAP SE. All rights reserved.
+ * Copyright (c) 1998, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#ifdef COMPILER2
#include "asm/macroAssembler.inline.hpp"
#include "code/vmreg.hpp"
@@ -68,11 +67,12 @@
//
// 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);
InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);
address start = __ pc();
@@ -102,7 +102,7 @@ void OptoRuntime::generate_exception_blob() {
__ call_c((address) OptoRuntime::handle_exception_C);
address calls_return_pc = __ last_calls_return_pc();
# ifdef ASSERT
- __ cmpdi(CCR0, R3_RET, 0);
+ __ cmpdi(CR0, R3_RET, 0);
__ asm_assert_ne("handle_exception_C must not return null");
# endif
@@ -143,7 +143,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 c2e4c2e9b55..0d0e004c923 100644
--- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
+++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/debugInfoRec.hpp"
#include "code/compiledIC.hpp"
@@ -909,9 +908,9 @@ static address gen_c2i_adapter(MacroAssembler *masm,
// Does compiled code exists? If yes, patch the caller's callsite.
__ ld(code, method_(code));
- __ cmpdi(CCR0, code, 0);
+ __ cmpdi(CR0, code, 0);
__ ld(ientry, method_(interpreter_entry)); // preloaded
- __ beq(CCR0, call_interpreter);
+ __ beq(CR0, call_interpreter);
// Patch caller's callsite, method_(code) was not null which means that
@@ -1185,9 +1184,9 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
// Argument is valid and klass is as expected, continue.
__ ld(code, method_(code));
- __ cmpdi(CCR0, code, 0);
+ __ cmpdi(CR0, code, 0);
__ ld(ientry, method_(interpreter_entry)); // preloaded
- __ beq_predict_taken(CCR0, call_interpreter);
+ __ beq_predict_taken(CR0, call_interpreter);
// Branch to ic_miss_stub.
__ b64_patchable((address)SharedRuntime::get_ic_miss_stub(), relocInfo::runtime_call_type);
@@ -1202,9 +1201,9 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label L_skip_barrier;
{ // Bypass the barrier for non-static methods
- __ lwz(R0, in_bytes(Method::access_flags_offset()), R19_method);
+ __ lhz(R0, in_bytes(Method::access_flags_offset()), R19_method);
__ andi_(R0, R0, JVM_ACC_STATIC);
- __ beq(CCR0, L_skip_barrier); // non-static
+ __ beq(CR0, L_skip_barrier); // non-static
}
Register klass = R11_scratch1;
@@ -1252,8 +1251,8 @@ static void object_move(MacroAssembler* masm,
__ addi(r_handle, r_caller_sp, reg2offset(src.first()));
__ ld( r_temp_2, reg2offset(src.first()), r_caller_sp);
- __ cmpdi(CCR0, r_temp_2, 0);
- __ bne(CCR0, skip);
+ __ cmpdi(CR0, r_temp_2, 0);
+ __ bne(CR0, skip);
// Use a null handle if oop is null.
__ li(r_handle, 0);
__ bind(skip);
@@ -1282,8 +1281,8 @@ static void object_move(MacroAssembler* masm,
__ std( r_oop, oop_offset, R1_SP);
__ addi(r_handle, R1_SP, oop_offset);
- __ cmpdi(CCR0, r_oop, 0);
- __ bne(CCR0, skip);
+ __ cmpdi(CR0, r_oop, 0);
+ __ bne(CR0, skip);
// Use a null handle if oop is null.
__ li(r_handle, 0);
__ bind(skip);
@@ -1643,7 +1642,7 @@ static void continuation_enter_cleanup(MacroAssembler* masm) {
#ifdef ASSERT
__ block_comment("clean {");
__ ld_ptr(tmp1, JavaThread::cont_entry_offset(), R16_thread);
- __ cmpd(CCR0, R1_SP, tmp1);
+ __ cmpd(CR0, R1_SP, tmp1);
__ asm_assert_eq(FILE_AND_LINE ": incorrect R1_SP");
#endif
@@ -1654,15 +1653,15 @@ static void continuation_enter_cleanup(MacroAssembler* masm) {
// Check if this is a virtual thread continuation
Label L_skip_vthread_code;
__ lwz(R0, in_bytes(ContinuationEntry::flags_offset()), R1_SP);
- __ cmpwi(CCR0, R0, 0);
- __ beq(CCR0, L_skip_vthread_code);
+ __ cmpwi(CR0, R0, 0);
+ __ beq(CR0, L_skip_vthread_code);
// If the held monitor count is > 0 and this vthread is terminating then
// it failed to release a JNI monitor. So we issue the same log message
// that JavaThread::exit does.
__ ld(R0, in_bytes(JavaThread::jni_monitor_count_offset()), R16_thread);
- __ cmpdi(CCR0, R0, 0);
- __ beq(CCR0, L_skip_vthread_code);
+ __ cmpdi(CR0, R0, 0);
+ __ beq(CR0, L_skip_vthread_code);
// Save return value potentially containing the exception oop
Register ex_oop = R15_esp; // nonvolatile register
@@ -1684,8 +1683,8 @@ static void continuation_enter_cleanup(MacroAssembler* masm) {
// Check if this is a virtual thread continuation
Label L_skip_vthread_code;
__ lwz(R0, in_bytes(ContinuationEntry::flags_offset()), R1_SP);
- __ cmpwi(CCR0, R0, 0);
- __ beq(CCR0, L_skip_vthread_code);
+ __ cmpwi(CR0, R0, 0);
+ __ beq(CR0, L_skip_vthread_code);
// See comment just above. If not checking JNI calls the JNI count is only
// needed for assertion checking.
@@ -1750,8 +1749,8 @@ static void gen_continuation_enter(MacroAssembler* masm,
#ifdef ASSERT
Label is_interp_only;
__ lwz(R0, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
- __ cmpwi(CCR0, R0, 0);
- __ bne(CCR0, is_interp_only);
+ __ cmpwi(CR0, R0, 0);
+ __ bne(CR0, is_interp_only);
__ stop("enterSpecial interpreter entry called when not in interp_only_mode");
__ bind(is_interp_only);
#endif
@@ -1771,8 +1770,8 @@ static void gen_continuation_enter(MacroAssembler* masm,
fill_continuation_entry(masm, reg_cont_obj, reg_is_virtual);
// If isContinue, call to thaw. Otherwise, call Continuation.enter(Continuation c, boolean isContinue)
- __ cmpwi(CCR0, reg_is_cont, 0);
- __ bne(CCR0, L_thaw);
+ __ cmpwi(CR0, reg_is_cont, 0);
+ __ bne(CR0, L_thaw);
// --- call Continuation.enter(Continuation c, boolean isContinue)
@@ -1819,8 +1818,8 @@ static void gen_continuation_enter(MacroAssembler* masm,
fill_continuation_entry(masm, reg_cont_obj, reg_is_virtual);
// If isContinue, call to thaw. Otherwise, call Continuation.enter(Continuation c, boolean isContinue)
- __ cmpwi(CCR0, reg_is_cont, 0);
- __ bne(CCR0, L_thaw);
+ __ cmpwi(CR0, reg_is_cont, 0);
+ __ bne(CR0, L_thaw);
// --- call Continuation.enter(Continuation c, boolean isContinue)
@@ -1870,7 +1869,7 @@ static void gen_continuation_enter(MacroAssembler* masm,
// Pop frame and return
DEBUG_ONLY(__ ld_ptr(R0, 0, R1_SP));
__ addi(R1_SP, R1_SP, framesize_words*wordSize);
- DEBUG_ONLY(__ cmpd(CCR0, R0, R1_SP));
+ DEBUG_ONLY(__ cmpd(CR0, R0, R1_SP));
__ asm_assert_eq(FILE_AND_LINE ": inconsistent frame size");
__ ld(R0, _abi0(lr), R1_SP); // Return pc
__ mtlr(R0);
@@ -1938,8 +1937,8 @@ static void gen_continuation_yield(MacroAssembler* masm,
Label L_pinned;
- __ cmpwi(CCR0, R3_RET, 0);
- __ bne(CCR0, L_pinned);
+ __ cmpwi(CR0, R3_RET, 0);
+ __ bne(CR0, L_pinned);
// yield succeeded
@@ -1962,8 +1961,8 @@ static void gen_continuation_yield(MacroAssembler* masm,
// handle pending exception thrown by freeze
__ ld(tmp, in_bytes(JavaThread::pending_exception_offset()), R16_thread);
- __ cmpdi(CCR0, tmp, 0);
- __ beq(CCR0, L_return); // return if no exception is pending
+ __ cmpdi(CR0, tmp, 0);
+ __ beq(CR0, L_return); // return if no exception is pending
__ pop_frame();
__ ld(R0, _abi0(lr), R1_SP); // Return pc
__ mtlr(R0);
@@ -2399,12 +2398,12 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
if (LockingMode == LM_LIGHTWEIGHT) {
// fast_lock kills r_temp_1, r_temp_2, r_temp_3.
Register r_temp_3_or_noreg = UseObjectMonitorTable ? r_temp_3 : noreg;
- __ compiler_fast_lock_lightweight_object(CCR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3_or_noreg);
+ __ compiler_fast_lock_lightweight_object(CR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3_or_noreg);
} else {
// fast_lock kills r_temp_1, r_temp_2, r_temp_3.
- __ compiler_fast_lock_object(CCR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3);
+ __ compiler_fast_lock_object(CR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3);
}
- __ beq(CCR0, locked);
+ __ beq(CR0, locked);
// None of the above fast optimizations worked so we have to get into the
// slow case of monitor enter. Inline a special case of call_VM that
@@ -2539,8 +2538,8 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
// Not suspended.
// TODO: PPC port assert(4 == Thread::sz_suspend_flags(), "unexpected field size");
__ lwz(suspend_flags, thread_(suspend_flags));
- __ cmpwi(CCR1, suspend_flags, 0);
- __ beq(CCR1, no_block);
+ __ cmpwi(CR1, suspend_flags, 0);
+ __ beq(CR1, no_block);
// Block. Save any potential method result value before the operation and
// use a leaf call to leave the last_Java_frame setup undisturbed. Doing this
@@ -2573,8 +2572,8 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
if (LockingMode != LM_LEGACY && method->is_object_wait0()) {
Label not_preempted;
__ ld(R0, in_bytes(JavaThread::preempt_alternate_return_offset()), R16_thread);
- __ cmpdi(CCR0, R0, 0);
- __ beq(CCR0, not_preempted);
+ __ cmpdi(CR0, R0, 0);
+ __ beq(CR0, not_preempted);
__ mtlr(R0);
__ li(R0, 0);
__ std(R0, in_bytes(JavaThread::preempt_alternate_return_offset()), R16_thread);
@@ -2592,8 +2591,8 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
Label no_reguard;
__ lwz(r_temp_1, thread_(stack_guard_state));
- __ cmpwi(CCR0, r_temp_1, StackOverflow::stack_guard_yellow_reserved_disabled);
- __ bne(CCR0, no_reguard);
+ __ cmpwi(CR0, r_temp_1, StackOverflow::stack_guard_yellow_reserved_disabled);
+ __ bne(CR0, no_reguard);
save_native_result(masm, ret_type, workspace_slot_offset);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages));
@@ -2623,11 +2622,11 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
// Try fastpath for unlocking.
if (LockingMode == LM_LIGHTWEIGHT) {
- __ compiler_fast_unlock_lightweight_object(CCR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3);
+ __ compiler_fast_unlock_lightweight_object(CR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3);
} else {
- __ compiler_fast_unlock_object(CCR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3);
+ __ compiler_fast_unlock_object(CR0, r_oop, r_box, r_temp_1, r_temp_2, r_temp_3);
}
- __ beq(CCR0, done);
+ __ beq(CR0, done);
// Save and restore any potential method result value around the unlocking operation.
save_native_result(masm, ret_type, workspace_slot_offset);
@@ -2694,8 +2693,8 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
// Check for pending exceptions.
// --------------------------------------------------------------------------
__ ld(r_temp_2, thread_(pending_exception));
- __ cmpdi(CCR0, r_temp_2, 0);
- __ bne(CCR0, handle_pending_exception);
+ __ cmpdi(CR0, r_temp_2, 0);
+ __ bne(CR0, handle_pending_exception);
// Return
// --------------------------------------------------------------------------
@@ -2852,7 +2851,7 @@ static void push_skeleton_frames(MacroAssembler* masm, bool deopt,
#ifdef ASSERT
// Make sure that there is at least one entry in the array.
- __ cmpdi(CCR0, number_of_frames_reg, 0);
+ __ cmpdi(CR0, number_of_frames_reg, 0);
__ asm_assert_ne("array_size must be > 0");
#endif
@@ -2867,8 +2866,8 @@ static void push_skeleton_frames(MacroAssembler* masm, bool deopt,
pcs_reg,
frame_size_reg,
pc_reg);
- __ cmpdi(CCR0, number_of_frames_reg, 0);
- __ bne(CCR0, loop);
+ __ cmpdi(CR0, number_of_frames_reg, 0);
+ __ bne(CR0, loop);
// Get the return address pointing into the frame manager.
__ ld(R0, 0, pcs_reg);
@@ -3015,8 +3014,8 @@ void SharedRuntime::generate_deopt_blob() {
// stored in the thread during exception entry above. The exception
// oop will be the return value of this stub.
Label skip_restore_excp;
- __ cmpdi(CCR0, exec_mode_reg, Deoptimization::Unpack_exception);
- __ bne(CCR0, skip_restore_excp);
+ __ cmpdi(CR0, exec_mode_reg, Deoptimization::Unpack_exception);
+ __ bne(CR0, skip_restore_excp);
__ ld(R3_RET, in_bytes(JavaThread::exception_oop_offset()), R16_thread);
__ ld(R4_ARG2, in_bytes(JavaThread::exception_pc_offset()), R16_thread);
__ li(R0, 0);
@@ -3101,11 +3100,12 @@ 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);
InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);
address start = __ pc();
@@ -3166,7 +3166,7 @@ void OptoRuntime::generate_uncommon_trap_blob() {
#ifdef ASSERT
__ lwz(R22_tmp2, in_bytes(Deoptimization::UnrollBlock::unpack_kind_offset()), unroll_block_reg);
- __ cmpdi(CCR0, R22_tmp2, (unsigned)Deoptimization::Unpack_uncommon_trap);
+ __ cmpdi(CR0, R22_tmp2, (unsigned)Deoptimization::Unpack_uncommon_trap);
__ asm_assert_eq("OptoRuntime::generate_uncommon_trap_blob: expected Unpack_uncommon_trap");
#endif
@@ -3228,7 +3228,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
@@ -3296,8 +3296,8 @@ SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address cal
BLOCK_COMMENT(" Check pending exception.");
const Register pending_exception = R0;
__ ld(pending_exception, thread_(pending_exception));
- __ cmpdi(CCR0, pending_exception, 0);
- __ beq(CCR0, noException);
+ __ cmpdi(CR0, pending_exception, 0);
+ __ beq(CR0, noException);
// Exception pending
RegisterSaver::restore_live_registers_and_pop_frame(masm,
@@ -3316,8 +3316,8 @@ SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address cal
Label no_adjust;
// If our stashed return pc was modified by the runtime we avoid touching it
__ ld(R0, frame_size_in_bytes + _abi0(lr), R1_SP);
- __ cmpd(CCR0, R0, R31);
- __ bne(CCR0, no_adjust);
+ __ cmpd(CR0, R0, R31);
+ __ bne(CR0, no_adjust);
// Adjust return pc forward to step over the safepoint poll instruction
__ addi(R31, R31, 4);
@@ -3396,8 +3396,8 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
BLOCK_COMMENT("Check for pending exceptions.");
Label pending;
__ ld(R11_scratch1, thread_(pending_exception));
- __ cmpdi(CCR0, R11_scratch1, 0);
- __ bne(CCR0, pending);
+ __ cmpdi(CR0, R11_scratch1, 0);
+ __ bne(CR0, pending);
__ mtctr(R3_RET); // Ctr will not be touched by restore_live_registers_and_pop_frame.
@@ -3500,8 +3500,8 @@ RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address ru
__ ld(R0,
in_bytes(Thread::pending_exception_offset()),
R16_thread);
- __ cmpdi(CCR0, R0, 0);
- __ bne(CCR0, L);
+ __ cmpdi(CR0, R0, 0);
+ __ bne(CR0, L);
__ stop("SharedRuntime::throw_exception: no pending exception");
__ bind(L);
}
diff --git a/src/hotspot/cpu/ppc/stubDeclarations_ppc.hpp b/src/hotspot/cpu/ppc/stubDeclarations_ppc.hpp
new file mode 100644
index 00000000000..1a19f1b8cf2
--- /dev/null
+++ b/src/hotspot/cpu/ppc/stubDeclarations_ppc.hpp
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2025, 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_PPC_STUBDECLARATIONS_HPP
+#define CPU_PPC_STUBDECLARATIONS_HPP
+
+#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(initial, 20000) \
+
+
+#define STUBGEN_CONTINUATION_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(continuation, 2000) \
+
+
+#define STUBGEN_COMPILER_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(compiler, 24000) \
+
+
+#define STUBGEN_FINAL_BLOBS_ARCH_DO(do_stub, \
+ do_arch_blob, \
+ do_arch_entry, \
+ do_arch_entry_init) \
+ do_arch_blob(final, 24000) \
+
+
+#endif // CPU_PPC_STUBDECLARATIONS_HPP
diff --git a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
index f1168b5d07b..fa356ec13ac 100644
--- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
+++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/oopMap.hpp"
#include "gc/shared/barrierSet.hpp"
@@ -90,7 +89,8 @@ class StubGenerator: public StubCodeGenerator {
// Setup a new c frame, copy java arguments, call frame manager or
// native_entry, and process result.
- StubCodeMark mark(this, "StubRoutines", "call_stub");
+ StubGenStubId stub_id = StubGenStubId::call_stub_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
@@ -195,8 +195,8 @@ class StubGenerator: public StubCodeGenerator {
r_top_of_arguments_addr, r_frame_alignment_in_bytes);
// any arguments to copy?
- __ cmpdi(CCR0, r_arg_argument_count, 0);
- __ beq(CCR0, arguments_copied);
+ __ cmpdi(CR0, r_arg_argument_count, 0);
+ __ beq(CR0, arguments_copied);
// prepare loop and copy arguments in reverse order
{
@@ -335,10 +335,10 @@ class StubGenerator: public StubCodeGenerator {
// Store result depending on type. Everything that is not
// T_OBJECT, T_LONG, T_FLOAT, or T_DOUBLE is treated as T_INT.
- __ cmpwi(CCR0, r_arg_result_type, T_OBJECT);
- __ cmpwi(CCR1, r_arg_result_type, T_LONG);
- __ cmpwi(CCR5, r_arg_result_type, T_FLOAT);
- __ cmpwi(CCR6, r_arg_result_type, T_DOUBLE);
+ __ cmpwi(CR0, r_arg_result_type, T_OBJECT);
+ __ cmpwi(CR1, r_arg_result_type, T_LONG);
+ __ cmpwi(CR5, r_arg_result_type, T_FLOAT);
+ __ cmpwi(CR6, r_arg_result_type, T_DOUBLE);
// restore non-volatile registers
__ restore_nonvolatile_gprs(R1_SP, _spill_nonvolatiles_neg(r14));
@@ -354,10 +354,10 @@ class StubGenerator: public StubCodeGenerator {
// All non-volatiles have been restored at this point!!
assert(R3_RET == R3, "R3_RET should be R3");
- __ beq(CCR0, ret_is_object);
- __ beq(CCR1, ret_is_long);
- __ beq(CCR5, ret_is_float);
- __ beq(CCR6, ret_is_double);
+ __ beq(CR0, ret_is_object);
+ __ beq(CR1, ret_is_long);
+ __ beq(CR5, ret_is_float);
+ __ beq(CR6, ret_is_double);
// default:
__ stw(R3_RET, 0, r_arg_result_addr);
@@ -393,7 +393,8 @@ class StubGenerator: public StubCodeGenerator {
// within the VM.
//
address generate_catch_exception() {
- StubCodeMark mark(this, "StubRoutines", "catch_exception");
+ StubGenStubId stub_id = StubGenStubId::catch_exception_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
@@ -448,7 +449,8 @@ class StubGenerator: public StubCodeGenerator {
// (LR is unchanged and is live out).
//
address generate_forward_exception() {
- StubCodeMark mark(this, "StubRoutines", "forward_exception");
+ StubGenStubId stub_id = StubGenStubId::forward_exception_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
if (VerifyOops) {
@@ -459,8 +461,8 @@ class StubGenerator: public StubCodeGenerator {
// Make sure that this code is only executed if there is a pending exception.
{
Label L;
- __ cmpdi(CCR0, R3_ARG1, 0);
- __ bne(CCR0, L);
+ __ cmpdi(CR0, R3_ARG1, 0);
+ __ bne(CR0, L);
__ stop("StubRoutines::forward exception: no pending exception (1)");
__ bind(L);
}
@@ -497,8 +499,8 @@ class StubGenerator: public StubCodeGenerator {
// Make sure exception is set.
{
Label L;
- __ cmpdi(CCR0, R3_ARG1, 0);
- __ bne(CCR0, L);
+ __ cmpdi(CR0, R3_ARG1, 0);
+ __ bne(CR0, L);
__ stop("StubRoutines::forward exception: no pending exception (2)");
__ bind(L);
}
@@ -518,93 +520,6 @@ class StubGenerator: public StubCodeGenerator {
#undef __
#define __ _masm->
-
- // Support for void zero_words_aligned8(HeapWord* to, size_t count)
- //
- // Arguments:
- // to:
- // count:
- //
- // Destroys:
- //
- address generate_zero_words_aligned8() {
- StubCodeMark mark(this, "StubRoutines", "zero_words_aligned8");
-
- // Implemented as in ClearArray.
- address start = __ function_entry();
-
- Register base_ptr_reg = R3_ARG1; // tohw (needs to be 8b aligned)
- Register cnt_dwords_reg = R4_ARG2; // count (in dwords)
- Register tmp1_reg = R5_ARG3;
- Register tmp2_reg = R6_ARG4;
- Register zero_reg = R7_ARG5;
-
- // Procedure for large arrays (uses data cache block zero instruction).
- Label dwloop, fast, fastloop, restloop, lastdword, done;
- int cl_size = VM_Version::L1_data_cache_line_size();
- int cl_dwords = cl_size >> 3;
- int cl_dwordaddr_bits = exact_log2(cl_dwords);
- int min_dcbz = 2; // Needs to be positive, apply dcbz only to at least min_dcbz cache lines.
-
- // Clear up to 128byte boundary if long enough, dword_cnt=(16-(base>>3))%16.
- __ dcbtst(base_ptr_reg); // Indicate write access to first cache line ...
- __ andi(tmp2_reg, cnt_dwords_reg, 1); // to check if number of dwords is even.
- __ srdi_(tmp1_reg, cnt_dwords_reg, 1); // number of double dwords
- __ load_const_optimized(zero_reg, 0L); // Use as zero register.
-
- __ cmpdi(CCR1, tmp2_reg, 0); // cnt_dwords even?
- __ beq(CCR0, lastdword); // size <= 1
- __ mtctr(tmp1_reg); // Speculatively preload counter for rest loop (>0).
- __ cmpdi(CCR0, cnt_dwords_reg, (min_dcbz+1)*cl_dwords-1); // Big enough to ensure >=min_dcbz cache lines are included?
- __ neg(tmp1_reg, base_ptr_reg); // bit 0..58: bogus, bit 57..60: (16-(base>>3))%16, bit 61..63: 000
-
- __ blt(CCR0, restloop); // Too small. (<31=(2*cl_dwords)-1 is sufficient, but bigger performs better.)
- __ rldicl_(tmp1_reg, tmp1_reg, 64-3, 64-cl_dwordaddr_bits); // Extract number of dwords to 128byte boundary=(16-(base>>3))%16.
-
- __ beq(CCR0, fast); // already 128byte aligned
- __ mtctr(tmp1_reg); // Set ctr to hit 128byte boundary (00 since size>=256-8)
-
- // Clear in first cache line dword-by-dword if not already 128byte aligned.
- __ bind(dwloop);
- __ std(zero_reg, 0, base_ptr_reg); // Clear 8byte aligned block.
- __ addi(base_ptr_reg, base_ptr_reg, 8);
- __ bdnz(dwloop);
-
- // clear 128byte blocks
- __ bind(fast);
- __ srdi(tmp1_reg, cnt_dwords_reg, cl_dwordaddr_bits); // loop count for 128byte loop (>0 since size>=256-8)
- __ andi(tmp2_reg, cnt_dwords_reg, 1); // to check if rest even
-
- __ mtctr(tmp1_reg); // load counter
- __ cmpdi(CCR1, tmp2_reg, 0); // rest even?
- __ rldicl_(tmp1_reg, cnt_dwords_reg, 63, 65-cl_dwordaddr_bits); // rest in double dwords
-
- __ bind(fastloop);
- __ dcbz(base_ptr_reg); // Clear 128byte aligned block.
- __ addi(base_ptr_reg, base_ptr_reg, cl_size);
- __ bdnz(fastloop);
-
- //__ dcbtst(base_ptr_reg); // Indicate write access to last cache line.
- __ beq(CCR0, lastdword); // rest<=1
- __ mtctr(tmp1_reg); // load counter
-
- // Clear rest.
- __ bind(restloop);
- __ std(zero_reg, 0, base_ptr_reg); // Clear 8byte aligned block.
- __ std(zero_reg, 8, base_ptr_reg); // Clear 8byte aligned block.
- __ addi(base_ptr_reg, base_ptr_reg, 16);
- __ bdnz(restloop);
-
- __ bind(lastdword);
- __ beq(CCR1, done);
- __ std(zero_reg, 0, base_ptr_reg);
- __ bind(done);
- __ blr(); // return
-
- return start;
- }
-
#if !defined(PRODUCT)
// Wrapper which calls oopDesc::is_oop_or_null()
// Only called by MacroAssembler::verify_oop
@@ -648,8 +563,40 @@ class StubGenerator: public StubCodeGenerator {
// value: R4_ARG2
// count: R5_ARG3 treated as signed
//
- address generate_fill(BasicType t, bool aligned, const char* name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_fill(StubGenStubId stub_id) {
+ BasicType t;
+ bool aligned;
+
+ switch (stub_id) {
+ case jbyte_fill_id:
+ t = T_BYTE;
+ aligned = false;
+ break;
+ case jshort_fill_id:
+ t = T_SHORT;
+ aligned = false;
+ break;
+ case jint_fill_id:
+ t = T_INT;
+ aligned = false;
+ break;
+ case arrayof_jbyte_fill_id:
+ t = T_BYTE;
+ aligned = true;
+ break;
+ case arrayof_jshort_fill_id:
+ t = T_SHORT;
+ aligned = true;
+ break;
+ case arrayof_jint_fill_id:
+ t = T_INT;
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
const Register to = R3_ARG1; // source array address
@@ -668,21 +615,21 @@ class StubGenerator: public StubCodeGenerator {
shift = 2;
// Clone bytes (zero extend not needed because store instructions below ignore high order bytes).
__ rldimi(value, value, 8, 48); // 8 bit -> 16 bit
- __ cmpdi(CCR0, count, 2< 32 bit
break;
case T_SHORT:
shift = 1;
// Clone bytes (zero extend not needed because store instructions below ignore high order bytes).
__ rldimi(value, value, 16, 32); // 16 bit -> 32 bit
- __ cmpdi(CCR0, count, 2< to or from is aligned -> copy 8
+ __ bne(CR0, l_7); // not same alignment -> to or from is aligned -> copy 8
// copy a 2-element word if necessary to align to 8 bytes
__ andi_(R0, R3_ARG1, 7);
- __ beq(CCR0, l_7);
+ __ beq(CR0, l_7);
__ lwzx(tmp2, R3_ARG1, tmp3);
__ addi(R5_ARG3, R5_ARG3, -4);
@@ -958,8 +917,8 @@ class StubGenerator: public StubCodeGenerator {
__ bind(l_7);
{ // FasterArrayCopy
- __ cmpwi(CCR0, R5_ARG3, 31);
- __ ble(CCR0, l_6); // copy 2 at a time if less than 32 elements remain
+ __ cmpwi(CR0, R5_ARG3, 31);
+ __ ble(CR0, l_6); // copy 2 at a time if less than 32 elements remain
__ srdi(tmp1, R5_ARG3, 5);
__ andi_(R5_ARG3, R5_ARG3, 31);
@@ -1024,8 +983,8 @@ class StubGenerator: public StubCodeGenerator {
__ bind(l_6);
// copy 4 elements at a time
- __ cmpwi(CCR0, R5_ARG3, 4);
- __ blt(CCR0, l_1);
+ __ cmpwi(CR0, R5_ARG3, 4);
+ __ blt(CR0, l_1);
__ srdi(tmp1, R5_ARG3, 2);
__ mtctr(tmp1); // is > 0
__ andi_(R5_ARG3, R5_ARG3, 3);
@@ -1043,8 +1002,8 @@ class StubGenerator: public StubCodeGenerator {
// do single element copy
__ bind(l_1);
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_4);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_4);
{ // FasterArrayCopy
__ mtctr(R5_ARG3);
@@ -1073,8 +1032,20 @@ class StubGenerator: public StubCodeGenerator {
// to: R4_ARG2
// count: R5_ARG3 treated as signed
//
- address generate_conjoint_byte_copy(bool aligned, const char * name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_conjoint_byte_copy(StubGenStubId stub_id) {
+ bool aligned;
+ switch (stub_id) {
+ case jbyte_arraycopy_id:
+ aligned = false;
+ break;
+ case arrayof_jbyte_arraycopy_id:
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
@@ -1099,7 +1070,7 @@ class StubGenerator: public StubCodeGenerator {
__ bind(l_2);
__ addic_(R5_ARG3, R5_ARG3, -1);
__ lbzx(tmp1, R3_ARG1, R5_ARG3);
- __ bge(CCR0, l_1);
+ __ bge(CR0, l_1);
}
__ li(R3_RET, 0); // return 0
__ blr();
@@ -1162,8 +1133,20 @@ class StubGenerator: public StubCodeGenerator {
//
// 1. check if aligning the backbranch target of loops is beneficial
//
- address generate_disjoint_short_copy(bool aligned, const char * name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_disjoint_short_copy(StubGenStubId stub_id) {
+ bool aligned;
+ switch (stub_id) {
+ case jshort_disjoint_arraycopy_id:
+ aligned = false;
+ break;
+ case arrayof_jshort_disjoint_arraycopy_id:
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
Register tmp1 = R6_ARG4;
Register tmp2 = R7_ARG5;
@@ -1182,19 +1165,19 @@ class StubGenerator: public StubCodeGenerator {
UnsafeMemoryAccessMark umam(this, !aligned, false);
// don't try anything fancy if arrays don't have many elements
__ li(tmp3, 0);
- __ cmpwi(CCR0, R5_ARG3, 9);
- __ ble(CCR0, l_6); // copy 2 at a time
+ __ cmpwi(CR0, R5_ARG3, 9);
+ __ ble(CR0, l_6); // copy 2 at a time
if (!aligned) {
__ xorr(tmp1, R3_ARG1, R4_ARG2);
__ andi_(tmp1, tmp1, 3);
- __ bne(CCR0, l_6); // if arrays don't have the same alignment mod 4, do 2 element copy
+ __ bne(CR0, l_6); // if arrays don't have the same alignment mod 4, do 2 element copy
// At this point it is guaranteed that both, from and to have the same alignment mod 4.
// Copy 1 element if necessary to align to 4 bytes.
__ andi_(tmp1, R3_ARG1, 3);
- __ beq(CCR0, l_2);
+ __ beq(CR0, l_2);
__ lhz(tmp2, 0, R3_ARG1);
__ addi(R3_ARG1, R3_ARG1, 2);
@@ -1209,11 +1192,11 @@ class StubGenerator: public StubCodeGenerator {
// Align to 8 bytes, but only if both, from and to, have same alignment mod 8.
__ xorr(tmp2, R3_ARG1, R4_ARG2);
__ andi_(tmp1, tmp2, 7);
- __ bne(CCR0, l_7); // not same alignment mod 8 -> copy 4, either from or to will be unaligned
+ __ bne(CR0, l_7); // not same alignment mod 8 -> copy 4, either from or to will be unaligned
// Copy a 2-element word if necessary to align to 8 bytes.
__ andi_(R0, R3_ARG1, 7);
- __ beq(CCR0, l_7);
+ __ beq(CR0, l_7);
__ lwzx(tmp2, R3_ARG1, tmp3);
__ addi(R5_ARG3, R5_ARG3, -2);
@@ -1230,8 +1213,8 @@ class StubGenerator: public StubCodeGenerator {
// be unaligned if aligned == false.
{ // FasterArrayCopy
- __ cmpwi(CCR0, R5_ARG3, 15);
- __ ble(CCR0, l_6); // copy 2 at a time if less than 16 elements remain
+ __ cmpwi(CR0, R5_ARG3, 15);
+ __ ble(CR0, l_6); // copy 2 at a time if less than 16 elements remain
__ srdi(tmp1, R5_ARG3, 4);
__ andi_(R5_ARG3, R5_ARG3, 15);
@@ -1295,8 +1278,8 @@ class StubGenerator: public StubCodeGenerator {
// copy 2 elements at a time
{ // FasterArrayCopy
- __ cmpwi(CCR0, R5_ARG3, 2);
- __ blt(CCR0, l_1);
+ __ cmpwi(CR0, R5_ARG3, 2);
+ __ blt(CR0, l_1);
__ srdi(tmp1, R5_ARG3, 1);
__ andi_(R5_ARG3, R5_ARG3, 1);
@@ -1315,8 +1298,8 @@ class StubGenerator: public StubCodeGenerator {
// do single element copy
__ bind(l_1);
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_4);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_4);
{ // FasterArrayCopy
__ mtctr(R5_ARG3);
@@ -1345,8 +1328,20 @@ class StubGenerator: public StubCodeGenerator {
// to: R4_ARG2
// count: R5_ARG3 treated as signed
//
- address generate_conjoint_short_copy(bool aligned, const char * name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_conjoint_short_copy(StubGenStubId stub_id) {
+ bool aligned;
+ switch (stub_id) {
+ case jshort_arraycopy_id:
+ aligned = false;
+ break;
+ case arrayof_jshort_arraycopy_id:
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
@@ -1371,7 +1366,7 @@ class StubGenerator: public StubCodeGenerator {
__ bind(l_2);
__ addic_(tmp1, tmp1, -2);
__ lhzx(tmp2, R3_ARG1, tmp1);
- __ bge(CCR0, l_1);
+ __ bge(CR0, l_1);
}
__ li(R3_RET, 0); // return 0
__ blr();
@@ -1400,19 +1395,19 @@ class StubGenerator: public StubCodeGenerator {
// for short arrays, just do single element copy
__ li(tmp3, 0);
- __ cmpwi(CCR0, R5_ARG3, 5);
- __ ble(CCR0, l_2);
+ __ cmpwi(CR0, R5_ARG3, 5);
+ __ ble(CR0, l_2);
if (!aligned) {
// check if arrays have same alignment mod 8.
__ xorr(tmp1, R3_ARG1, R4_ARG2);
__ andi_(R0, tmp1, 7);
// Not the same alignment, but ld and std just need to be 4 byte aligned.
- __ bne(CCR0, l_4); // to OR from is 8 byte aligned -> copy 2 at a time
+ __ bne(CR0, l_4); // to OR from is 8 byte aligned -> copy 2 at a time
// copy 1 element to align to and from on an 8 byte boundary
__ andi_(R0, R3_ARG1, 7);
- __ beq(CCR0, l_4);
+ __ beq(CR0, l_4);
__ lwzx(tmp2, R3_ARG1, tmp3);
__ addi(R5_ARG3, R5_ARG3, -1);
@@ -1425,8 +1420,8 @@ class StubGenerator: public StubCodeGenerator {
}
{ // FasterArrayCopy
- __ cmpwi(CCR0, R5_ARG3, 7);
- __ ble(CCR0, l_2); // copy 1 at a time if less than 8 elements remain
+ __ cmpwi(CR0, R5_ARG3, 7);
+ __ ble(CR0, l_2); // copy 1 at a time if less than 8 elements remain
__ srdi(tmp1, R5_ARG3, 3);
__ andi_(R5_ARG3, R5_ARG3, 7);
@@ -1490,8 +1485,8 @@ class StubGenerator: public StubCodeGenerator {
// copy 1 element at a time
__ bind(l_2);
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_1);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_1);
{ // FasterArrayCopy
__ mtctr(R5_ARG3);
@@ -1516,8 +1511,20 @@ class StubGenerator: public StubCodeGenerator {
// to: R4_ARG2
// count: R5_ARG3 treated as signed
//
- address generate_disjoint_int_copy(bool aligned, const char * name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_disjoint_int_copy(StubGenStubId stub_id) {
+ bool aligned;
+ switch (stub_id) {
+ case jint_disjoint_arraycopy_id:
+ aligned = false;
+ break;
+ case arrayof_jint_disjoint_arraycopy_id:
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
{
@@ -1554,8 +1561,8 @@ class StubGenerator: public StubCodeGenerator {
VectorSRegister tmp_vsr2 = VSR2;
{ // FasterArrayCopy
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_6);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_6);
__ sldi(R5_ARG3, R5_ARG3, 2);
__ add(R3_ARG1, R3_ARG1, R5_ARG3);
@@ -1567,11 +1574,11 @@ class StubGenerator: public StubCodeGenerator {
__ xorr(tmp1, R3_ARG1, R4_ARG2);
__ andi_(R0, tmp1, 7);
// Not the same alignment, but ld and std just need to be 4 byte aligned.
- __ bne(CCR0, l_7); // to OR from is 8 byte aligned -> copy 2 at a time
+ __ bne(CR0, l_7); // to OR from is 8 byte aligned -> copy 2 at a time
// copy 1 element to align to and from on an 8 byte boundary
__ andi_(R0, R3_ARG1, 7);
- __ beq(CCR0, l_7);
+ __ beq(CR0, l_7);
__ addi(R3_ARG1, R3_ARG1, -4);
__ addi(R4_ARG2, R4_ARG2, -4);
@@ -1581,8 +1588,8 @@ class StubGenerator: public StubCodeGenerator {
__ bind(l_7);
}
- __ cmpwi(CCR0, R5_ARG3, 7);
- __ ble(CCR0, l_5); // copy 1 at a time if less than 8 elements remain
+ __ cmpwi(CR0, R5_ARG3, 7);
+ __ ble(CR0, l_5); // copy 1 at a time if less than 8 elements remain
__ srdi(tmp1, R5_ARG3, 3);
__ andi(R5_ARG3, R5_ARG3, 7);
@@ -1639,8 +1646,8 @@ class StubGenerator: public StubCodeGenerator {
}
}
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_6);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_6);
__ bind(l_5);
__ mtctr(R5_ARG3);
@@ -1663,8 +1670,20 @@ class StubGenerator: public StubCodeGenerator {
// to: R4_ARG2
// count: R5_ARG3 treated as signed
//
- address generate_conjoint_int_copy(bool aligned, const char * name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_conjoint_int_copy(StubGenStubId stub_id) {
+ bool aligned;
+ switch (stub_id) {
+ case jint_arraycopy_id:
+ aligned = false;
+ break;
+ case arrayof_jint_arraycopy_id:
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
address nooverlap_target = aligned ?
@@ -1705,8 +1724,8 @@ class StubGenerator: public StubCodeGenerator {
VectorSRegister tmp_vsr2 = VSR2;
{ // FasterArrayCopy
- __ cmpwi(CCR0, R5_ARG3, 3);
- __ ble(CCR0, l_3); // copy 1 at a time if less than 4 elements remain
+ __ cmpwi(CR0, R5_ARG3, 3);
+ __ ble(CR0, l_3); // copy 1 at a time if less than 4 elements remain
__ srdi(tmp1, R5_ARG3, 2);
__ andi_(R5_ARG3, R5_ARG3, 3);
@@ -1769,8 +1788,8 @@ class StubGenerator: public StubCodeGenerator {
// copy 1 element at a time
__ bind(l_3);
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_1);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_1);
{ // FasterArrayCopy
__ mtctr(R5_ARG3);
@@ -1794,8 +1813,20 @@ class StubGenerator: public StubCodeGenerator {
// to: R4_ARG2
// count: R5_ARG3 treated as signed
//
- address generate_disjoint_long_copy(bool aligned, const char * name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_disjoint_long_copy(StubGenStubId stub_id) {
+ bool aligned;
+ switch (stub_id) {
+ case jlong_disjoint_arraycopy_id:
+ aligned = false;
+ break;
+ case arrayof_jlong_disjoint_arraycopy_id:
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
{
@@ -1829,8 +1860,8 @@ class StubGenerator: public StubCodeGenerator {
Label l_1, l_2, l_3, l_4, l_5;
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_1);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_1);
{ // FasterArrayCopy
__ sldi(R5_ARG3, R5_ARG3, 3);
@@ -1838,8 +1869,8 @@ class StubGenerator: public StubCodeGenerator {
__ add(R4_ARG2, R4_ARG2, R5_ARG3);
__ srdi(R5_ARG3, R5_ARG3, 3);
- __ cmpwi(CCR0, R5_ARG3, 3);
- __ ble(CCR0, l_5); // copy 1 at a time if less than 4 elements remain
+ __ cmpwi(CR0, R5_ARG3, 3);
+ __ ble(CR0, l_5); // copy 1 at a time if less than 4 elements remain
__ srdi(tmp1, R5_ARG3, 2);
__ andi(R5_ARG3, R5_ARG3, 3);
@@ -1896,8 +1927,8 @@ class StubGenerator: public StubCodeGenerator {
}
}
- __ cmpwi(CCR0, R5_ARG3, 0);
- __ beq(CCR0, l_1);
+ __ cmpwi(CR0, R5_ARG3, 0);
+ __ beq(CR0, l_1);
__ bind(l_5);
__ mtctr(R5_ARG3);
@@ -1920,8 +1951,20 @@ class StubGenerator: public StubCodeGenerator {
// to: R4_ARG2
// count: R5_ARG3 treated as signed
//
- address generate_conjoint_long_copy(bool aligned, const char * name) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_conjoint_long_copy(StubGenStubId stub_id) {
+ bool aligned;
+ switch (stub_id) {
+ case jlong_arraycopy_id:
+ aligned = false;
+ break;
+ case arrayof_jlong_arraycopy_id:
+ aligned = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
address nooverlap_target = aligned ?
@@ -1949,9 +1992,31 @@ class StubGenerator: public StubCodeGenerator {
// count: R5_ARG3 treated as signed
// dest_uninitialized: G1 support
//
- address generate_conjoint_oop_copy(bool aligned, const char * name, bool dest_uninitialized) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_conjoint_oop_copy(StubGenStubId stub_id) {
+ bool aligned;
+ bool dest_uninitialized;
+ switch (stub_id) {
+ case oop_arraycopy_id:
+ aligned = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_oop_arraycopy_id:
+ aligned = true;
+ dest_uninitialized = false;
+ break;
+ case oop_arraycopy_uninit_id:
+ aligned = false;
+ dest_uninitialized = true;
+ break;
+ case arrayof_oop_arraycopy_uninit_id:
+ aligned = true;
+ dest_uninitialized = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
address nooverlap_target = aligned ?
@@ -1998,8 +2063,31 @@ class StubGenerator: public StubCodeGenerator {
// count: R5_ARG3 treated as signed
// dest_uninitialized: G1 support
//
- address generate_disjoint_oop_copy(bool aligned, const char * name, bool dest_uninitialized) {
- StubCodeMark mark(this, "StubRoutines", name);
+ address generate_disjoint_oop_copy(StubGenStubId stub_id) {
+ bool aligned;
+ bool dest_uninitialized;
+ switch (stub_id) {
+ case oop_disjoint_arraycopy_id:
+ aligned = false;
+ dest_uninitialized = false;
+ break;
+ case arrayof_oop_disjoint_arraycopy_id:
+ aligned = true;
+ dest_uninitialized = false;
+ break;
+ case oop_disjoint_arraycopy_uninit_id:
+ aligned = false;
+ dest_uninitialized = true;
+ break;
+ case arrayof_oop_disjoint_arraycopy_uninit_id:
+ aligned = true;
+ dest_uninitialized = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
assert_positive_int(R5_ARG3);
@@ -2039,7 +2127,8 @@ class StubGenerator: public StubCodeGenerator {
void generate_type_check(Register sub_klass,
Register super_check_offset,
Register super_klass,
- Register temp,
+ Register temp1,
+ Register temp2,
Label& L_success) {
assert_different_registers(sub_klass, super_check_offset, super_klass);
@@ -2047,9 +2136,9 @@ class StubGenerator: public StubCodeGenerator {
Label L_miss;
- __ check_klass_subtype_fast_path(sub_klass, super_klass, temp, R0, &L_success, &L_miss, nullptr,
+ __ check_klass_subtype_fast_path(sub_klass, super_klass, temp1, temp2, &L_success, &L_miss, nullptr,
super_check_offset);
- __ check_klass_subtype_slow_path(sub_klass, super_klass, temp, R0, &L_success);
+ __ check_klass_subtype_slow_path(sub_klass, super_klass, temp1, temp2, &L_success);
// Fall through on failure!
__ bind(L_miss);
@@ -2066,8 +2155,7 @@ class StubGenerator: public StubCodeGenerator {
// ckval: R7 (super_klass)
// ret: R3 zero for success; (-1^K) where K is partial transfer count
//
- address generate_checkcast_copy(const char *name, bool dest_uninitialized) {
-
+ address generate_checkcast_copy(StubGenStubId stub_id) {
const Register R3_from = R3_ARG1; // source array address
const Register R4_to = R4_ARG2; // destination array address
const Register R5_count = R5_ARG3; // elements count
@@ -2079,11 +2167,21 @@ class StubGenerator: public StubCodeGenerator {
const Register R10_oop = R10_ARG8; // actual oop copied
const Register R11_klass = R11_scratch1; // oop._klass
const Register R12_tmp = R12_scratch2;
+ const Register R2_tmp = R2;
- const Register R2_minus1 = R2;
-
+ bool dest_uninitialized;
+ switch (stub_id) {
+ case checkcast_arraycopy_id:
+ dest_uninitialized = false;
+ break;
+ case checkcast_arraycopy_uninit_id:
+ dest_uninitialized = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
//__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
// Assert that int is 64 bit sign extended and arrays are not conjoint.
@@ -2094,12 +2192,12 @@ class StubGenerator: public StubCodeGenerator {
Label no_overlap;
__ subf(tmp1, R3_ARG1, R4_ARG2); // distance in bytes
__ sldi(tmp2, R5_ARG3, LogBytesPerHeapOop); // size in bytes
- __ cmpld(CCR0, R3_ARG1, R4_ARG2); // Use unsigned comparison!
- __ cmpld(CCR1, tmp1, tmp2);
- __ crnand(CCR0, Assembler::less, CCR1, Assembler::less);
+ __ cmpld(CR0, R3_ARG1, R4_ARG2); // Use unsigned comparison!
+ __ cmpld(CR1, tmp1, tmp2);
+ __ crnand(CR0, Assembler::less, CR1, Assembler::less);
// Overlaps if Src before dst and distance smaller than size.
// Branch to forward copy routine otherwise.
- __ blt(CCR0, no_overlap);
+ __ blt(CR0, no_overlap);
__ stop("overlap in checkcast_copy");
__ bind(no_overlap);
}
@@ -2118,8 +2216,7 @@ class StubGenerator: public StubCodeGenerator {
Label load_element, store_element, store_null, success, do_epilogue;
__ or_(R9_remain, R5_count, R5_count); // Initialize loop index, and test it.
__ li(R8_offset, 0); // Offset from start of arrays.
- __ li(R2_minus1, -1);
- __ bne(CCR0, load_element);
+ __ bne(CR0, load_element);
// Empty array: Nothing to do.
__ li(R3_RET, 0); // Return 0 on (trivial) success.
@@ -2146,8 +2243,8 @@ class StubGenerator: public StubCodeGenerator {
}
__ addi(R8_offset, R8_offset, heapOopSize); // Step to next offset.
- __ add_(R9_remain, R2_minus1, R9_remain); // Decrement the count.
- __ beq(CCR0, success);
+ __ addic_(R9_remain, R9_remain, -1); // Decrement the count.
+ __ beq(CR0, success);
// ======== loop entry is here ========
__ bind(load_element);
@@ -2166,7 +2263,7 @@ class StubGenerator: public StubCodeGenerator {
__ load_klass(R11_klass, R10_oop); // Query the object klass.
- generate_type_check(R11_klass, R6_ckoff, R7_ckval, R12_tmp,
+ generate_type_check(R11_klass, R6_ckoff, R7_ckval, R12_tmp, R2_tmp,
// Branch to this on success:
store_element);
// ======== end loop ========
@@ -2177,7 +2274,7 @@ class StubGenerator: public StubCodeGenerator {
// and report their number to the caller.
__ subf_(R5_count, R9_remain, R5_count);
__ nand(R3_RET, R5_count, R5_count); // report (-1^K) to caller
- __ bne(CCR0, do_epilogue);
+ __ bne(CR0, do_epilogue);
__ blr();
__ bind(success);
@@ -2203,8 +2300,7 @@ class StubGenerator: public StubCodeGenerator {
// Examines the alignment of the operands and dispatches
// to a long, int, short, or byte copy loop.
//
- address generate_unsafe_copy(const char* name,
- address byte_copy_entry,
+ address generate_unsafe_copy(address byte_copy_entry,
address short_copy_entry,
address int_copy_entry,
address long_copy_entry) {
@@ -2217,7 +2313,8 @@ class StubGenerator: public StubCodeGenerator {
const Register R7_tmp = R7_ARG5;
//__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubGenStubId stub_id = StubGenStubId::unsafe_arraycopy_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
// Bump this on entry, not on exit:
@@ -2228,13 +2325,13 @@ class StubGenerator: public StubCodeGenerator {
__ orr(R6_bits, R3_from, R4_to);
__ orr(R6_bits, R6_bits, R5_count);
__ andi_(R0, R6_bits, (BytesPerLong-1));
- __ beq(CCR0, long_copy);
+ __ beq(CR0, long_copy);
__ andi_(R0, R6_bits, (BytesPerInt-1));
- __ beq(CCR0, int_copy);
+ __ beq(CR0, int_copy);
__ andi_(R0, R6_bits, (BytesPerShort-1));
- __ beq(CCR0, short_copy);
+ __ beq(CR0, short_copy);
// byte_copy:
__ b(byte_copy_entry);
@@ -2273,14 +2370,14 @@ class StubGenerator: public StubCodeGenerator {
// if (src_pos + length > arrayOop(src)->length() ) FAIL;
__ lwa(array_length, arrayOopDesc::length_offset_in_bytes(), src);
__ add(end_pos, src_pos, length); // src_pos + length
- __ cmpd(CCR0, end_pos, array_length);
- __ bgt(CCR0, L_failed);
+ __ cmpd(CR0, end_pos, array_length);
+ __ bgt(CR0, L_failed);
// if (dst_pos + length > arrayOop(dst)->length() ) FAIL;
__ lwa(array_length, arrayOopDesc::length_offset_in_bytes(), dst);
__ add(end_pos, dst_pos, length); // src_pos + length
- __ cmpd(CCR0, end_pos, array_length);
- __ bgt(CCR0, L_failed);
+ __ cmpd(CR0, end_pos, array_length);
+ __ bgt(CR0, L_failed);
BLOCK_COMMENT("arraycopy_range_checks done");
}
@@ -2300,8 +2397,7 @@ class StubGenerator: public StubCodeGenerator {
// R3 == 0 - success
// R3 == -1 - need to call System.arraycopy
//
- address generate_generic_copy(const char *name,
- address entry_jbyte_arraycopy,
+ address generate_generic_copy(address entry_jbyte_arraycopy,
address entry_jshort_arraycopy,
address entry_jint_arraycopy,
address entry_oop_arraycopy,
@@ -2324,7 +2420,8 @@ class StubGenerator: public StubCodeGenerator {
const Register temp = R2;
//__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", name);
+ StubGenStubId stub_id = StubGenStubId::generic_arraycopy_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
// Bump this on entry, not on exit:
@@ -2346,16 +2443,16 @@ class StubGenerator: public StubCodeGenerator {
// (8) dst_pos + length must not exceed length of dst.
BLOCK_COMMENT("arraycopy initial argument checks");
- __ cmpdi(CCR1, src, 0); // if (src == nullptr) return -1;
+ __ cmpdi(CR1, src, 0); // if (src == nullptr) return -1;
__ extsw_(src_pos, src_pos); // if (src_pos < 0) return -1;
- __ cmpdi(CCR5, dst, 0); // if (dst == nullptr) return -1;
- __ cror(CCR1, Assembler::equal, CCR0, Assembler::less);
+ __ cmpdi(CR5, dst, 0); // if (dst == nullptr) return -1;
+ __ cror(CR1, Assembler::equal, CR0, Assembler::less);
__ extsw_(dst_pos, dst_pos); // if (src_pos < 0) return -1;
- __ cror(CCR5, Assembler::equal, CCR0, Assembler::less);
+ __ cror(CR5, Assembler::equal, CR0, Assembler::less);
__ extsw_(length, length); // if (length < 0) return -1;
- __ cror(CCR1, Assembler::equal, CCR5, Assembler::equal);
- __ cror(CCR1, Assembler::equal, CCR0, Assembler::less);
- __ beq(CCR1, L_failed);
+ __ cror(CR1, Assembler::equal, CR5, Assembler::equal);
+ __ cror(CR1, Assembler::equal, CR0, Assembler::less);
+ __ beq(CR1, L_failed);
BLOCK_COMMENT("arraycopy argument klass checks");
__ load_klass(src_klass, src);
@@ -2377,22 +2474,22 @@ class StubGenerator: public StubCodeGenerator {
// Handle objArrays completely differently...
jint objArray_lh = Klass::array_layout_helper(T_OBJECT);
__ load_const_optimized(temp, objArray_lh, R0);
- __ cmpw(CCR0, lh, temp);
- __ beq(CCR0, L_objArray);
+ __ cmpw(CR0, lh, temp);
+ __ beq(CR0, L_objArray);
- __ cmpd(CCR5, src_klass, dst_klass); // if (src->klass() != dst->klass()) return -1;
- __ cmpwi(CCR6, lh, Klass::_lh_neutral_value); // if (!src->is_Array()) return -1;
+ __ cmpd(CR5, src_klass, dst_klass); // if (src->klass() != dst->klass()) return -1;
+ __ cmpwi(CR6, lh, Klass::_lh_neutral_value); // if (!src->is_Array()) return -1;
- __ crnand(CCR5, Assembler::equal, CCR6, Assembler::less);
- __ beq(CCR5, L_failed);
+ __ crnand(CR5, Assembler::equal, CR6, Assembler::less);
+ __ beq(CR5, L_failed);
// At this point, it is known to be a typeArray (array_tag 0x3).
#ifdef ASSERT
{ Label L;
jint lh_prim_tag_in_place = (Klass::_lh_array_tag_type_value << Klass::_lh_array_tag_shift);
__ load_const_optimized(temp, lh_prim_tag_in_place, R0);
- __ cmpw(CCR0, lh, temp);
- __ bge(CCR0, L);
+ __ cmpw(CR0, lh, temp);
+ __ bge(CR0, L);
__ stop("must be a primitive array");
__ bind(L);
}
@@ -2432,17 +2529,17 @@ class StubGenerator: public StubCodeGenerator {
BLOCK_COMMENT("choose copy loop based on element size");
// Using conditional branches with range 32kB.
- const int bo = Assembler::bcondCRbiIs1, bi = Assembler::bi0(CCR0, Assembler::equal);
- __ cmpwi(CCR0, elsize, 0);
+ const int bo = Assembler::bcondCRbiIs1, bi = Assembler::bi0(CR0, Assembler::equal);
+ __ cmpwi(CR0, elsize, 0);
__ bc(bo, bi, entry_jbyte_arraycopy);
- __ cmpwi(CCR0, elsize, LogBytesPerShort);
+ __ cmpwi(CR0, elsize, LogBytesPerShort);
__ bc(bo, bi, entry_jshort_arraycopy);
- __ cmpwi(CCR0, elsize, LogBytesPerInt);
+ __ cmpwi(CR0, elsize, LogBytesPerInt);
__ bc(bo, bi, entry_jint_arraycopy);
#ifdef ASSERT
{ Label L;
- __ cmpwi(CCR0, elsize, LogBytesPerLong);
- __ beq(CCR0, L);
+ __ cmpwi(CR0, elsize, LogBytesPerLong);
+ __ beq(CR0, L);
__ stop("must be long copy, but elsize is wrong");
__ bind(L);
}
@@ -2455,8 +2552,8 @@ class StubGenerator: public StubCodeGenerator {
Label L_disjoint_plain_copy, L_checkcast_copy;
// test array classes for subtyping
- __ cmpd(CCR0, src_klass, dst_klass); // usual case is exact equality
- __ bne(CCR0, L_checkcast_copy);
+ __ cmpd(CR0, src_klass, dst_klass); // usual case is exact equality
+ __ bne(CR0, L_checkcast_copy);
// Identically typed arrays can be copied without element-wise checks.
arraycopy_range_checks(src, src_pos, dst, dst_pos, length,
@@ -2476,8 +2573,8 @@ class StubGenerator: public StubCodeGenerator {
{
// Before looking at dst.length, make sure dst is also an objArray.
__ lwz(temp, lh_offset, dst_klass);
- __ cmpw(CCR0, lh, temp);
- __ bne(CCR0, L_failed);
+ __ cmpw(CR0, lh, temp);
+ __ bne(CR0, L_failed);
// It is safe to examine both src.length and dst.length.
arraycopy_range_checks(src, src_pos, dst, dst_pos, length,
@@ -2500,7 +2597,7 @@ class StubGenerator: public StubCodeGenerator {
int sco_offset = in_bytes(Klass::super_check_offset_offset());
__ lwz(sco_temp, sco_offset, dst_klass);
generate_type_check(src_klass, sco_temp, dst_klass,
- temp, L_disjoint_plain_copy);
+ temp, /* temp */ R10_ARG8, L_disjoint_plain_copy);
// Fetch destination element klass from the ObjArrayKlass header.
int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
@@ -2526,7 +2623,8 @@ class StubGenerator: public StubCodeGenerator {
// R5_ARG3 - round key array
address generate_aescrypt_encryptBlock() {
assert(UseAES, "need AES instructions and misaligned SSE support");
- StubCodeMark mark(this, "StubRoutines", "aescrypt_encryptBlock");
+ StubGenStubId stub_id = StubGenStubId::aescrypt_encryptBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
@@ -2654,8 +2752,8 @@ class StubGenerator: public StubCodeGenerator {
__ vec_perm (vKey2, vTmp1, keyPerm);
// if all round keys are loaded, skip next 4 rounds
- __ cmpwi (CCR0, keylen, 44);
- __ beq (CCR0, L_doLast);
+ __ cmpwi (CR0, keylen, 44);
+ __ beq (CR0, L_doLast);
// 10th - 11th rounds
__ vcipher (vRet, vRet, vKey1);
@@ -2672,12 +2770,12 @@ class StubGenerator: public StubCodeGenerator {
__ vec_perm (vKey2, vTmp1, keyPerm);
// if all round keys are loaded, skip next 2 rounds
- __ cmpwi (CCR0, keylen, 52);
- __ beq (CCR0, L_doLast);
+ __ cmpwi (CR0, keylen, 52);
+ __ beq (CR0, L_doLast);
#ifdef ASSERT
- __ cmpwi (CCR0, keylen, 60);
- __ bne (CCR0, L_error);
+ __ cmpwi (CR0, keylen, 60);
+ __ bne (CR0, L_error);
#endif
// 12th - 13th rounds
@@ -2733,7 +2831,8 @@ class StubGenerator: public StubCodeGenerator {
// R5_ARG3 - K (key) in little endian int array
address generate_aescrypt_decryptBlock() {
assert(UseAES, "need AES instructions and misaligned SSE support");
- StubCodeMark mark(this, "StubRoutines", "aescrypt_decryptBlock");
+ StubGenStubId stub_id = StubGenStubId::aescrypt_decryptBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
@@ -2791,15 +2890,15 @@ class StubGenerator: public StubCodeGenerator {
__ vsldoi (keyPerm, keyPerm, keyPerm, 8);
#endif
- __ cmpwi (CCR0, keylen, 44);
- __ beq (CCR0, L_do44);
+ __ cmpwi (CR0, keylen, 44);
+ __ beq (CR0, L_do44);
- __ cmpwi (CCR0, keylen, 52);
- __ beq (CCR0, L_do52);
+ __ cmpwi (CR0, keylen, 52);
+ __ beq (CR0, L_do52);
#ifdef ASSERT
- __ cmpwi (CCR0, keylen, 60);
- __ bne (CCR0, L_error);
+ __ cmpwi (CR0, keylen, 60);
+ __ bne (CR0, L_error);
#endif
// load the 15th round key to vKey1
@@ -2970,9 +3069,20 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
- address generate_sha256_implCompress(bool multi_block, const char *name) {
+ address generate_sha256_implCompress(StubGenStubId stub_id) {
assert(UseSHA, "need SHA instructions");
- StubCodeMark mark(this, "StubRoutines", name);
+ bool multi_block;
+ switch (stub_id) {
+ case sha256_implCompress_id:
+ multi_block = false;
+ break;
+ case sha256_implCompressMB_id:
+ multi_block = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
__ sha256 (multi_block);
@@ -2981,9 +3091,20 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
- address generate_sha512_implCompress(bool multi_block, const char *name) {
+ address generate_sha512_implCompress(StubGenStubId stub_id) {
assert(UseSHA, "need SHA instructions");
- StubCodeMark mark(this, "StubRoutines", name);
+ bool multi_block;
+ switch (stub_id) {
+ case sha512_implCompress_id:
+ multi_block = false;
+ break;
+ case sha512_implCompressMB_id:
+ multi_block = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
__ sha512 (multi_block);
@@ -2994,7 +3115,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_data_cache_writeback() {
const Register cacheline = R3_ARG1;
- StubCodeMark mark(this, "StubRoutines", "_data_cache_writeback");
+ StubGenStubId stub_id = StubGenStubId::data_cache_writeback_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ cache_wb(Address(cacheline));
@@ -3007,12 +3129,12 @@ class StubGenerator: public StubCodeGenerator {
const Register is_presync = R3_ARG1;
Register temp = R4;
Label SKIP;
-
- StubCodeMark mark(this, "StubRoutines", "_data_cache_writeback_sync");
+ StubGenStubId stub_id = StubGenStubId::data_cache_writeback_sync_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ andi_(temp, is_presync, 1);
- __ bne(CCR0, SKIP);
+ __ bne(CR0, SKIP);
__ cache_wbsync(false); // post sync => emit 'sync'
__ bind(SKIP); // pre sync => emit nothing
__ blr();
@@ -3028,48 +3150,46 @@ class StubGenerator: public StubCodeGenerator {
UnsafeMemoryAccess::set_common_exit_stub_pc(ucm_common_error_exit);
// non-aligned disjoint versions
- StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(false, "jbyte_disjoint_arraycopy");
- StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_short_copy(false, "jshort_disjoint_arraycopy");
- StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_int_copy(false, "jint_disjoint_arraycopy");
- StubRoutines::_jlong_disjoint_arraycopy = generate_disjoint_long_copy(false, "jlong_disjoint_arraycopy");
- StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_oop_copy(false, "oop_disjoint_arraycopy", false);
- StubRoutines::_oop_disjoint_arraycopy_uninit = generate_disjoint_oop_copy(false, "oop_disjoint_arraycopy_uninit", true);
+ StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(StubGenStubId::jbyte_disjoint_arraycopy_id);
+ StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_short_copy(StubGenStubId::jshort_disjoint_arraycopy_id);
+ StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_int_copy(StubGenStubId::jint_disjoint_arraycopy_id);
+ StubRoutines::_jlong_disjoint_arraycopy = generate_disjoint_long_copy(StubGenStubId::jlong_disjoint_arraycopy_id);
+ StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_oop_copy(StubGenStubId::oop_disjoint_arraycopy_id);
+ StubRoutines::_oop_disjoint_arraycopy_uninit = generate_disjoint_oop_copy(StubGenStubId::oop_disjoint_arraycopy_uninit_id);
// aligned disjoint versions
- StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(true, "arrayof_jbyte_disjoint_arraycopy");
- StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_disjoint_short_copy(true, "arrayof_jshort_disjoint_arraycopy");
- StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_disjoint_int_copy(true, "arrayof_jint_disjoint_arraycopy");
- StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_disjoint_long_copy(true, "arrayof_jlong_disjoint_arraycopy");
- StubRoutines::_arrayof_oop_disjoint_arraycopy = generate_disjoint_oop_copy(true, "arrayof_oop_disjoint_arraycopy", false);
- StubRoutines::_arrayof_oop_disjoint_arraycopy_uninit = generate_disjoint_oop_copy(true, "oop_disjoint_arraycopy_uninit", true);
+ StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(StubGenStubId::arrayof_jbyte_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_disjoint_short_copy(StubGenStubId::arrayof_jshort_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_disjoint_int_copy(StubGenStubId::arrayof_jint_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_disjoint_long_copy(StubGenStubId::arrayof_jlong_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_oop_disjoint_arraycopy = generate_disjoint_oop_copy(StubGenStubId::arrayof_oop_disjoint_arraycopy_id);
+ StubRoutines::_arrayof_oop_disjoint_arraycopy_uninit = generate_disjoint_oop_copy(StubGenStubId::oop_disjoint_arraycopy_uninit_id);
// non-aligned conjoint versions
- StubRoutines::_jbyte_arraycopy = generate_conjoint_byte_copy(false, "jbyte_arraycopy");
- StubRoutines::_jshort_arraycopy = generate_conjoint_short_copy(false, "jshort_arraycopy");
- StubRoutines::_jint_arraycopy = generate_conjoint_int_copy(false, "jint_arraycopy");
- StubRoutines::_jlong_arraycopy = generate_conjoint_long_copy(false, "jlong_arraycopy");
- StubRoutines::_oop_arraycopy = generate_conjoint_oop_copy(false, "oop_arraycopy", false);
- StubRoutines::_oop_arraycopy_uninit = generate_conjoint_oop_copy(false, "oop_arraycopy_uninit", true);
+ StubRoutines::_jbyte_arraycopy = generate_conjoint_byte_copy(StubGenStubId::jbyte_arraycopy_id);
+ StubRoutines::_jshort_arraycopy = generate_conjoint_short_copy(StubGenStubId::jshort_arraycopy_id);
+ StubRoutines::_jint_arraycopy = generate_conjoint_int_copy(StubGenStubId::jint_arraycopy_id);
+ StubRoutines::_jlong_arraycopy = generate_conjoint_long_copy(StubGenStubId::jlong_arraycopy_id);
+ StubRoutines::_oop_arraycopy = generate_conjoint_oop_copy(StubGenStubId::oop_arraycopy_id);
+ StubRoutines::_oop_arraycopy_uninit = generate_conjoint_oop_copy(StubGenStubId::oop_arraycopy_uninit_id);
// aligned conjoint versions
- StubRoutines::_arrayof_jbyte_arraycopy = generate_conjoint_byte_copy(true, "arrayof_jbyte_arraycopy");
- StubRoutines::_arrayof_jshort_arraycopy = generate_conjoint_short_copy(true, "arrayof_jshort_arraycopy");
- StubRoutines::_arrayof_jint_arraycopy = generate_conjoint_int_copy(true, "arrayof_jint_arraycopy");
- StubRoutines::_arrayof_jlong_arraycopy = generate_conjoint_long_copy(true, "arrayof_jlong_arraycopy");
- StubRoutines::_arrayof_oop_arraycopy = generate_conjoint_oop_copy(true, "arrayof_oop_arraycopy", false);
- StubRoutines::_arrayof_oop_arraycopy_uninit = generate_conjoint_oop_copy(true, "arrayof_oop_arraycopy", true);
+ StubRoutines::_arrayof_jbyte_arraycopy = generate_conjoint_byte_copy(StubGenStubId::arrayof_jbyte_arraycopy_id);
+ StubRoutines::_arrayof_jshort_arraycopy = generate_conjoint_short_copy(StubGenStubId::arrayof_jshort_arraycopy_id);
+ StubRoutines::_arrayof_jint_arraycopy = generate_conjoint_int_copy(StubGenStubId::arrayof_jint_arraycopy_id);
+ StubRoutines::_arrayof_jlong_arraycopy = generate_conjoint_long_copy(StubGenStubId::arrayof_jlong_arraycopy_id);
+ StubRoutines::_arrayof_oop_arraycopy = generate_conjoint_oop_copy(StubGenStubId::arrayof_oop_arraycopy_id);
+ StubRoutines::_arrayof_oop_arraycopy_uninit = generate_conjoint_oop_copy(StubGenStubId::arrayof_oop_arraycopy_id);
// special/generic versions
- StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy", false);
- StubRoutines::_checkcast_arraycopy_uninit = generate_checkcast_copy("checkcast_arraycopy_uninit", true);
+ StubRoutines::_checkcast_arraycopy = generate_checkcast_copy(StubGenStubId::checkcast_arraycopy_id);
+ StubRoutines::_checkcast_arraycopy_uninit = generate_checkcast_copy(StubGenStubId::checkcast_arraycopy_uninit_id);
- StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy",
- STUB_ENTRY(jbyte_arraycopy()),
+ StubRoutines::_unsafe_arraycopy = generate_unsafe_copy(STUB_ENTRY(jbyte_arraycopy()),
STUB_ENTRY(jshort_arraycopy()),
STUB_ENTRY(jint_arraycopy()),
STUB_ENTRY(jlong_arraycopy()));
- StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy",
- STUB_ENTRY(jbyte_arraycopy()),
+ StubRoutines::_generic_arraycopy = generate_generic_copy(STUB_ENTRY(jbyte_arraycopy()),
STUB_ENTRY(jshort_arraycopy()),
STUB_ENTRY(jint_arraycopy()),
STUB_ENTRY(oop_arraycopy()),
@@ -3080,12 +3200,12 @@ class StubGenerator: public StubCodeGenerator {
// fill routines
#ifdef COMPILER2
if (OptimizeFill) {
- StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");
- StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill");
- StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill");
- StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill");
- StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill");
- StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
+ StubRoutines::_jbyte_fill = generate_fill(StubGenStubId::jbyte_fill_id);
+ StubRoutines::_jshort_fill = generate_fill(StubGenStubId::jshort_fill_id);
+ StubRoutines::_jint_fill = generate_fill(StubGenStubId::jint_fill_id);
+ StubRoutines::_arrayof_jbyte_fill = generate_fill(StubGenStubId::arrayof_jbyte_fill_id);
+ StubRoutines::_arrayof_jshort_fill = generate_fill(StubGenStubId::arrayof_jshort_fill_id);
+ StubRoutines::_arrayof_jint_fill = generate_fill(StubGenStubId::arrayof_jint_fill_id);
}
#endif
}
@@ -3103,7 +3223,8 @@ class StubGenerator: public StubCodeGenerator {
//
address generate_multiplyToLen() {
- StubCodeMark mark(this, "StubRoutines", "multiplyToLen");
+ StubGenStubId stub_id = StubGenStubId::multiplyToLen_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
@@ -3179,7 +3300,8 @@ class StubGenerator: public StubCodeGenerator {
*/
address generate_mulAdd() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "mulAdd");
+ StubGenStubId stub_id = StubGenStubId::mulAdd_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
@@ -3209,7 +3331,8 @@ class StubGenerator: public StubCodeGenerator {
*/
address generate_squareToLen() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "squareToLen");
+ StubGenStubId stub_id = StubGenStubId::squareToLen_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
@@ -3269,10 +3392,10 @@ class StubGenerator: public StubCodeGenerator {
// Store the squares, right shifted one bit (i.e., divided by 2)
__ subi (out_aux, out, 8);
__ subi (in_aux, in, 4);
- __ cmpwi (CCR0, in_len, 0);
+ __ cmpwi (CR0, in_len, 0);
// Initialize lplw outside of the loop
__ xorr (lplw, lplw, lplw);
- __ ble (CCR0, SKIP_LOOP_SQUARE); // in_len <= 0
+ __ ble (CR0, SKIP_LOOP_SQUARE); // in_len <= 0
__ mtctr (in_len);
__ bind(LOOP_SQUARE);
@@ -3295,8 +3418,8 @@ class StubGenerator: public StubCodeGenerator {
__ bind(SKIP_LOOP_SQUARE);
// Add in off-diagonal sums
- __ cmpwi (CCR0, in_len, 0);
- __ ble (CCR0, SKIP_DIAGONAL_SUM);
+ __ cmpwi (CR0, in_len, 0);
+ __ ble (CR0, SKIP_DIAGONAL_SUM);
// Avoid CTR usage here in order to use it at mulAdd
__ subi (i_minus1, in_len, 1);
__ li (offset, 4);
@@ -3327,25 +3450,25 @@ class StubGenerator: public StubCodeGenerator {
// if (((uint64_t)s >> 32) != 0) {
__ srdi_ (a, b, 32);
- __ beq (CCR0, SKIP_ADDONE);
+ __ beq (CR0, SKIP_ADDONE);
// while (--mlen >= 0) {
__ bind(LOOP_ADDONE);
__ subi (mlen, mlen, 4);
- __ cmpwi (CCR0, mlen, 0);
- __ beq (CCR0, SKIP_ADDONE);
+ __ cmpwi (CR0, mlen, 0);
+ __ beq (CR0, SKIP_ADDONE);
// if (--offset_aux < 0) { // Carry out of number
__ subi (off_aux, off_aux, 4);
- __ cmpwi (CCR0, off_aux, 0);
- __ blt (CCR0, SKIP_ADDONE);
+ __ cmpwi (CR0, off_aux, 0);
+ __ blt (CR0, SKIP_ADDONE);
// } else {
__ lwzx (b, off_aux, out);
__ addi (b, b, 1);
__ stwx (b, off_aux, out);
- __ cmpwi (CCR0, b, 0);
- __ bne (CCR0, SKIP_ADDONE);
+ __ cmpwi (CR0, b, 0);
+ __ bne (CR0, SKIP_ADDONE);
__ b (LOOP_ADDONE);
__ bind(SKIP_ADDONE);
@@ -3353,16 +3476,16 @@ class StubGenerator: public StubCodeGenerator {
__ addi (offset, offset, 8);
__ subi (i_minus1, i_minus1, 1);
- __ cmpwi (CCR0, i_minus1, 0);
- __ bge (CCR0, LOOP_DIAGONAL_SUM);
+ __ cmpwi (CR0, i_minus1, 0);
+ __ bge (CR0, LOOP_DIAGONAL_SUM);
__ bind(SKIP_DIAGONAL_SUM);
// Shift back up and set low bit
// Shifts 1 bit left up to len positions. Assumes no leading zeros
// begin
- __ cmpwi (CCR0, out_len, 0);
- __ ble (CCR0, SKIP_LSHIFT);
+ __ cmpwi (CR0, out_len, 0);
+ __ ble (CR0, SKIP_LSHIFT);
__ li (i, 0);
__ lwz (c, 0, out);
__ subi (b, out_len, 1);
@@ -3442,9 +3565,20 @@ class StubGenerator: public StubCodeGenerator {
* R3_RET - int crc result
*/
// Compute CRC32 function.
- address generate_CRC32_updateBytes(bool is_crc32c) {
+ address generate_CRC32_updateBytes(StubGenStubId stub_id) {
+ bool is_crc32c;
+ switch (stub_id) {
+ case updateBytesCRC32_id:
+ is_crc32c = false;
+ break;
+ case updateBytesCRC32C_id:
+ is_crc32c = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", is_crc32c ? "CRC32C_updateBytes" : "CRC32_updateBytes");
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry(); // Remember stub start address (is rtn value).
__ crc32(R3_ARG1, R4_ARG2, R5_ARG3, R2, R6, R7, R8, R9, R10, R11, R12, is_crc32c);
__ blr();
@@ -3471,7 +3605,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_method_entry_barrier() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "nmethod_entry_barrier");
+ StubGenStubId stub_id = StubGenStubId::method_entry_barrier_id;
+ StubCodeMark mark(this, stub_id);
address stub_address = __ pc();
@@ -3495,10 +3630,10 @@ class StubGenerator: public StubCodeGenerator {
__ restore_LR(R3_RET /* used as tmp register */);
__ restore_volatile_gprs(R1_SP, -nbytes_save, true);
- __ cmpdi(CCR0, R0, 0);
+ __ cmpdi(CR0, R0, 0);
// Return to prologue if no deoptimization is required (bnelr)
- __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CCR0, Assembler::equal), Assembler::bhintIsTaken);
+ __ bclr(Assembler::bcondCRbiIs1, Assembler::bi0(CR0, Assembler::equal), Assembler::bhintIsTaken);
// Deoptimization required.
// For actually handling the deoptimization, the 'wrong method stub' is invoked.
@@ -3568,7 +3703,8 @@ class StubGenerator: public StubCodeGenerator {
// Base64 decodeBlock intrinsic
address generate_base64_decodeBlock() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "base64_decodeBlock");
+ StubGenStubId stub_id = StubGenStubId::base64_decodeBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
typedef struct {
@@ -3779,7 +3915,7 @@ class StubGenerator: public StubCodeGenerator {
// = sl >> block_size_shift. After the shift, if sl <= 0, there's too
// little data to be processed by this intrinsic.
__ srawi_(sl, sl, block_size_shift);
- __ ble(CCR0, return_zero);
+ __ ble(CR0, return_zero);
__ mtctr(sl);
// Clear the other two parameter registers upper 32 bits.
@@ -3818,8 +3954,8 @@ class StubGenerator: public StubCodeGenerator {
// The rest of the constants use different values depending on the
// setting of isURL
- __ cmpwi(CCR0, isURL, 0);
- __ beq(CCR0, not_URL);
+ __ cmpwi(CR0, isURL, 0);
+ __ beq(CR0, not_URL);
// isURL != 0 (true)
if (PowerArchitecturePPC64 >= 10) {
@@ -3909,11 +4045,11 @@ class StubGenerator: public StubCodeGenerator {
//
__ vcmpequb_(non_match, non_match, vec_0s);
}
- // vmcmpequb_ sets the EQ bit of CCR6 if no elements compare equal.
+ // vmcmpequb_ sets the EQ bit of CR6 if no elements compare equal.
// Any element comparing equal to zero means there is an error in
// that element. Note that the comparison result register
- // non_match is not referenced again. Only CCR6-EQ matters.
- __ bne_predict_not_taken(CCR6, loop_exit);
+ // non_match is not referenced again. Only CR6-EQ matters.
+ __ bne_predict_not_taken(CR6, loop_exit);
// The Base64 characters had no errors, so add the offsets, which in
// the case of Power10 is a constant vector of all 0x80's (see earlier
@@ -4156,7 +4292,8 @@ class StubGenerator: public StubCodeGenerator {
address generate_base64_encodeBlock() {
__ align(CodeEntryAlignment);
- StubCodeMark mark(this, "StubRoutines", "base64_encodeBlock");
+ StubGenStubId stub_id = StubGenStubId::base64_encodeBlock_id;
+ StubCodeMark mark(this, stub_id);
address start = __ function_entry();
typedef struct {
@@ -4313,8 +4450,8 @@ class StubGenerator: public StubCodeGenerator {
// Use a different translation lookup table depending on the
// setting of isURL
- __ cmpdi(CCR0, isURL, 0);
- __ beq(CCR0, not_URL);
+ __ cmpdi(CR0, isURL, 0);
+ __ beq(CR0, not_URL);
__ lxv(vec_base64_48_63->to_vsr(), BLK_OFFSETOF(base64_48_63_URL_val), const_ptr);
__ b(calculate_size);
@@ -4331,8 +4468,8 @@ class StubGenerator: public StubCodeGenerator {
//
__ sub(size, sl, sp);
__ subi(size, size, 4);
- __ cmpdi(CCR7, size, block_size);
- __ bgt(CCR7, calculate_blocked_size);
+ __ cmpdi(CR7, size, block_size);
+ __ bgt(CR7, calculate_blocked_size);
__ mr(remaining, size);
// Add the 4 back into remaining again
__ addi(remaining, remaining, 4);
@@ -4390,8 +4527,8 @@ class StubGenerator: public StubCodeGenerator {
__ addi(bytes_to_write, bytes_to_write, 2);
__ divwu(bytes_to_write, bytes_to_write, three);
- __ cmpwi(CCR7, bytes_to_write, 16);
- __ ble_predict_taken(CCR7, le_16_to_write);
+ __ cmpwi(CR7, bytes_to_write, 16);
+ __ ble_predict_taken(CR7, le_16_to_write);
__ stxv(expanded->to_vsr(), 0, out);
// We've processed 12 of the 13-15 data bytes, so advance the pointers,
@@ -4412,7 +4549,7 @@ class StubGenerator: public StubCodeGenerator {
__ add(out, out, bytes_to_write);
__ li(pad_char, '=');
- __ rlwinm_(modulo_chars, bytes_to_write, 0, 30, 31); // bytes_to_write % 4, set CCR0
+ __ rlwinm_(modulo_chars, bytes_to_write, 0, 30, 31); // bytes_to_write % 4, set CR0
// Examples:
// remaining bytes_to_write modulo_chars num pad chars
// 0 0 0 0
@@ -4426,9 +4563,9 @@ class StubGenerator: public StubCodeGenerator {
// 13 18 2 2
// 14 19 3 1
// 15 20 0 0
- __ beq(CCR0, no_pad);
- __ cmpwi(CCR7, modulo_chars, 3);
- __ beq(CCR7, one_pad_char);
+ __ beq(CR0, no_pad);
+ __ cmpwi(CR7, modulo_chars, 3);
+ __ beq(CR7, one_pad_char);
// two pad chars
__ stb(pad_char, out);
@@ -4445,10 +4582,10 @@ class StubGenerator: public StubCodeGenerator {
#endif // VM_LITTLE_ENDIAN
-address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
- StubCodeMark mark(this, "StubRoutines", "lookup_secondary_supers_table");
+void generate_lookup_secondary_supers_table_stub() {
+ StubGenStubId stub_id = StubGenStubId::lookup_secondary_supers_table_id;
+ StubCodeMark mark(this, stub_id);
- address start = __ pc();
const Register
r_super_klass = R4_ARG2,
r_array_base = R3_ARG1,
@@ -4458,17 +4595,19 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
r_bitmap = R11_scratch1,
result = R8_ARG6;
- __ lookup_secondary_supers_table(r_sub_klass, r_super_klass,
- r_array_base, r_array_length, r_array_index,
- r_bitmap, result, super_klass_index);
- __ blr();
-
- return start;
+ for (int slot = 0; slot < Klass::SECONDARY_SUPERS_TABLE_SIZE; slot++) {
+ StubRoutines::_lookup_secondary_supers_table_stubs[slot] = __ pc();
+ __ lookup_secondary_supers_table_const(r_sub_klass, r_super_klass,
+ r_array_base, r_array_length, r_array_index,
+ r_bitmap, result, slot);
+ __ blr();
+ }
}
// Slow path implementation for UseSecondarySupersTable.
address generate_lookup_secondary_supers_table_slow_path_stub() {
- StubCodeMark mark(this, "StubRoutines", "lookup_secondary_supers_table_slow_path");
+ StubGenStubId stub_id = StubGenStubId::lookup_secondary_supers_table_slow_path_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
const Register
@@ -4485,13 +4624,33 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
return start;
}
- address generate_cont_thaw(const char* label, Continuation::thaw_kind kind) {
+ address generate_cont_thaw(StubGenStubId stub_id) {
if (!Continuations::enabled()) return nullptr;
- bool return_barrier = Continuation::is_thaw_return_barrier(kind);
- bool return_barrier_exception = Continuation::is_thaw_return_barrier_exception(kind);
+ Continuation::thaw_kind kind;
+ bool return_barrier;
+ bool return_barrier_exception;
- StubCodeMark mark(this, "StubRoutines", label);
+ switch (stub_id) {
+ case cont_thaw_id:
+ kind = Continuation::thaw_top;
+ return_barrier = false;
+ return_barrier_exception = false;
+ break;
+ case cont_returnBarrier_id:
+ kind = Continuation::thaw_return_barrier;
+ return_barrier = true;
+ return_barrier_exception = false;
+ break;
+ case cont_returnBarrierExc_id:
+ kind = Continuation::thaw_return_barrier_exception;
+ return_barrier = true;
+ return_barrier_exception = true;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ StubCodeMark mark(this, stub_id);
Register tmp1 = R10_ARG8;
Register tmp2 = R9_ARG7;
@@ -4511,13 +4670,13 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
__ ld_ptr(R1_SP, JavaThread::cont_entry_offset(), R16_thread);
#ifdef ASSERT
__ ld_ptr(tmp2, _abi0(callers_sp), R1_SP);
- __ cmpd(CCR0, tmp1, tmp2);
+ __ cmpd(CR0, tmp1, tmp2);
__ asm_assert_eq(FILE_AND_LINE ": callers sp is corrupt");
#endif
}
#ifdef ASSERT
__ ld_ptr(tmp1, JavaThread::cont_entry_offset(), R16_thread);
- __ cmpd(CCR0, R1_SP, tmp1);
+ __ cmpd(CR0, R1_SP, tmp1);
__ asm_assert_eq(FILE_AND_LINE ": incorrect R1_SP");
#endif
@@ -4526,14 +4685,14 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
#ifdef ASSERT
DEBUG_ONLY(__ ld_ptr(tmp1, JavaThread::cont_entry_offset(), R16_thread));
- DEBUG_ONLY(__ cmpd(CCR0, R1_SP, tmp1));
+ DEBUG_ONLY(__ cmpd(CR0, R1_SP, tmp1));
__ asm_assert_eq(FILE_AND_LINE ": incorrect R1_SP");
#endif
// R3_RET contains the size of the frames to thaw, 0 if overflow or no more frames
Label thaw_success;
- __ cmpdi(CCR0, R3_RET, 0);
- __ bne(CCR0, thaw_success);
+ __ cmpdi(CR0, R3_RET, 0);
+ __ bne(CR0, thaw_success);
__ load_const_optimized(tmp1, (SharedRuntime::throw_StackOverflowError_entry()), R0);
__ mtctr(tmp1); __ bctr();
__ bind(thaw_success);
@@ -4580,22 +4739,23 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
}
address generate_cont_thaw() {
- return generate_cont_thaw("Cont thaw", Continuation::thaw_top);
+ return generate_cont_thaw(StubGenStubId::cont_thaw_id);
}
// TODO: will probably need multiple return barriers depending on return type
address generate_cont_returnBarrier() {
- return generate_cont_thaw("Cont thaw return barrier", Continuation::thaw_return_barrier);
+ return generate_cont_thaw(StubGenStubId::cont_returnBarrier_id);
}
address generate_cont_returnBarrier_exception() {
- return generate_cont_thaw("Cont thaw return barrier exception", Continuation::thaw_return_barrier_exception);
+ return generate_cont_thaw(StubGenStubId::cont_returnBarrierExc_id);
}
address generate_cont_preempt_stub() {
if (!Continuations::enabled()) return nullptr;
- StubCodeMark mark(this, "StubRoutines","Continuation preempt stub");
+ StubGenStubId stub_id = StubGenStubId::cont_preempt_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ clobber_nonvolatile_registers(); // Except R16_thread and R29_TOC
@@ -4607,8 +4767,8 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
Label preemption_cancelled;
__ lbz(R11_scratch1, in_bytes(JavaThread::preemption_cancelled_offset()), R16_thread);
- __ cmpwi(CCR0, R11_scratch1, 0);
- __ bne(CCR0, preemption_cancelled);
+ __ cmpwi(CR0, R11_scratch1, 0);
+ __ bne(CR0, preemption_cancelled);
// Remove enterSpecial frame from the stack and return to Continuation.run() to unmount.
SharedRuntime::continuation_enter_cleanup(_masm);
@@ -4630,7 +4790,8 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
// exception handler for upcall stubs
address generate_upcall_stub_exception_handler() {
- StubCodeMark mark(this, "StubRoutines", "upcall stub exception handler");
+ StubGenStubId stub_id = StubGenStubId::upcall_stub_exception_handler_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
// Native caller has no idea how to handle exceptions,
@@ -4648,7 +4809,8 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
// R19_method = result Method*
address generate_upcall_stub_load_target() {
- StubCodeMark mark(this, "StubRoutines", "upcall_stub_load_target");
+ StubGenStubId stub_id = StubGenStubId::upcall_stub_load_target_id;
+ StubCodeMark mark(this, stub_id);
address start = __ pc();
__ resolve_global_jobject(R3_ARG1, R22_tmp2, R23_tmp3, MacroAssembler::PRESERVATION_FRAME_LR_GP_FP_REGS);
@@ -4688,13 +4850,13 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
// CRC32 Intrinsics.
if (UseCRC32Intrinsics) {
StubRoutines::_crc_table_adr = StubRoutines::ppc::generate_crc_constants(REVERSE_CRC32_POLY);
- StubRoutines::_updateBytesCRC32 = generate_CRC32_updateBytes(false);
+ StubRoutines::_updateBytesCRC32 = generate_CRC32_updateBytes(StubGenStubId::updateBytesCRC32_id);
}
// CRC32C Intrinsics.
if (UseCRC32CIntrinsics) {
StubRoutines::_crc32c_table_addr = StubRoutines::ppc::generate_crc_constants(REVERSE_CRC32C_POLY);
- StubRoutines::_updateBytesCRC32C = generate_CRC32_updateBytes(true);
+ StubRoutines::_updateBytesCRC32C = generate_CRC32_updateBytes(StubGenStubId::updateBytesCRC32C_id);
}
if (VM_Version::supports_float16()) {
@@ -4719,23 +4881,19 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
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) {
- for (int slot = 0; slot < Klass::SECONDARY_SUPERS_TABLE_SIZE; slot++) {
- StubRoutines::_lookup_secondary_supers_table_stubs[slot]
- = generate_lookup_secondary_supers_table_stub(slot);
- }
+ 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();
@@ -4776,12 +4934,12 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
}
if (UseSHA256Intrinsics) {
- StubRoutines::_sha256_implCompress = generate_sha256_implCompress(false, "sha256_implCompress");
- StubRoutines::_sha256_implCompressMB = generate_sha256_implCompress(true, "sha256_implCompressMB");
+ StubRoutines::_sha256_implCompress = generate_sha256_implCompress(StubGenStubId::sha256_implCompress_id);
+ StubRoutines::_sha256_implCompressMB = generate_sha256_implCompress(StubGenStubId::sha256_implCompressMB_id);
}
if (UseSHA512Intrinsics) {
- StubRoutines::_sha512_implCompress = generate_sha512_implCompress(false, "sha512_implCompress");
- StubRoutines::_sha512_implCompressMB = generate_sha512_implCompress(true, "sha512_implCompressMB");
+ StubRoutines::_sha512_implCompress = generate_sha512_implCompress(StubGenStubId::sha512_implCompress_id);
+ StubRoutines::_sha512_implCompressMB = generate_sha512_implCompress(StubGenStubId::sha512_implCompressMB_id);
}
#ifdef VM_LITTLE_ENDIAN
@@ -4795,27 +4953,28 @@ address generate_lookup_secondary_supers_table_stub(u1 super_klass_index) {
}
public:
- StubGenerator(CodeBuffer* code, StubsKind kind) : StubCodeGenerator(code) {
- switch(kind) {
- case Initial_stubs:
+ StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
+ switch(blob_id) {
+ case initial_id:
generate_initial_stubs();
break;
- case Continuation_stubs:
+ case continuation_id:
generate_continuation_stubs();
break;
- case Compiler_stubs:
+ case compiler_id:
generate_compiler_stubs();
break;
- case Final_stubs:
+ case final_id:
generate_final_stubs();
break;
default:
- fatal("unexpected stubs kind: %d", kind);
+ fatal("unexpected blob id: %d", blob_id);
break;
};
}
};
-void StubGenerator_generate(CodeBuffer* code, StubCodeGenerator::StubsKind kind) {
- StubGenerator g(code, kind);
+void StubGenerator_generate(CodeBuffer* code, StubGenBlobId blob_id) {
+ StubGenerator g(code, blob_id);
}
+
diff --git a/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp b/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp
index 4db0227e81b..a542d7947f8 100644
--- a/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp
+++ b/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -32,14 +32,17 @@
static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; }
+// emit enum used to size per-blob code buffers
+
+#define DEFINE_BLOB_SIZE(blob_name, size) \
+ _ ## blob_name ## _code_size = size,
+
enum platform_dependent_constants {
- // simply increase sizes if too small (assembler will crash if too small)
- _initial_stubs_code_size = 20000,
- _continuation_stubs_code_size = 2000,
- _compiler_stubs_code_size = 24000,
- _final_stubs_code_size = 24000
+ STUBGEN_ARCH_BLOBS_DO(DEFINE_BLOB_SIZE)
};
+#undef DEFINE_BLOB_SIZE
+
// CRC32 Intrinsics.
#define CRC32_TABLE_SIZE (4 * 256)
#define REVERSE_CRC32_POLY 0xEDB88320
diff --git a/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp b/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp
index 7df905b9068..60cca4efb57 100644
--- a/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/stubRoutines.hpp"
diff --git a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
index 9147dfc1677..b1ad3cd48bc 100644
--- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
+++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2015, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.hpp"
#include "compiler/disassembler.hpp"
@@ -144,12 +143,12 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
// TODO PPC port: requires change in shared code.
//assert(in_bytes(AccessFlags::flags_offset()) == 0,
// "MethodDesc._access_flags == MethodDesc._access_flags._flags");
- // _access_flags must be a 32 bit value.
- assert(sizeof(AccessFlags) == 4, "wrong size");
- __ lwa(R11_scratch1/*access_flags*/, method_(access_flags));
+ // _access_flags must be a 16 bit value.
+ assert(sizeof(AccessFlags) == 2, "wrong size");
+ __ lhz(R11_scratch1/*access_flags*/, method_(access_flags));
// testbit with condition register.
- __ testbitdi(CCR0, R0, R11_scratch1/*access_flags*/, JVM_ACC_STATIC_BIT);
- __ btrue(CCR0, L);
+ __ testbitdi(CR0, R0, R11_scratch1/*access_flags*/, JVM_ACC_STATIC_BIT);
+ __ btrue(CR0, L);
// For non-static functions, pass "this" in R4_ARG2 and copy it
// to 2nd C-arg slot.
// We need to box the Java object here, so we use arg_java
@@ -176,8 +175,8 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
// signature points to '(' at entry
#ifdef ASSERT
__ lbz(sig_byte, 0, signature);
- __ cmplwi(CCR0, sig_byte, '(');
- __ bne(CCR0, do_dontreachhere);
+ __ cmplwi(CR0, sig_byte, '(');
+ __ bne(CR0, do_dontreachhere);
#endif
__ bind(loop_start);
@@ -185,41 +184,41 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
__ addi(argcnt, argcnt, 1);
__ lbzu(sig_byte, 1, signature);
- __ cmplwi(CCR0, sig_byte, ')'); // end of signature
- __ beq(CCR0, loop_end);
+ __ cmplwi(CR0, sig_byte, ')'); // end of signature
+ __ beq(CR0, loop_end);
- __ cmplwi(CCR0, sig_byte, 'B'); // byte
- __ beq(CCR0, do_int);
+ __ cmplwi(CR0, sig_byte, 'B'); // byte
+ __ beq(CR0, do_int);
- __ cmplwi(CCR0, sig_byte, 'C'); // char
- __ beq(CCR0, do_int);
+ __ cmplwi(CR0, sig_byte, 'C'); // char
+ __ beq(CR0, do_int);
- __ cmplwi(CCR0, sig_byte, 'D'); // double
- __ beq(CCR0, do_double);
+ __ cmplwi(CR0, sig_byte, 'D'); // double
+ __ beq(CR0, do_double);
- __ cmplwi(CCR0, sig_byte, 'F'); // float
- __ beq(CCR0, do_float);
+ __ cmplwi(CR0, sig_byte, 'F'); // float
+ __ beq(CR0, do_float);
- __ cmplwi(CCR0, sig_byte, 'I'); // int
- __ beq(CCR0, do_int);
+ __ cmplwi(CR0, sig_byte, 'I'); // int
+ __ beq(CR0, do_int);
- __ cmplwi(CCR0, sig_byte, 'J'); // long
- __ beq(CCR0, do_long);
+ __ cmplwi(CR0, sig_byte, 'J'); // long
+ __ beq(CR0, do_long);
- __ cmplwi(CCR0, sig_byte, 'S'); // short
- __ beq(CCR0, do_int);
+ __ cmplwi(CR0, sig_byte, 'S'); // short
+ __ beq(CR0, do_int);
- __ cmplwi(CCR0, sig_byte, 'Z'); // boolean
- __ beq(CCR0, do_int);
+ __ cmplwi(CR0, sig_byte, 'Z'); // boolean
+ __ beq(CR0, do_int);
- __ cmplwi(CCR0, sig_byte, 'L'); // object
- __ beq(CCR0, do_object);
+ __ cmplwi(CR0, sig_byte, 'L'); // object
+ __ beq(CR0, do_object);
- __ cmplwi(CCR0, sig_byte, '['); // array
- __ beq(CCR0, do_array);
+ __ cmplwi(CR0, sig_byte, '['); // array
+ __ beq(CR0, do_array);
- // __ cmplwi(CCR0, sig_byte, 'V'); // void cannot appear since we do not parse the return type
- // __ beq(CCR0, do_void);
+ // __ cmplwi(CR0, sig_byte, 'V'); // void cannot appear since we do not parse the return type
+ // __ beq(CR0, do_void);
__ bind(do_dontreachhere);
@@ -232,16 +231,16 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
__ bind(start_skip);
__ lbzu(sig_byte, 1, signature);
- __ cmplwi(CCR0, sig_byte, '[');
- __ beq(CCR0, start_skip); // skip further brackets
- __ cmplwi(CCR0, sig_byte, '9');
- __ bgt(CCR0, end_skip); // no optional size
- __ cmplwi(CCR0, sig_byte, '0');
- __ bge(CCR0, start_skip); // skip optional size
+ __ cmplwi(CR0, sig_byte, '[');
+ __ beq(CR0, start_skip); // skip further brackets
+ __ cmplwi(CR0, sig_byte, '9');
+ __ bgt(CR0, end_skip); // no optional size
+ __ cmplwi(CR0, sig_byte, '0');
+ __ bge(CR0, start_skip); // skip optional size
__ bind(end_skip);
- __ cmplwi(CCR0, sig_byte, 'L');
- __ beq(CCR0, do_object); // for arrays of objects, the name of the object must be skipped
+ __ cmplwi(CR0, sig_byte, 'L');
+ __ beq(CR0, do_object); // for arrays of objects, the name of the object must be skipped
__ b(do_boxed); // otherwise, go directly to do_boxed
}
@@ -250,8 +249,8 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
Label L;
__ bind(L);
__ lbzu(sig_byte, 1, signature);
- __ cmplwi(CCR0, sig_byte, ';');
- __ bne(CCR0, L);
+ __ cmplwi(CR0, sig_byte, ';');
+ __ bne(CR0, L);
}
// Need to box the Java object here, so we use arg_java (address of
// current Java stack slot) as argument and don't dereference it as
@@ -259,16 +258,16 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
Label do_null;
__ bind(do_boxed);
__ ld(R0,0, arg_java);
- __ cmpdi(CCR0, R0, 0);
+ __ cmpdi(CR0, R0, 0);
__ li(intSlot,0);
- __ beq(CCR0, do_null);
+ __ beq(CR0, do_null);
__ mr(intSlot, arg_java);
__ bind(do_null);
__ std(intSlot, 0, arg_c);
__ addi(arg_java, arg_java, -BytesPerWord);
__ addi(arg_c, arg_c, BytesPerWord);
- __ cmplwi(CCR0, argcnt, max_int_register_arguments);
- __ blt(CCR0, move_intSlot_to_ARG);
+ __ cmplwi(CR0, argcnt, max_int_register_arguments);
+ __ blt(CR0, move_intSlot_to_ARG);
__ b(loop_start);
__ bind(do_int);
@@ -276,8 +275,8 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
__ std(intSlot, 0, arg_c);
__ addi(arg_java, arg_java, -BytesPerWord);
__ addi(arg_c, arg_c, BytesPerWord);
- __ cmplwi(CCR0, argcnt, max_int_register_arguments);
- __ blt(CCR0, move_intSlot_to_ARG);
+ __ cmplwi(CR0, argcnt, max_int_register_arguments);
+ __ blt(CR0, move_intSlot_to_ARG);
__ b(loop_start);
__ bind(do_long);
@@ -285,8 +284,8 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
__ std(intSlot, 0, arg_c);
__ addi(arg_java, arg_java, - 2 * BytesPerWord);
__ addi(arg_c, arg_c, BytesPerWord);
- __ cmplwi(CCR0, argcnt, max_int_register_arguments);
- __ blt(CCR0, move_intSlot_to_ARG);
+ __ cmplwi(CR0, argcnt, max_int_register_arguments);
+ __ blt(CR0, move_intSlot_to_ARG);
__ b(loop_start);
__ bind(do_float);
@@ -294,8 +293,8 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
__ stfs(floatSlot, Argument::float_on_stack_offset_in_bytes_c, arg_c);
__ addi(arg_java, arg_java, -BytesPerWord);
__ addi(arg_c, arg_c, BytesPerWord);
- __ cmplwi(CCR0, fpcnt, max_fp_register_arguments);
- __ blt(CCR0, move_floatSlot_to_FARG);
+ __ cmplwi(CR0, fpcnt, max_fp_register_arguments);
+ __ blt(CR0, move_floatSlot_to_FARG);
__ b(loop_start);
__ bind(do_double);
@@ -303,8 +302,8 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
__ stfd(floatSlot, 0, arg_c);
__ addi(arg_java, arg_java, - 2 * BytesPerWord);
__ addi(arg_c, arg_c, BytesPerWord);
- __ cmplwi(CCR0, fpcnt, max_fp_register_arguments);
- __ blt(CCR0, move_floatSlot_to_FARG);
+ __ cmplwi(CR0, fpcnt, max_fp_register_arguments);
+ __ blt(CR0, move_floatSlot_to_FARG);
__ b(loop_start);
__ bind(loop_end);
@@ -511,8 +510,8 @@ address TemplateInterpreterGenerator::generate_Reference_get_entry(void) {
__ ld(R3_RET, Interpreter::stackElementSize, R15_esp); // get receiver
// Check if receiver == nullptr and go the slow path.
- __ cmpdi(CCR0, R3_RET, 0);
- __ beq(CCR0, slow_path);
+ __ cmpdi(CR0, R3_RET, 0);
+ __ beq(CR0, slow_path);
__ load_heap_oop(R3_RET, referent_offset, R3_RET,
/* non-volatile temp */ R31, R11_scratch1,
@@ -726,8 +725,8 @@ void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow) {
if (ProfileInterpreter) {
const Register Rmdo = R3_counters;
__ ld(Rmdo, in_bytes(Method::method_data_offset()), R19_method);
- __ cmpdi(CCR0, Rmdo, 0);
- __ beq(CCR0, no_mdo);
+ __ cmpdi(CR0, Rmdo, 0);
+ __ beq(CR0, no_mdo);
// Increment invocation counter in the MDO.
const int mdo_ic_offs = in_bytes(MethodData::invocation_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
@@ -736,7 +735,7 @@ void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow) {
__ addi(Rscratch2, Rscratch2, increment);
__ stw(Rscratch2, mdo_ic_offs, Rmdo);
__ and_(Rscratch1, Rscratch2, Rscratch1);
- __ bne(CCR0, done);
+ __ bne(CR0, done);
__ b(*overflow);
}
@@ -749,7 +748,7 @@ void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow) {
__ addi(Rscratch2, Rscratch2, increment);
__ stw(Rscratch2, mo_ic_offs, R3_counters);
__ and_(Rscratch1, Rscratch2, Rscratch1);
- __ beq(CCR0, *overflow);
+ __ beq(CR0, *overflow);
__ bind(done);
}
@@ -790,8 +789,8 @@ void TemplateInterpreterGenerator::generate_stack_overflow_check(Register Rmem_f
BLOCK_COMMENT("stack_overflow_check_with_compare {");
__ sub(Rmem_frame_size, R1_SP, Rmem_frame_size);
__ ld(Rscratch1, thread_(stack_overflow_limit));
- __ cmpld(CCR0/*is_stack_overflow*/, Rmem_frame_size, Rscratch1);
- __ bgt(CCR0/*is_stack_overflow*/, done);
+ __ cmpld(CR0/*is_stack_overflow*/, Rmem_frame_size, Rscratch1);
+ __ bgt(CR0/*is_stack_overflow*/, done);
// The stack overflows. Load target address of the runtime stub and call it.
assert(SharedRuntime::throw_StackOverflowError_entry() != nullptr, "generated in wrong order");
@@ -800,13 +799,13 @@ void TemplateInterpreterGenerator::generate_stack_overflow_check(Register Rmem_f
// Restore caller_sp (c2i adapter may exist, but no shrinking of interpreted caller frame).
#ifdef ASSERT
Label frame_not_shrunk;
- __ cmpld(CCR0, R1_SP, R21_sender_SP);
- __ ble(CCR0, frame_not_shrunk);
+ __ cmpld(CR0, R1_SP, R21_sender_SP);
+ __ ble(CR0, frame_not_shrunk);
__ stop("frame shrunk");
__ bind(frame_not_shrunk);
__ ld(Rscratch1, 0, R1_SP);
__ ld(R0, 0, R21_sender_SP);
- __ cmpd(CCR0, R0, Rscratch1);
+ __ cmpd(CR0, R0, Rscratch1);
__ asm_assert_eq("backlink");
#endif // ASSERT
__ mr(R1_SP, R21_sender_SP);
@@ -823,15 +822,15 @@ void TemplateInterpreterGenerator::lock_method(Register Rflags, Register Rscratc
{
if (!flags_preloaded) {
- __ lwz(Rflags, method_(access_flags));
+ __ lhz(Rflags, method_(access_flags));
}
#ifdef ASSERT
// Check if methods needs synchronization.
{
Label Lok;
- __ testbitdi(CCR0, R0, Rflags, JVM_ACC_SYNCHRONIZED_BIT);
- __ btrue(CCR0,Lok);
+ __ testbitdi(CR0, R0, Rflags, JVM_ACC_SYNCHRONIZED_BIT);
+ __ btrue(CR0,Lok);
__ stop("method doesn't need synchronization");
__ bind(Lok);
}
@@ -843,8 +842,8 @@ void TemplateInterpreterGenerator::lock_method(Register Rflags, Register Rscratc
Label Lstatic;
Label Ldone;
- __ testbitdi(CCR0, R0, Rflags, JVM_ACC_STATIC_BIT);
- __ btrue(CCR0, Lstatic);
+ __ testbitdi(CR0, R0, Rflags, JVM_ACC_STATIC_BIT);
+ __ btrue(CR0, Lstatic);
// Non-static case: load receiver obj from stack and we're done.
__ ld(Robj_to_lock, R18_locals);
@@ -951,8 +950,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call, Regist
// environment and one for a possible native mirror.
Label skip_native_calculate_max_stack;
__ addi(Rtop_frame_size, Rsize_of_parameters, 2);
- __ cmpwi(CCR0, Rtop_frame_size, Argument::n_int_register_parameters_c);
- __ bge(CCR0, skip_native_calculate_max_stack);
+ __ cmpwi(CR0, Rtop_frame_size, Argument::n_int_register_parameters_c);
+ __ bge(CR0, skip_native_calculate_max_stack);
__ li(Rtop_frame_size, Argument::n_int_register_parameters_c);
__ bind(skip_native_calculate_max_stack);
__ sldi(Rsize_of_parameters, Rsize_of_parameters, Interpreter::logStackElementSize);
@@ -1000,8 +999,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call, Regist
if (ProfileInterpreter) {
Label zero_continue;
__ ld(R28_mdx, method_(method_data));
- __ cmpdi(CCR0, R28_mdx, 0);
- __ beq(CCR0, zero_continue);
+ __ cmpdi(CR0, R28_mdx, 0);
+ __ beq(CR0, zero_continue);
__ addi(R28_mdx, R28_mdx, in_bytes(MethodData::data_offset()));
__ bind(zero_continue);
}
@@ -1301,8 +1300,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
assert(__ nonvolatile_accross_vthread_preemtion(access_flags),
"access_flags not preserved");
// Type check.
- assert(4 == sizeof(AccessFlags), "unexpected field size");
- __ lwz(access_flags, method_(access_flags));
+ assert(2 == sizeof(AccessFlags), "unexpected field size");
+ __ lhz(access_flags, method_(access_flags));
// We don't want to reload R19_method and access_flags after calls
// to some helper functions.
@@ -1331,8 +1330,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
__ ld(signature_handler_fd, method_(signature_handler));
Label call_signature_handler;
- __ cmpdi(CCR0, signature_handler_fd, 0);
- __ bne(CCR0, call_signature_handler);
+ __ cmpdi(CR0, signature_handler_fd, 0);
+ __ bne(CR0, call_signature_handler);
// Method has never been called. Either generate a specialized
// handler or point to the slow one.
@@ -1343,8 +1342,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// Check for an exception while looking up the target method. If we
// incurred one, bail.
__ ld(pending_exception, thread_(pending_exception));
- __ cmpdi(CCR0, pending_exception, 0);
- __ bne(CCR0, exception_return_sync_check); // Has pending exception.
+ __ cmpdi(CR0, pending_exception, 0);
+ __ bne(CR0, exception_return_sync_check); // Has pending exception.
// Reload signature handler, it may have been created/assigned in the meanwhile.
__ ld(signature_handler_fd, method_(signature_handler));
@@ -1399,8 +1398,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// Access_flags is non-volatile and still, no need to restore it.
// Restore access flags.
- __ testbitdi(CCR0, R0, access_flags, JVM_ACC_STATIC_BIT);
- __ bfalse(CCR0, method_is_not_static);
+ __ testbitdi(CR0, R0, access_flags, JVM_ACC_STATIC_BIT);
+ __ bfalse(CR0, method_is_not_static);
// Load mirror from interpreter frame (FP in R11_scratch1)
__ ld(R21_tmp1, _ijava_state_neg(mirror), R11_scratch1);
@@ -1509,8 +1508,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// Not suspended.
// TODO PPC port assert(4 == Thread::sz_suspend_flags(), "unexpected field size");
__ lwz(suspend_flags, thread_(suspend_flags));
- __ cmpwi(CCR1, suspend_flags, 0);
- __ beq(CCR1, sync_check_done);
+ __ cmpwi(CR1, suspend_flags, 0);
+ __ beq(CR1, sync_check_done);
__ bind(do_safepoint);
__ isync();
@@ -1553,8 +1552,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// Check preemption for Object.wait()
Label not_preempted;
__ ld(R0, in_bytes(JavaThread::preempt_alternate_return_offset()), R16_thread);
- __ cmpdi(CCR0, R0, 0);
- __ beq(CCR0, not_preempted);
+ __ cmpdi(CR0, R0, 0);
+ __ beq(CR0, not_preempted);
__ mtlr(R0);
__ li(R0, 0);
__ std(R0, in_bytes(JavaThread::preempt_alternate_return_offset()), R16_thread);
@@ -1612,8 +1611,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
Label exception_return_sync_check_already_unlocked;
__ ld(R0/*pending_exception*/, thread_(pending_exception));
- __ cmpdi(CCR0, R0/*pending_exception*/, 0);
- __ bne(CCR0, exception_return_sync_check_already_unlocked);
+ __ cmpdi(CR0, R0/*pending_exception*/, 0);
+ __ bne(CR0, exception_return_sync_check_already_unlocked);
//-----------------------------------------------------------------------------
// No exception pending.
@@ -1707,7 +1706,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
__ subf(Rnum, Rsize_of_parameters, Rsize_of_locals);
__ subf(Rslot_addr, Rsize_of_parameters, R18_locals);
__ srdi_(Rnum, Rnum, Interpreter::logStackElementSize);
- __ beq(CCR0, Lno_locals);
+ __ beq(CR0, Lno_locals);
__ li(R0, 0);
__ mtctr(Rnum);
@@ -1769,7 +1768,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
#ifdef ASSERT
else {
Label Lok;
- __ lwz(R0, in_bytes(Method::access_flags_offset()), R19_method);
+ __ lhz(R0, in_bytes(Method::access_flags_offset()), R19_method);
__ andi_(R0, R0, JVM_ACC_SYNCHRONIZED);
__ asm_assert_eq("method needs synchronization");
__ bind(Lok);
@@ -1997,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
@@ -2081,8 +2086,8 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
__ ld(return_pc, 0, R1_SP);
__ ld(return_pc, _abi0(lr), return_pc);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::interpreter_contains), return_pc);
- __ cmpdi(CCR0, R3_RET, 0);
- __ bne(CCR0, Lcaller_not_deoptimized);
+ __ cmpdi(CR0, R3_RET, 0);
+ __ bne(CR0, Lcaller_not_deoptimized);
// The deoptimized case.
// In this case, we can't call dispatch_next() after the frame is
@@ -2128,16 +2133,16 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
Label L_done;
__ lbz(R11_scratch1, 0, R14_bcp);
- __ cmpwi(CCR0, R11_scratch1, Bytecodes::_invokestatic);
- __ bne(CCR0, L_done);
+ __ cmpwi(CR0, R11_scratch1, Bytecodes::_invokestatic);
+ __ bne(CR0, L_done);
// The member name argument must be restored if _invokestatic is re-executed after a PopFrame call.
// Detect such a case in the InterpreterRuntime function and return the member name argument, or null.
__ ld(R4_ARG2, 0, R18_locals);
__ call_VM(R4_ARG2, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), R4_ARG2, R19_method, R14_bcp);
- __ cmpdi(CCR0, R4_ARG2, 0);
- __ beq(CCR0, L_done);
+ __ cmpdi(CR0, R4_ARG2, 0);
+ __ beq(CR0, L_done);
__ std(R4_ARG2, wordSize, R15_esp);
__ bind(L_done);
#endif // INCLUDE_JVMTI
@@ -2317,13 +2322,13 @@ 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);
- __ cmpd(CCR0, R12_scratch2, R11_scratch1);
- __ blt(CCR0, Lskip_vm_call);
+ __ ld(R12_scratch2, offs2, R12_scratch2);
+ __ cmpd(CR0, R12_scratch2, R11_scratch1);
+ __ blt(CR0, Lskip_vm_call);
}
__ push(state);
@@ -2335,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();
@@ -2345,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) {
@@ -2396,9 +2401,9 @@ 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);
- __ cmpd(CCR0, R12_scratch2, R11_scratch1);
- __ bne(CCR0, L);
+ __ ld(R12_scratch2, offs2, R12_scratch2);
+ __ cmpd(CR0, R12_scratch2, R11_scratch1);
+ __ bne(CR0, L);
__ illtrap();
__ bind(L);
}
diff --git a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
index 43e78dd9d15..934bb1bd529 100644
--- a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "cds/cdsConfig.hpp"
#include "compiler/disassembler.hpp"
@@ -124,9 +123,9 @@ void TemplateTable::patch_bytecode(Bytecodes::Code new_bc, Register Rnew_bc, Reg
int code_offset = (byte_no == f1_byte) ? in_bytes(ResolvedFieldEntry::get_code_offset())
: in_bytes(ResolvedFieldEntry::put_code_offset());
__ lbz(Rnew_bc, code_offset, Rtemp);
- __ cmpwi(CCR0, Rnew_bc, 0);
+ __ cmpwi(CR0, Rnew_bc, 0);
__ li(Rnew_bc, (unsigned int)(unsigned char)new_bc);
- __ beq(CCR0, L_patch_done);
+ __ beq(CR0, L_patch_done);
// __ isync(); // acquire not needed
break;
}
@@ -141,8 +140,8 @@ void TemplateTable::patch_bytecode(Bytecodes::Code new_bc, Register Rnew_bc, Reg
if (JvmtiExport::can_post_breakpoint()) {
Label L_fast_patch;
__ lbz(Rtemp, 0, R14_bcp);
- __ cmpwi(CCR0, Rtemp, (unsigned int)(unsigned char)Bytecodes::_breakpoint);
- __ bne(CCR0, L_fast_patch);
+ __ cmpwi(CR0, Rtemp, (unsigned int)(unsigned char)Bytecodes::_breakpoint);
+ __ bne(CR0, L_fast_patch);
// Perform the quickening, slowly, in the bowels of the breakpoint table.
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::set_original_bytecode_at), R19_method, R14_bcp, Rnew_bc);
__ b(L_patch_done);
@@ -262,14 +261,14 @@ void TemplateTable::ldc(LdcType type) {
__ addi(Rscratch2, Rscratch2, tags_offset);
__ lbzx(Rscratch2, Rscratch2, Rscratch1);
- __ cmpwi(CCR0, Rscratch2, JVM_CONSTANT_UnresolvedClass); // Unresolved class?
- __ cmpwi(CCR1, Rscratch2, JVM_CONSTANT_UnresolvedClassInError); // Unresolved class in error state?
- __ cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
+ __ cmpwi(CR0, Rscratch2, JVM_CONSTANT_UnresolvedClass); // Unresolved class?
+ __ cmpwi(CR1, Rscratch2, JVM_CONSTANT_UnresolvedClassInError); // Unresolved class in error state?
+ __ cror(CR0, Assembler::equal, CR1, Assembler::equal);
// Resolved class - need to call vm to get java mirror of the class.
- __ cmpwi(CCR1, Rscratch2, JVM_CONSTANT_Class);
- __ crnor(CCR0, Assembler::equal, CCR1, Assembler::equal); // Neither resolved class nor unresolved case from above?
- __ beq(CCR0, notClass);
+ __ cmpwi(CR1, Rscratch2, JVM_CONSTANT_Class);
+ __ crnor(CR0, Assembler::equal, CR1, Assembler::equal); // Neither resolved class nor unresolved case from above?
+ __ beq(CR0, notClass);
__ li(R4, is_ldc_wide(type) ? 1 : 0);
call_VM(R17_tos, CAST_FROM_FN_PTR(address, InterpreterRuntime::ldc), R4);
@@ -280,16 +279,16 @@ void TemplateTable::ldc(LdcType type) {
__ bind(notClass);
__ addi(Rcpool, Rcpool, base_offset);
__ sldi(Rscratch1, Rscratch1, LogBytesPerWord);
- __ cmpdi(CCR0, Rscratch2, JVM_CONSTANT_Integer);
- __ bne(CCR0, notInt);
+ __ cmpdi(CR0, Rscratch2, JVM_CONSTANT_Integer);
+ __ bne(CR0, notInt);
__ lwax(R17_tos, Rcpool, Rscratch1);
__ push(itos);
__ b(exit);
__ align(32, 12);
__ bind(notInt);
- __ cmpdi(CCR0, Rscratch2, JVM_CONSTANT_Float);
- __ bne(CCR0, notFloat);
+ __ cmpdi(CR0, Rscratch2, JVM_CONSTANT_Float);
+ __ bne(CR0, notFloat);
__ lfsx(F15_ftos, Rcpool, Rscratch1);
__ push(ftos);
__ b(exit);
@@ -319,12 +318,12 @@ void TemplateTable::fast_aldc(LdcType type) {
int simm16_rest = __ load_const_optimized(R11_scratch1, Universe::the_null_sentinel_addr(), R0, true);
__ ld(R31, simm16_rest, R11_scratch1);
__ resolve_oop_handle(R31, R11_scratch1, R12_scratch2, MacroAssembler::PRESERVATION_NONE);
- __ cmpld(CCR0, R17_tos, R31);
+ __ cmpld(CR0, R17_tos, R31);
if (VM_Version::has_isel()) {
- __ isel_0(R17_tos, CCR0, Assembler::equal);
+ __ isel_0(R17_tos, CR0, Assembler::equal);
} else {
Label not_sentinel;
- __ bne(CCR0, not_sentinel);
+ __ bne(CR0, not_sentinel);
__ li(R17_tos, 0);
__ bind(not_sentinel);
}
@@ -360,15 +359,15 @@ void TemplateTable::ldc2_w() {
__ lbzx(Rtag, Rtag, Rindex);
__ sldi(Rindex, Rindex, LogBytesPerWord);
- __ cmpdi(CCR0, Rtag, JVM_CONSTANT_Double);
- __ bne(CCR0, not_double);
+ __ cmpdi(CR0, Rtag, JVM_CONSTANT_Double);
+ __ bne(CR0, not_double);
__ lfdx(F15_ftos, Rcpool, Rindex);
__ push(dtos);
__ b(exit);
__ bind(not_double);
- __ cmpdi(CCR0, Rtag, JVM_CONSTANT_Long);
- __ bne(CCR0, not_long);
+ __ cmpdi(CR0, Rtag, JVM_CONSTANT_Long);
+ __ bne(CR0, not_long);
__ ldx(R17_tos, Rcpool, Rindex);
__ push(ltos);
__ b(exit);
@@ -402,32 +401,32 @@ void TemplateTable::condy_helper(Label& Done) {
{
// tos in (itos, ftos, stos, btos, ctos, ztos)
Label notInt, notFloat, notShort, notByte, notChar, notBool;
- __ cmplwi(CCR0, flags, itos);
- __ bne(CCR0, notInt);
+ __ cmplwi(CR0, flags, itos);
+ __ bne(CR0, notInt);
// itos
__ lwax(R17_tos, obj, off);
__ push(itos);
__ b(Done);
__ bind(notInt);
- __ cmplwi(CCR0, flags, ftos);
- __ bne(CCR0, notFloat);
+ __ cmplwi(CR0, flags, ftos);
+ __ bne(CR0, notFloat);
// ftos
__ lfsx(F15_ftos, obj, off);
__ push(ftos);
__ b(Done);
__ bind(notFloat);
- __ cmplwi(CCR0, flags, stos);
- __ bne(CCR0, notShort);
+ __ cmplwi(CR0, flags, stos);
+ __ bne(CR0, notShort);
// stos
__ lhax(R17_tos, obj, off);
__ push(stos);
__ b(Done);
__ bind(notShort);
- __ cmplwi(CCR0, flags, btos);
- __ bne(CCR0, notByte);
+ __ cmplwi(CR0, flags, btos);
+ __ bne(CR0, notByte);
// btos
__ lbzx(R17_tos, obj, off);
__ extsb(R17_tos, R17_tos);
@@ -435,16 +434,16 @@ void TemplateTable::condy_helper(Label& Done) {
__ b(Done);
__ bind(notByte);
- __ cmplwi(CCR0, flags, ctos);
- __ bne(CCR0, notChar);
+ __ cmplwi(CR0, flags, ctos);
+ __ bne(CR0, notChar);
// ctos
__ lhzx(R17_tos, obj, off);
__ push(ctos);
__ b(Done);
__ bind(notChar);
- __ cmplwi(CCR0, flags, ztos);
- __ bne(CCR0, notBool);
+ __ cmplwi(CR0, flags, ztos);
+ __ bne(CR0, notBool);
// ztos
__ lbzx(R17_tos, obj, off);
__ push(ztos);
@@ -457,16 +456,16 @@ void TemplateTable::condy_helper(Label& Done) {
case Bytecodes::_ldc2_w:
{
Label notLong, notDouble;
- __ cmplwi(CCR0, flags, ltos);
- __ bne(CCR0, notLong);
+ __ cmplwi(CR0, flags, ltos);
+ __ bne(CR0, notLong);
// ltos
__ ldx(R17_tos, obj, off);
__ push(ltos);
__ b(Done);
__ bind(notLong);
- __ cmplwi(CCR0, flags, dtos);
- __ bne(CCR0, notDouble);
+ __ cmplwi(CR0, flags, dtos);
+ __ bne(CR0, notDouble);
// dtos
__ lfdx(F15_ftos, obj, off);
__ push(dtos);
@@ -518,16 +517,16 @@ void TemplateTable::iload_internal(RewriteControl rc) {
// last two iloads in a pair. Comparing against fast_iload means that
// the next bytecode is neither an iload or a caload, and therefore
// an iload pair.
- __ cmpwi(CCR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_iload);
- __ beq(CCR0, Ldone);
+ __ cmpwi(CR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_iload);
+ __ beq(CR0, Ldone);
- __ cmpwi(CCR1, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_iload);
+ __ cmpwi(CR1, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_iload);
__ li(Rrewrite_to, (unsigned int)(unsigned char)Bytecodes::_fast_iload2);
- __ beq(CCR1, Lrewrite);
+ __ beq(CR1, Lrewrite);
- __ cmpwi(CCR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_caload);
+ __ cmpwi(CR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_caload);
__ li(Rrewrite_to, (unsigned int)(unsigned char)Bytecodes::_fast_icaload);
- __ beq(CCR0, Lrewrite);
+ __ beq(CR0, Lrewrite);
__ li(Rrewrite_to, (unsigned int)(unsigned char)Bytecodes::_fast_iload);
@@ -813,20 +812,20 @@ void TemplateTable::aload_0_internal(RewriteControl rc) {
__ lbz(Rnext_byte, Bytecodes::length_for(Bytecodes::_aload_0), R14_bcp);
// If _getfield, wait to rewrite. We only want to rewrite the last two bytecodes in a pair.
- __ cmpwi(CCR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_getfield);
- __ beq(CCR0, Ldont_rewrite);
+ __ cmpwi(CR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_getfield);
+ __ beq(CR0, Ldont_rewrite);
- __ cmpwi(CCR1, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_igetfield);
+ __ cmpwi(CR1, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_igetfield);
__ li(Rrewrite_to, (unsigned int)(unsigned char)Bytecodes::_fast_iaccess_0);
- __ beq(CCR1, Lrewrite);
+ __ beq(CR1, Lrewrite);
- __ cmpwi(CCR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_agetfield);
+ __ cmpwi(CR0, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_agetfield);
__ li(Rrewrite_to, (unsigned int)(unsigned char)Bytecodes::_fast_aaccess_0);
- __ beq(CCR0, Lrewrite);
+ __ beq(CR0, Lrewrite);
- __ cmpwi(CCR1, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_fgetfield);
+ __ cmpwi(CR1, Rnext_byte, (unsigned int)(unsigned char)Bytecodes::_fast_fgetfield);
__ li(Rrewrite_to, (unsigned int)(unsigned char)Bytecodes::_fast_faccess_0);
- __ beq(CCR1, Lrewrite);
+ __ beq(CR1, Lrewrite);
__ li(Rrewrite_to, (unsigned int)(unsigned char)Bytecodes::_fast_aload_0);
@@ -998,8 +997,8 @@ void TemplateTable::aastore() {
Register Rscratch3 = Rindex;
// Do array store check - check for null value first.
- __ cmpdi(CCR0, R17_tos, 0);
- __ beq(CCR0, Lis_null);
+ __ cmpdi(CR0, R17_tos, 0);
+ __ beq(CR0, Lis_null);
__ load_klass(Rarray_klass, Rarray);
__ load_klass(Rvalue_klass, R17_tos);
@@ -1046,9 +1045,9 @@ void TemplateTable::bastore() {
__ load_klass(Rscratch, Rarray);
__ lwz(Rscratch, in_bytes(Klass::layout_helper_offset()), Rscratch);
int diffbit = exact_log2(Klass::layout_helper_boolean_diffbit());
- __ testbitdi(CCR0, R0, Rscratch, diffbit);
+ __ testbitdi(CR0, R0, Rscratch, diffbit);
Label L_skip;
- __ bfalse(CCR0, L_skip);
+ __ bfalse(CR0, L_skip);
__ andi(R17_tos, R17_tos, 1); // if it is a T_BOOLEAN array, mask the stored value to 0/1
__ bind(L_skip);
@@ -1263,11 +1262,11 @@ void TemplateTable::idiv() {
Register Rdividend = R11_scratch1; // Used by irem.
__ addi(R0, R17_tos, 1);
- __ cmplwi(CCR0, R0, 2);
- __ bgt(CCR0, Lnormal); // divisor <-1 or >1
+ __ cmplwi(CR0, R0, 2);
+ __ bgt(CR0, Lnormal); // divisor <-1 or >1
- __ cmpwi(CCR1, R17_tos, 0);
- __ beq(CCR1, Lexception); // divisor == 0
+ __ cmpwi(CR1, R17_tos, 0);
+ __ beq(CR1, Lexception); // divisor == 0
__ pop_i(Rdividend);
__ mullw(R17_tos, Rdividend, R17_tos); // div by +/-1
@@ -1308,11 +1307,11 @@ void TemplateTable::ldiv() {
Register Rdividend = R11_scratch1; // Used by lrem.
__ addi(R0, R17_tos, 1);
- __ cmpldi(CCR0, R0, 2);
- __ bgt(CCR0, Lnormal); // divisor <-1 or >1
+ __ cmpldi(CR0, R0, 2);
+ __ bgt(CR0, Lnormal); // divisor <-1 or >1
- __ cmpdi(CCR1, R17_tos, 0);
- __ beq(CCR1, Lexception); // divisor == 0
+ __ cmpdi(CR1, R17_tos, 0);
+ __ beq(CR1, Lexception); // divisor == 0
__ pop_l(Rdividend);
__ mulld(R17_tos, Rdividend, R17_tos); // div by +/-1
@@ -1566,18 +1565,18 @@ void TemplateTable::convert() {
case Bytecodes::_d2i:
case Bytecodes::_f2i:
- __ fcmpu(CCR0, F15_ftos, F15_ftos);
+ __ fcmpu(CR0, F15_ftos, F15_ftos);
__ li(R17_tos, 0); // 0 in case of NAN
- __ bso(CCR0, done);
+ __ bso(CR0, done);
__ fctiwz(F15_ftos, F15_ftos);
__ move_d_to_l();
break;
case Bytecodes::_d2l:
case Bytecodes::_f2l:
- __ fcmpu(CCR0, F15_ftos, F15_ftos);
+ __ fcmpu(CR0, F15_ftos, F15_ftos);
__ li(R17_tos, 0); // 0 in case of NAN
- __ bso(CCR0, done);
+ __ bso(CR0, done);
__ fctidz(F15_ftos, F15_ftos);
__ move_d_to_l();
break;
@@ -1594,7 +1593,7 @@ void TemplateTable::lcmp() {
const Register Rscratch = R11_scratch1;
__ pop_l(Rscratch); // first operand, deeper in stack
- __ cmpd(CCR0, Rscratch, R17_tos); // compare
+ __ cmpd(CR0, Rscratch, R17_tos); // compare
__ set_cmp3(R17_tos); // set result as follows: <: -1, =: 0, >: 1
}
@@ -1612,7 +1611,7 @@ void TemplateTable::float_cmp(bool is_float, int unordered_result) {
__ pop_d(Rfirst);
}
- __ fcmpu(CCR0, Rfirst, Rsecond); // compare
+ __ fcmpu(CR0, Rfirst, Rsecond); // compare
// if unordered_result is 1, treat unordered_result like 'greater than'
assert(unordered_result == 1 || unordered_result == -1, "unordered_result can be either 1 or -1");
__ set_cmpu3(R17_tos, unordered_result != 1);
@@ -1684,8 +1683,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
Label Lforward;
// Check branch direction.
- __ cmpdi(CCR0, Rdisp, 0);
- __ bgt(CCR0, Lforward);
+ __ cmpdi(CR0, Rdisp, 0);
+ __ bgt(CR0, Lforward);
__ get_method_counters(R19_method, R4_counters, Lforward);
@@ -1696,8 +1695,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
// If no method data exists, go to profile_continue.
__ ld(Rmdo, in_bytes(Method::method_data_offset()), R19_method);
- __ cmpdi(CCR0, Rmdo, 0);
- __ beq(CCR0, Lno_mdo);
+ __ cmpdi(CR0, Rmdo, 0);
+ __ beq(CR0, Lno_mdo);
// Increment backedge counter in the MDO.
const int mdo_bc_offs = in_bytes(MethodData::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
@@ -1707,7 +1706,7 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ stw(Rscratch2, mdo_bc_offs, Rmdo);
if (UseOnStackReplacement) {
__ and_(Rscratch3, Rscratch2, Rscratch3);
- __ bne(CCR0, Lforward);
+ __ bne(CR0, Lforward);
__ b(Loverflow);
} else {
__ b(Lforward);
@@ -1723,7 +1722,7 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ stw(Rscratch2, mo_bc_offs, R4_counters);
if (UseOnStackReplacement) {
__ and_(Rscratch3, Rscratch2, Rscratch3);
- __ bne(CCR0, Lforward);
+ __ bne(CR0, Lforward);
} else {
__ b(Lforward);
}
@@ -1734,13 +1733,13 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), R4_ARG2, true);
// Was an OSR adapter generated?
- __ cmpdi(CCR0, R3_RET, 0);
- __ beq(CCR0, Lforward);
+ __ cmpdi(CR0, R3_RET, 0);
+ __ beq(CR0, Lforward);
// Has the nmethod been invalidated already?
__ lbz(R0, in_bytes(nmethod::state_offset()), R3_RET);
- __ cmpwi(CCR0, R0, nmethod::in_use);
- __ bne(CCR0, Lforward);
+ __ cmpwi(CR0, R0, nmethod::in_use);
+ __ bne(CR0, Lforward);
// Migrate the interpreter frame off of the stack.
// We can use all registers because we will not return to interpreter from this point.
@@ -1776,18 +1775,18 @@ void TemplateTable::if_cmp_common(Register Rfirst, Register Rsecond, Register Rs
if (is_jint) {
if (cmp0) {
- __ cmpwi(CCR0, Rfirst, 0);
+ __ cmpwi(CR0, Rfirst, 0);
} else {
- __ cmpw(CCR0, Rfirst, Rsecond);
+ __ cmpw(CR0, Rfirst, Rsecond);
}
} else {
if (cmp0) {
- __ cmpdi(CCR0, Rfirst, 0);
+ __ cmpdi(CR0, Rfirst, 0);
} else {
- __ cmpd(CCR0, Rfirst, Rsecond);
+ __ cmpd(CR0, Rfirst, Rsecond);
}
}
- branch_conditional(CCR0, cc, Lnot_taken, /*invert*/ true);
+ branch_conditional(CR0, cc, Lnot_taken, /*invert*/ true);
// Conition is false => Jump!
branch(false, false);
@@ -1886,10 +1885,10 @@ void TemplateTable::tableswitch() {
__ get_u4(Rhigh_byte, Rdef_offset_addr, 2 *BytesPerInt, InterpreterMacroAssembler::Unsigned);
// Check for default case (=index outside [low,high]).
- __ cmpw(CCR0, R17_tos, Rlow_byte);
- __ cmpw(CCR1, R17_tos, Rhigh_byte);
- __ blt(CCR0, Ldefault_case);
- __ bgt(CCR1, Ldefault_case);
+ __ cmpw(CR0, R17_tos, Rlow_byte);
+ __ cmpw(CR1, R17_tos, Rhigh_byte);
+ __ blt(CR0, Ldefault_case);
+ __ bgt(CR1, Ldefault_case);
// Lookup dispatch offset.
__ sub(Rindex, R17_tos, Rlow_byte);
@@ -1945,8 +1944,8 @@ void TemplateTable::fast_linearswitch() {
__ addi(Rcurrent_pair, Rdef_offset_addr, 2 * BytesPerInt); // Rcurrent_pair now points to first pair.
__ mtctr(Rcount);
- __ cmpwi(CCR0, Rcount, 0);
- __ bne(CCR0, Lloop_entry);
+ __ cmpwi(CR0, Rcount, 0);
+ __ bne(CR0, Lloop_entry);
// Default case
__ bind(Ldefault_case);
@@ -1962,8 +1961,8 @@ void TemplateTable::fast_linearswitch() {
__ addi(Rcurrent_pair, Rcurrent_pair, 2 * BytesPerInt);
__ bind(Lloop_entry);
__ get_u4(Rvalue, Rcurrent_pair, 0, InterpreterMacroAssembler::Unsigned);
- __ cmpw(CCR0, Rvalue, Rcmp_value);
- __ bne(CCR0, Lsearch_loop);
+ __ cmpw(CR0, Rvalue, Rcmp_value);
+ __ bne(CR0, Lsearch_loop);
// Found, load offset.
__ get_u4(Roffset, Rcurrent_pair, BytesPerInt, InterpreterMacroAssembler::Signed);
@@ -2058,8 +2057,8 @@ void TemplateTable::fast_binaryswitch() {
// else
// Rh = Ri
Label Lgreater;
- __ cmpw(CCR0, Rkey, Rscratch);
- __ bge(CCR0, Lgreater);
+ __ cmpw(CR0, Rkey, Rscratch);
+ __ bge(CR0, Lgreater);
__ mr(Rj, Rh);
__ b(entry);
__ bind(Lgreater);
@@ -2068,10 +2067,10 @@ void TemplateTable::fast_binaryswitch() {
// while (i+1 < j)
__ bind(entry);
__ addi(Rscratch, Ri, 1);
- __ cmpw(CCR0, Rscratch, Rj);
+ __ cmpw(CR0, Rscratch, Rj);
__ add(Rh, Ri, Rj); // start h = i + j >> 1;
- __ blt(CCR0, loop);
+ __ blt(CR0, loop);
}
// End of binary search, result index is i (must check again!).
@@ -2087,8 +2086,8 @@ void TemplateTable::fast_binaryswitch() {
Label not_found;
// Ri = offset offset
- __ cmpw(CCR0, Rkey, Rscratch);
- __ beq(CCR0, not_found);
+ __ cmpw(CR0, Rkey, Rscratch);
+ __ beq(CR0, not_found);
// entry not found -> j = default offset
__ get_u4(Rj, Rarray, -2 * BytesPerInt, InterpreterMacroAssembler::Unsigned);
__ b(default_case);
@@ -2131,8 +2130,8 @@ void TemplateTable::_return(TosState state) {
// Load klass of this obj.
__ load_klass(Rklass, R17_tos);
__ lbz(Rklass_flags, in_bytes(Klass::misc_flags_offset()), Rklass);
- __ testbitdi(CCR0, R0, Rklass_flags, exact_log2(KlassFlags::_misc_has_finalizer));
- __ bfalse(CCR0, Lskip_register_finalizer);
+ __ testbitdi(CR0, R0, Rklass_flags, exact_log2(KlassFlags::_misc_has_finalizer));
+ __ bfalse(CR0, Lskip_register_finalizer);
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), R17_tos /* obj */);
@@ -2144,7 +2143,7 @@ void TemplateTable::_return(TosState state) {
Label no_safepoint;
__ ld(R11_scratch1, in_bytes(JavaThread::polling_word_offset()), R16_thread);
__ andi_(R11_scratch1, R11_scratch1, SafepointMechanism::poll_bit());
- __ beq(CCR0, no_safepoint);
+ __ beq(CR0, no_safepoint);
__ push(state);
__ push_cont_fastpath();
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint));
@@ -2215,8 +2214,8 @@ void TemplateTable::resolve_cache_and_index_for_method(int byte_no, Register Rca
// Load-acquire the bytecode to match store-release in InterpreterRuntime
__ lbz(Rscratch, bytecode_offset, Rcache);
// Acquire by cmp-br-isync (see below).
- __ cmpdi(CCR0, Rscratch, (int)code);
- __ beq(CCR0, Lresolved);
+ __ cmpdi(CR0, Rscratch, (int)code);
+ __ beq(CR0, Lresolved);
// Class initialization barrier slow path lands here as well.
__ bind(L_clinit_barrier_slow);
@@ -2264,8 +2263,8 @@ void TemplateTable::resolve_cache_and_index_for_field(int byte_no,
int code_offset = (byte_no == f1_byte) ? in_bytes(ResolvedFieldEntry::get_code_offset())
: in_bytes(ResolvedFieldEntry::put_code_offset());
__ lbz(R0, code_offset, Rcache);
- __ cmpwi(CCR0, R0, (int)code); // have we resolved this bytecode?
- __ beq(CCR0, resolved);
+ __ cmpwi(CR0, R0, (int)code); // have we resolved this bytecode?
+ __ beq(CR0, resolved);
// resolve first time through
address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_from_cache);
@@ -2333,8 +2332,8 @@ void TemplateTable::load_resolved_method_entry_handle(Register cache,
// maybe push appendix to arguments (just before return address)
Label L_no_push;
- __ testbitdi(CCR0, R0, flags, ResolvedMethodEntry::has_appendix_shift);
- __ bfalse(CCR0, L_no_push);
+ __ testbitdi(CR0, R0, flags, ResolvedMethodEntry::has_appendix_shift);
+ __ bfalse(CR0, L_no_push);
// invokehandle uses an index into the resolved references array
__ lhz(ref_index, in_bytes(ResolvedMethodEntry::resolved_references_index_offset()), cache);
// Push the appendix as a trailing parameter.
@@ -2396,8 +2395,8 @@ void TemplateTable::load_invokedynamic_entry(Register method) {
__ ld_ptr(method, in_bytes(ResolvedIndyEntry::method_offset()), cache);
// The invokedynamic is unresolved iff method is null
- __ cmpdi(CCR0, method, 0);
- __ bne(CCR0, resolved);
+ __ cmpdi(CR0, method, 0);
+ __ bne(CR0, resolved);
Bytecodes::Code code = bytecode();
@@ -2409,7 +2408,7 @@ void TemplateTable::load_invokedynamic_entry(Register method) {
__ load_resolved_indy_entry(cache, index);
__ ld_ptr(method, in_bytes(ResolvedIndyEntry::method_offset()), cache);
- DEBUG_ONLY(__ cmpdi(CCR0, method, 0));
+ DEBUG_ONLY(__ cmpdi(CR0, method, 0));
__ asm_assert_ne("Should be resolved by now");
__ bind(resolved);
__ isync(); // Order load wrt. succeeding loads.
@@ -2418,7 +2417,7 @@ void TemplateTable::load_invokedynamic_entry(Register method) {
// Check if there is an appendix
__ lbz(index, in_bytes(ResolvedIndyEntry::flags_offset()), cache);
__ rldicl_(R0, index, 64-ResolvedIndyEntry::has_appendix_shift, 63);
- __ beq(CCR0, L_no_push);
+ __ beq(CR0, L_no_push);
// Get appendix
__ lhz(index, in_bytes(ResolvedIndyEntry::resolved_references_index_offset()), cache);
@@ -2490,8 +2489,8 @@ void TemplateTable::jvmti_post_field_access(Register Rcache, Register Rscratch,
int offs = __ load_const_optimized(Rscratch, JvmtiExport::get_field_access_count_addr(), R0, true);
__ lwz(Rscratch, offs, Rscratch);
- __ cmpwi(CCR0, Rscratch, 0);
- __ beq(CCR0, Lno_field_access_post);
+ __ cmpwi(CR0, Rscratch, 0);
+ __ beq(CR0, Lno_field_access_post);
// Post access enabled - do it!
if (is_static) {
@@ -2575,13 +2574,13 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
#ifdef ASSERT
Label LFlagInvalid;
- __ cmpldi(CCR0, Rtos_state, number_of_states);
- __ bge(CCR0, LFlagInvalid);
+ __ cmpldi(CR0, Rtos_state, number_of_states);
+ __ bge(CR0, LFlagInvalid);
#endif
// Load from branch table and dispatch (volatile case: one instruction ahead).
__ sldi(Rtos_state, Rtos_state, LogBytesPerWord);
- __ cmpwi(CCR2, Rscratch, 1); // Volatile?
+ __ cmpwi(CR2, Rscratch, 1); // Volatile?
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
__ sldi(Rscratch, Rscratch, exact_log2(BytesPerInstWord)); // Volatile ? size of 1 instruction : 0.
}
@@ -2632,12 +2631,12 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
}
{
Label acquire_double;
- __ beq(CCR2, acquire_double); // Volatile?
+ __ beq(CR2, acquire_double); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ bind(acquire_double);
- __ fcmpu(CCR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
- __ beq_predict_taken(CCR0, Lisync);
+ __ fcmpu(CR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
+ __ beq_predict_taken(CR0, Lisync);
__ b(Lisync); // In case of NAN.
}
@@ -2653,12 +2652,12 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
}
{
Label acquire_float;
- __ beq(CCR2, acquire_float); // Volatile?
+ __ beq(CR2, acquire_float); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ bind(acquire_float);
- __ fcmpu(CCR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
- __ beq_predict_taken(CCR0, Lisync);
+ __ fcmpu(CR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
+ __ beq_predict_taken(CR0, Lisync);
__ b(Lisync); // In case of NAN.
}
@@ -2672,7 +2671,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
if (!is_static && rc == may_rewrite) {
patch_bytecode(Bytecodes::_fast_igetfield, Rbc, Rscratch);
}
- __ beq(CCR2, Lacquire); // Volatile?
+ __ beq(CR2, Lacquire); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ align(32, 28, 28); // Align load.
@@ -2685,7 +2684,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
if (!is_static && rc == may_rewrite) {
patch_bytecode(Bytecodes::_fast_lgetfield, Rbc, Rscratch);
}
- __ beq(CCR2, Lacquire); // Volatile?
+ __ beq(CR2, Lacquire); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ align(32, 28, 28); // Align load.
@@ -2699,7 +2698,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
if (!is_static && rc == may_rewrite) {
patch_bytecode(Bytecodes::_fast_bgetfield, Rbc, Rscratch);
}
- __ beq(CCR2, Lacquire); // Volatile?
+ __ beq(CR2, Lacquire); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ align(32, 28, 28); // Align load.
@@ -2713,7 +2712,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
// use btos rewriting, no truncating to t/f bit is needed for getfield.
patch_bytecode(Bytecodes::_fast_bgetfield, Rbc, Rscratch);
}
- __ beq(CCR2, Lacquire); // Volatile?
+ __ beq(CR2, Lacquire); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ align(32, 28, 28); // Align load.
@@ -2726,7 +2725,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
if (!is_static && rc == may_rewrite) {
patch_bytecode(Bytecodes::_fast_cgetfield, Rbc, Rscratch);
}
- __ beq(CCR2, Lacquire); // Volatile?
+ __ beq(CR2, Lacquire); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ align(32, 28, 28); // Align load.
@@ -2739,7 +2738,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
if (!is_static && rc == may_rewrite) {
patch_bytecode(Bytecodes::_fast_sgetfield, Rbc, Rscratch);
}
- __ beq(CCR2, Lacquire); // Volatile?
+ __ beq(CR2, Lacquire); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ align(32, 28, 28); // Align load.
@@ -2754,7 +2753,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
if (!is_static && rc == may_rewrite) {
patch_bytecode(Bytecodes::_fast_agetfield, Rbc, Rscratch);
}
- __ beq(CCR2, Lacquire); // Volatile?
+ __ beq(CR2, Lacquire); // Volatile?
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
__ align(32, 12);
@@ -2797,8 +2796,8 @@ void TemplateTable::jvmti_post_field_mod(Register Rcache, Register Rscratch, boo
int offs = __ load_const_optimized(Rscratch, JvmtiExport::get_field_modification_count_addr(), R0, true);
__ lwz(Rscratch, offs, Rscratch);
- __ cmpwi(CCR0, Rscratch, 0);
- __ beq(CCR0, Lno_field_mod_post);
+ __ cmpwi(CR0, Rscratch, 0);
+ __ beq(CR0, Lno_field_mod_post);
// Do the post
const Register Robj = Rscratch;
@@ -2831,11 +2830,11 @@ void TemplateTable::jvmti_post_field_mod(Register Rcache, Register Rscratch, boo
// the type to determine where the object is.
__ lbz(Rtos_state, in_bytes(ResolvedFieldEntry::type_offset()), Rcache);
- __ cmpwi(CCR0, Rtos_state, ltos);
- __ cmpwi(CCR1, Rtos_state, dtos);
+ __ cmpwi(CR0, Rtos_state, ltos);
+ __ cmpwi(CR1, Rtos_state, dtos);
__ addi(base, R15_esp, Interpreter::expr_offset_in_bytes(1));
- __ crnor(CCR0, Assembler::equal, CCR1, Assembler::equal);
- __ beq(CCR0, is_one_slot);
+ __ crnor(CR0, Assembler::equal, CR1, Assembler::equal);
+ __ beq(CR0, is_one_slot);
__ addi(base, R15_esp, Interpreter::expr_offset_in_bytes(2));
__ bind(is_one_slot);
break;
@@ -2882,7 +2881,7 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static, RewriteContr
Rscratch2 = R12_scratch2, // used by load_field_cp_cache_entry
Rscratch3 = R6_ARG4,
Rbc = Rscratch3;
- const ConditionRegister CR_is_vol = CCR2; // Non-volatile condition register (survives runtime call in do_oop_store).
+ const ConditionRegister CR_is_vol = CR2; // Non-volatile condition register (survives runtime call in do_oop_store).
static address field_rw_branch_table[number_of_states],
field_norw_branch_table[number_of_states],
@@ -2908,8 +2907,8 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static, RewriteContr
#ifdef ASSERT
Label LFlagInvalid;
- __ cmpldi(CCR0, Rtos_state, number_of_states);
- __ bge(CCR0, LFlagInvalid);
+ __ cmpldi(CR0, Rtos_state, number_of_states);
+ __ bge(CR0, LFlagInvalid);
#endif
// Load from branch table and dispatch (volatile case: one instruction ahead).
@@ -3125,7 +3124,7 @@ void TemplateTable::fast_storefield(TosState state) {
Rscratch = R11_scratch1, // used by load_field_cp_cache_entry
Rscratch2 = R12_scratch2, // used by load_field_cp_cache_entry
Rscratch3 = R4_ARG2;
- const ConditionRegister CR_is_vol = CCR2; // Non-volatile condition register (survives runtime call in do_oop_store).
+ const ConditionRegister CR_is_vol = CR2; // Non-volatile condition register (survives runtime call in do_oop_store).
// Constant pool already resolved => Load flags and offset of field.
__ load_field_entry(Rcache, Rscratch);
@@ -3140,7 +3139,7 @@ void TemplateTable::fast_storefield(TosState state) {
if (!support_IRIW_for_not_multiple_copy_atomic_cpu) { __ cmpdi(CR_is_vol, Rscratch, 1); }
{
Label LnotVolatile;
- __ beq(CCR0, LnotVolatile);
+ __ beq(CR0, LnotVolatile);
__ release();
__ align(32, 12);
__ bind(LnotVolatile);
@@ -3220,7 +3219,7 @@ void TemplateTable::fast_accessfield(TosState state) {
// Get volatile flag.
__ rldicl_(Rscratch, Rflags, 64-ResolvedFieldEntry::is_volatile_shift, 63); // Extract volatile bit.
- __ bne(CCR0, LisVolatile);
+ __ bne(CR0, LisVolatile);
switch(bytecode()) {
case Bytecodes::_fast_agetfield:
@@ -3308,8 +3307,8 @@ void TemplateTable::fast_accessfield(TosState state) {
Label Ldummy;
if (support_IRIW_for_not_multiple_copy_atomic_cpu) { __ fence(); }
__ lfsx(F15_ftos, Rclass_or_obj, Roffset);
- __ fcmpu(CCR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
- __ bne_predict_not_taken(CCR0, Ldummy);
+ __ fcmpu(CR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
+ __ bne_predict_not_taken(CR0, Ldummy);
__ bind(Ldummy);
__ isync();
break;
@@ -3323,8 +3322,8 @@ void TemplateTable::fast_accessfield(TosState state) {
Label Ldummy;
if (support_IRIW_for_not_multiple_copy_atomic_cpu) { __ fence(); }
__ lfdx(F15_ftos, Rclass_or_obj, Roffset);
- __ fcmpu(CCR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
- __ bne_predict_not_taken(CCR0, Ldummy);
+ __ fcmpu(CR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
+ __ bne_predict_not_taken(CR0, Ldummy);
__ bind(Ldummy);
__ isync();
break;
@@ -3361,7 +3360,7 @@ void TemplateTable::fast_xaccess(TosState state) {
// Get volatile flag.
__ rldicl_(Rscratch, Rflags, 64-ResolvedFieldEntry::is_volatile_shift, 63); // Extract volatile bit.
- __ bne(CCR0, LisVolatile);
+ __ bne(CR0, LisVolatile);
switch(state) {
case atos:
@@ -3399,8 +3398,8 @@ void TemplateTable::fast_xaccess(TosState state) {
Label Ldummy;
if (support_IRIW_for_not_multiple_copy_atomic_cpu) { __ fence(); }
__ lfsx(F15_ftos, Rclass_or_obj, Roffset);
- __ fcmpu(CCR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
- __ bne_predict_not_taken(CCR0, Ldummy);
+ __ fcmpu(CR0, F15_ftos, F15_ftos); // Acquire by cmp-br-isync.
+ __ bne_predict_not_taken(CR0, Ldummy);
__ bind(Ldummy);
__ isync();
break;
@@ -3481,8 +3480,8 @@ void TemplateTable::invokevirtual(int byte_no) {
load_resolved_method_entry_virtual(Rcache, noreg, Rflags);
// Handle final method separately.
- __ testbitdi(CCR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
- __ bfalse(CCR0, LnotFinal);
+ __ testbitdi(CR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
+ __ bfalse(CR0, LnotFinal);
if (RewriteBytecodes && !CDSConfig::is_using_archive() && !CDSConfig::is_dumping_static_archive()) {
patch_bytecode(Bytecodes::_fast_invokevfinal, Rnew_bc, R12_scratch2);
@@ -3588,8 +3587,8 @@ void TemplateTable::invokeinterface_object_method(Register Rrecv_klass,
Label LnotFinal;
// Check for vfinal.
- __ testbitdi(CCR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
- __ bfalse(CCR0, LnotFinal);
+ __ testbitdi(CR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
+ __ bfalse(CR0, LnotFinal);
Register Rscratch = Rflags, // Rflags is dead now.
Rmethod = Rtemp2,
@@ -3642,8 +3641,8 @@ void TemplateTable::invokeinterface(int byte_no) {
// to handle this corner case.
Label LnotObjectMethod, Lthrow_ame;
- __ testbitdi(CCR0, R0, Rflags, ResolvedMethodEntry::is_forced_virtual_shift);
- __ bfalse(CCR0, LnotObjectMethod);
+ __ testbitdi(CR0, R0, Rflags, ResolvedMethodEntry::is_forced_virtual_shift);
+ __ bfalse(CR0, LnotObjectMethod);
invokeinterface_object_method(Rrecv_klass, Rret_addr, Rflags, Rcache, Rscratch1, Rscratch2);
__ bind(LnotObjectMethod);
@@ -3653,8 +3652,8 @@ void TemplateTable::invokeinterface(int byte_no) {
// Check for private method invocation - indicated by vfinal
Label LnotVFinal, L_no_such_interface, L_subtype;
- __ testbitdi(CCR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
- __ bfalse(CCR0, LnotVFinal);
+ __ testbitdi(CR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
+ __ bfalse(CR0, LnotVFinal);
__ check_klass_subtype(Rrecv_klass, Rinterface_klass, Rscratch1, Rscratch2, L_subtype);
// If we get here the typecheck failed
@@ -3688,8 +3687,8 @@ void TemplateTable::invokeinterface(int byte_no) {
__ lookup_interface_method(Rrecv_klass, Rinterface_klass, Rindex, Rmethod2, Rscratch1, Rscratch2,
L_no_such_interface);
- __ cmpdi(CCR0, Rmethod2, 0);
- __ beq(CCR0, Lthrow_ame);
+ __ cmpdi(CR0, Rmethod2, 0);
+ __ beq(CR0, Lthrow_ame);
// Found entry. Jump off!
// Argument and return type profiling.
__ profile_arguments_type(Rmethod2, Rscratch1, Rscratch2, true);
@@ -3796,8 +3795,8 @@ void TemplateTable::_new() {
__ addi(Rtags, Rtags, Array::base_offset_in_bytes());
__ lbzx(Rtags, Rindex, Rtags);
- __ cmpdi(CCR0, Rtags, JVM_CONSTANT_Class);
- __ bne(CCR0, Lslow_case);
+ __ cmpdi(CR0, Rtags, JVM_CONSTANT_Class);
+ __ bne(CR0, Lslow_case);
// Get instanceKlass
__ sldi(Roffset, Rindex, LogBytesPerWord);
@@ -3811,7 +3810,7 @@ void TemplateTable::_new() {
// Make sure klass is not abstract, or interface or java/lang/Class.
__ andi_(R0, Rinstance_size, Klass::_lh_instance_slow_path_bit); // slow path bit equals 0?
- __ bne(CCR0, Lslow_case);
+ __ bne(CR0, Lslow_case);
// --------------------------------------------------------------------------
// Fast case:
@@ -3830,8 +3829,8 @@ void TemplateTable::_new() {
__ add(RnewTopValue, Rinstance_size, RoldTopValue);
// If there is enough space, we do not CAS and do not clear.
- __ cmpld(CCR0, RnewTopValue, RendValue);
- __ bgt(CCR0, Lslow_case);
+ __ cmpld(CR0, RnewTopValue, RendValue);
+ __ bgt(CR0, Lslow_case);
__ std(RnewTopValue, in_bytes(JavaThread::tlab_top_offset()), R16_thread);
@@ -3948,8 +3947,8 @@ void TemplateTable::checkcast() {
Rtags = R12_scratch2;
// Null does not pass.
- __ cmpdi(CCR0, R17_tos, 0);
- __ beq(CCR0, Lis_null);
+ __ cmpdi(CR0, R17_tos, 0);
+ __ beq(CR0, Lis_null);
// Get constant pool tag to find out if the bytecode has already been "quickened".
__ get_cpool_and_tags(Rcpool, Rtags);
@@ -3959,8 +3958,8 @@ void TemplateTable::checkcast() {
__ addi(Rtags, Rtags, Array::base_offset_in_bytes());
__ lbzx(Rtags, Rtags, Roffset);
- __ cmpdi(CCR0, Rtags, JVM_CONSTANT_Class);
- __ beq(CCR0, Lquicked);
+ __ cmpdi(CR0, Rtags, JVM_CONSTANT_Class);
+ __ beq(CR0, Lquicked);
// Call into the VM to "quicken" instanceof.
__ push_ptr(); // for GC
@@ -4010,8 +4009,8 @@ void TemplateTable::instanceof() {
Rtags = R12_scratch2;
// Null does not pass.
- __ cmpdi(CCR0, R17_tos, 0);
- __ beq(CCR0, Lis_null);
+ __ cmpdi(CR0, R17_tos, 0);
+ __ beq(CR0, Lis_null);
// Get constant pool tag to find out if the bytecode has already been "quickened".
__ get_cpool_and_tags(Rcpool, Rtags);
@@ -4021,8 +4020,8 @@ void TemplateTable::instanceof() {
__ addi(Rtags, Rtags, Array::base_offset_in_bytes());
__ lbzx(Rtags, Rtags, Roffset);
- __ cmpdi(CCR0, Rtags, JVM_CONSTANT_Class);
- __ beq(CCR0, Lquicked);
+ __ cmpdi(CR0, Rtags, JVM_CONSTANT_Class);
+ __ beq(CR0, Lquicked);
// Call into the VM to "quicken" instanceof.
__ push_ptr(); // for GC
@@ -4128,8 +4127,8 @@ void TemplateTable::monitorenter() {
__ null_check_throw(Robj_to_lock, -1, Rscratch1);
// Check if any slot is present => short cut to allocation if not.
- __ cmpld(CCR0, Rcurrent_monitor, Rbot);
- __ beq(CCR0, Lallocate_new);
+ __ cmpld(CR0, Rcurrent_monitor, Rbot);
+ __ beq(CR0, Lallocate_new);
// ------------------------------------------------------------------------------
// Find a free slot in the monitor block.
@@ -4142,24 +4141,24 @@ void TemplateTable::monitorenter() {
__ ld(Rcurrent_obj, in_bytes(BasicObjectLock::obj_offset()), Rcurrent_monitor);
// Exit if current entry is for same object; this guarantees, that new monitor
// used for recursive lock is above the older one.
- __ cmpd(CCR0, Rcurrent_obj, Robj_to_lock);
- __ beq(CCR0, Lexit); // recursive locking
+ __ cmpd(CR0, Rcurrent_obj, Robj_to_lock);
+ __ beq(CR0, Lexit); // recursive locking
- __ cmpdi(CCR0, Rcurrent_obj, 0);
- __ bne(CCR0, LnotFree);
+ __ cmpdi(CR0, Rcurrent_obj, 0);
+ __ bne(CR0, LnotFree);
__ mr(Rfree_slot, Rcurrent_monitor); // remember free slot closest to the bottom
__ bind(LnotFree);
__ addi(Rcurrent_monitor, Rcurrent_monitor, frame::interpreter_frame_monitor_size_in_bytes());
- __ cmpld(CCR0, Rcurrent_monitor, Rbot);
- __ bne(CCR0, Lloop);
+ __ cmpld(CR0, Rcurrent_monitor, Rbot);
+ __ bne(CR0, Lloop);
__ bind(Lexit);
}
// ------------------------------------------------------------------------------
// Check if we found a free slot.
- __ cmpdi(CCR0, Rfree_slot, 0);
- __ bne(CCR0, Lfound);
+ __ cmpdi(CR0, Rfree_slot, 0);
+ __ bne(CR0, Lfound);
// We didn't find a free BasicObjLock => allocate one.
__ bind(Lallocate_new);
@@ -4207,8 +4206,8 @@ void TemplateTable::monitorexit() {
__ null_check_throw(Robj_to_lock, -1, Rscratch);
// Check corner case: unbalanced monitorEnter / Exit.
- __ cmpld(CCR0, Rcurrent_monitor, Rbot);
- __ beq(CCR0, Lillegal_monitor_state);
+ __ cmpld(CR0, Rcurrent_monitor, Rbot);
+ __ beq(CR0, Lillegal_monitor_state);
// Find the corresponding slot in the monitors stack section.
{
@@ -4217,12 +4216,12 @@ void TemplateTable::monitorexit() {
__ bind(Lloop);
__ ld(Rcurrent_obj, in_bytes(BasicObjectLock::obj_offset()), Rcurrent_monitor);
// Is this entry for same obj?
- __ cmpd(CCR0, Rcurrent_obj, Robj_to_lock);
- __ beq(CCR0, Lfound);
+ __ cmpd(CR0, Rcurrent_obj, Robj_to_lock);
+ __ beq(CR0, Lfound);
__ addi(Rcurrent_monitor, Rcurrent_monitor, frame::interpreter_frame_monitor_size_in_bytes());
- __ cmpld(CCR0, Rcurrent_monitor, Rbot);
- __ bne(CCR0, Lloop);
+ __ cmpld(CR0, Rcurrent_monitor, Rbot);
+ __ bne(CR0, Lloop);
}
// Fell through without finding the basic obj lock => throw up!
diff --git a/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp b/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp
index 40da31fa209..5c7b0067c3a 100644
--- a/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp
+++ b/src/hotspot/cpu/ppc/upcallLinker_ppc.cpp
@@ -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) 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,7 +22,6 @@
* questions.
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.hpp"
#include "logging/logStream.hpp"
@@ -168,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);
}
@@ -352,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 c1bdc1b1eb5..efe7fb9ad7b 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 9a4f13e41a0..8ec69bffe15 100644
--- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp
+++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp"
@@ -90,7 +89,7 @@ void VM_Version::initialize() {
default: break;
}
guarantee(PowerArchitecturePPC64_ok, "PowerArchitecturePPC64 cannot be set to "
- UINTX_FORMAT " on this machine", PowerArchitecturePPC64);
+ "%zu on this machine", PowerArchitecturePPC64);
// Power 8: Configure Data Stream Control Register.
if (PowerArchitecturePPC64 >= 8 && has_mfdscr()) {
@@ -132,6 +131,9 @@ void VM_Version::initialize() {
}
}
MaxVectorSize = SuperwordUseVSX ? 16 : 8;
+ if (FLAG_IS_DEFAULT(AlignVector)) {
+ FLAG_SET_ERGO(AlignVector, false);
+ }
if (PowerArchitecturePPC64 >= 9) {
if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstructionsPPC64)) {
diff --git a/src/hotspot/cpu/ppc/vmreg_ppc.cpp b/src/hotspot/cpu/ppc/vmreg_ppc.cpp
index e76a83bc269..d8a5c35cac0 100644
--- a/src/hotspot/cpu/ppc/vmreg_ppc.cpp
+++ b/src/hotspot/cpu/ppc/vmreg_ppc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "code/vmreg.hpp"
diff --git a/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp b/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp
index 567cfae8d0a..e25a8baa9da 100644
--- a/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. 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
@@ -23,7 +23,6 @@
*
*/
-#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "code/vtableStubs.hpp"
@@ -92,8 +91,8 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
// Check offset vs vtable length.
const Register vtable_len = R12_scratch2;
__ lwz(vtable_len, in_bytes(Klass::vtable_length_offset()), rcvr_klass);
- __ cmpwi(CCR0, vtable_len, vtable_index*vtableEntry::size());
- __ bge(CCR0, L);
+ __ cmpwi(CR0, vtable_len, vtable_index*vtableEntry::size());
+ __ bge(CR0, L);
__ li(R12_scratch2, vtable_index);
__ call_VM(noreg, CAST_FROM_FN_PTR(address, bad_compiled_vtable_index), R3_ARG1, R12_scratch2, false);
__ bind(L);
@@ -109,8 +108,8 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
#ifndef PRODUCT
if (DebugVtables) {
Label L;
- __ cmpdi(CCR0, R19_method, 0);
- __ bne(CCR0, L);
+ __ cmpdi(CR0, R19_method, 0);
+ __ bne(CR0, L);
__ stop("Vtable entry is ZERO");
__ bind(L);
}
@@ -195,8 +194,8 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
#ifndef PRODUCT
if (DebugVtables) {
Label ok;
- __ cmpdi(CCR0, R19_method, 0);
- __ bne(CCR0, ok);
+ __ cmpdi(CR0, R19_method, 0);
+ __ bne(CR0, ok);
__ stop("method is null");
__ bind(ok);
}
diff --git a/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp b/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp
index 7e7321501cb..00a6877684a 100644
--- a/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp
+++ b/src/hotspot/cpu/riscv/abstractInterpreter_riscv.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2023, 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.
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +24,6 @@
*
*/
-#include "precompiled.hpp"
#include "interpreter/interpreter.hpp"
#include "oops/constMethod.hpp"
#include "oops/klass.inline.hpp"
@@ -142,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.cpp b/src/hotspot/cpu/riscv/assembler_riscv.cpp
index 6a581a4d081..4659afc09b5 100644
--- a/src/hotspot/cpu/riscv/assembler_riscv.cpp
+++ b/src/hotspot/cpu/riscv/assembler_riscv.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +27,6 @@
#include
#include
-#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "compiler/disassembler.hpp"
diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp
index 31713d7362a..3c19673f1e7 100644
--- a/src/hotspot/cpu/riscv/assembler_riscv.hpp
+++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp
@@ -330,7 +330,150 @@ class InternalAddress: public Address {
};
class Assembler : public AbstractAssembler {
-public:
+protected:
+
+ static int zfa_zli_lookup_double(uint64_t value) {
+ switch(value) {
+ case 0xbff0000000000000 : return 0;
+ case 0x0010000000000000 : return 1;
+ case 0x3ef0000000000000 : return 2;
+ case 0x3f00000000000000 : return 3;
+ case 0x3f70000000000000 : return 4;
+ case 0x3f80000000000000 : return 5;
+ case 0x3fb0000000000000 : return 6;
+ case 0x3fc0000000000000 : return 7;
+ case 0x3fd0000000000000 : return 8;
+ case 0x3fd4000000000000 : return 9;
+ case 0x3fd8000000000000 : return 10;
+ case 0x3fdc000000000000 : return 11;
+ case 0x3fe0000000000000 : return 12;
+ case 0x3fe4000000000000 : return 13;
+ case 0x3fe8000000000000 : return 14;
+ case 0x3fec000000000000 : return 15;
+ case 0x3ff0000000000000 : return 16;
+ case 0x3ff4000000000000 : return 17;
+ case 0x3ff8000000000000 : return 18;
+ case 0x3ffc000000000000 : return 19;
+ case 0x4000000000000000 : return 20;
+ case 0x4004000000000000 : return 21;
+ case 0x4008000000000000 : return 22;
+ case 0x4010000000000000 : return 23;
+ case 0x4020000000000000 : return 24;
+ case 0x4030000000000000 : return 25;
+ case 0x4060000000000000 : return 26;
+ case 0x4070000000000000 : return 27;
+ case 0x40e0000000000000 : return 28;
+ case 0x40f0000000000000 : return 29;
+ case 0x7ff0000000000000 : return 30;
+ case 0x7ff8000000000000 : return 31;
+ default: break;
+ }
+ return -1;
+ }
+
+ static int zfa_zli_lookup_float(uint32_t value) {
+ switch(value) {
+ case 0xbf800000 : return 0;
+ case 0x00800000 : return 1;
+ case 0x37800000 : return 2;
+ case 0x38000000 : return 3;
+ case 0x3b800000 : return 4;
+ case 0x3c000000 : return 5;
+ case 0x3d800000 : return 6;
+ case 0x3e000000 : return 7;
+ case 0x3e800000 : return 8;
+ case 0x3ea00000 : return 9;
+ case 0x3ec00000 : return 10;
+ case 0x3ee00000 : return 11;
+ case 0x3f000000 : return 12;
+ case 0x3f200000 : return 13;
+ case 0x3f400000 : return 14;
+ case 0x3f600000 : return 15;
+ case 0x3f800000 : return 16;
+ case 0x3fa00000 : return 17;
+ case 0x3fc00000 : return 18;
+ case 0x3fe00000 : return 19;
+ case 0x40000000 : return 20;
+ case 0x40200000 : return 21;
+ case 0x40400000 : return 22;
+ case 0x40800000 : return 23;
+ case 0x41000000 : return 24;
+ case 0x41800000 : return 25;
+ case 0x43000000 : return 26;
+ case 0x43800000 : return 27;
+ case 0x47000000 : return 28;
+ case 0x47800000 : return 29;
+ case 0x7f800000 : return 30;
+ case 0x7fc00000 : return 31;
+ default: break;
+ }
+ 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;
+ }
+ uint32_t f_bits = (uint32_t)jint_cast(f);
+ return zfa_zli_lookup_float(f_bits) != -1;
+ }
+
+ static bool can_zfa_zli_double(jdouble d) {
+ if (!UseZfa) {
+ return false;
+ }
+ uint64_t d_bits = (uint64_t)julong_cast(d);
+ return zfa_zli_lookup_double(d_bits) != -1;
+ }
enum {
instruction_size = 4,
@@ -552,24 +695,6 @@ public:
#undef INSN
-#define INSN(NAME, op, funct3) \
- void NAME(FloatRegister Rd, Register Rs, const int32_t offset) { \
- guarantee(is_simm12(offset), "offset is invalid."); \
- unsigned insn = 0; \
- uint32_t val = offset & 0xfff; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, funct3); \
- patch_reg((address)&insn, 15, Rs); \
- patch_reg((address)&insn, 7, Rd); \
- patch((address)&insn, 31, 20, val); \
- emit(insn); \
- }
-
- INSN(flw, 0b0000111, 0b010);
- INSN(_fld, 0b0000111, 0b011);
-
-#undef INSN
-
#define INSN(NAME, op, funct3) \
void NAME(Register Rs1, Register Rs2, const int64_t offset) { \
guarantee(is_simm13(offset) && ((offset % 2) == 0), "offset is invalid."); \
@@ -813,29 +938,9 @@ enum operand_size { int8, int16, int32, uint32, int64 };
INSN(sc_d, 0b0101111, 0b011, 0b00011);
#undef INSN
-#define INSN(NAME, op, funct5, funct7) \
- void NAME(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, rm); \
- patch((address)&insn, 24, 20, funct5); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- emit(insn); \
- }
-
- INSN(fsqrt_s, 0b1010011, 0b00000, 0b0101100);
- INSN(fsqrt_d, 0b1010011, 0b00000, 0b0101101);
- INSN(fcvt_s_h, 0b1010011, 0b00010, 0b0100000);
- INSN(fcvt_h_s, 0b1010011, 0b00000, 0b0100010);
- INSN(fcvt_s_d, 0b1010011, 0b00001, 0b0100000);
- INSN(fcvt_d_s, 0b1010011, 0b00000, 0b0100001);
-#undef INSN
-
// Immediate Instruction
#define INSN(NAME, op, funct3) \
- void NAME(Register Rd, Register Rs1, int32_t imm) { \
+ void NAME(Register Rd, Register Rs1, int64_t imm) { \
guarantee(is_simm12(imm), "Immediate is out of validity"); \
unsigned insn = 0; \
patch((address)&insn, 6, 0, op); \
@@ -846,17 +951,17 @@ enum operand_size { int8, int16, int32, uint32, int64 };
emit(insn); \
}
- INSN(_addi, 0b0010011, 0b000);
- INSN(slti, 0b0010011, 0b010);
- INSN(_addiw, 0b0011011, 0b000);
- INSN(_and_imm12, 0b0010011, 0b111);
- INSN(ori, 0b0010011, 0b110);
- INSN(xori, 0b0010011, 0b100);
+ INSN(_addi, 0b0010011, 0b000);
+ INSN(_addiw, 0b0011011, 0b000);
+ INSN(_andi, 0b0010011, 0b111);
+ INSN(ori, 0b0010011, 0b110);
+ INSN(xori, 0b0010011, 0b100);
+ INSN(slti, 0b0010011, 0b010);
#undef INSN
#define INSN(NAME, op, funct3) \
- void NAME(Register Rd, Register Rs1, uint32_t imm) { \
+ void NAME(Register Rd, Register Rs1, uint64_t imm) { \
guarantee(is_uimm12(imm), "Immediate is out of validity"); \
unsigned insn = 0; \
patch((address)&insn,6, 0, op); \
@@ -928,209 +1033,503 @@ enum operand_size { int8, int16, int32, uint32, int64 };
#undef INSN
-// Float and Double Rigster Instruction
-#define INSN(NAME, op, funct2) \
- void NAME(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, rm); \
- patch((address)&insn, 26, 25, funct2); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- patch_reg((address)&insn, 20, Rs2); \
- patch_reg((address)&insn, 27, Rs3); \
- emit(insn); \
+// ==========================
+// Floating Point Instructions
+// ==========================
+ static constexpr uint32_t OP_FP_MAJOR = 0b1010011;
+
+ enum FmtPrecision : uint8_t {
+ S_32_sp = 0b00,
+ D_64_dp = 0b01,
+ H_16_hp = 0b10,
+ Q_128_qp = 0b11
+ };
+
+ private:
+
+ template
+ void fp_base(uint8_t Rd, uint8_t Rs1, uint8_t Rs2, RoundingMode rm) {
+ assert(Fmt != H_16_hp || UseZfh || UseZfhmin, "No half precision enabled");
+ assert_cond(Fmt != Q_128_qp);
+ guarantee(is_uimm3(rm), "Rounding mode is out of validity");
+ guarantee(is_uimm2(Fmt), "FMT is out of validity");
+ guarantee(is_uimm5(funct5), "Funct5 is out of validity");
+ uint32_t insn = 0;
+ patch((address)&insn, 6, 0, OP_FP_MAJOR);
+ patch((address)&insn, 11, 7, Rd);
+ patch((address)&insn, 14, 12, rm);
+ patch((address)&insn, 19, 15, Rs1);
+ patch((address)&insn, 24, 20, Rs2);
+ patch((address)&insn, 26, 25, Fmt);
+ patch((address)&insn, 31, 27, funct5);
+ emit(insn);
}
- INSN(fmadd_s, 0b1000011, 0b00);
- INSN(fmsub_s, 0b1000111, 0b00);
- INSN(fnmsub_s, 0b1001011, 0b00);
- INSN(fnmadd_s, 0b1001111, 0b00);
- INSN(fmadd_d, 0b1000011, 0b01);
- INSN(fmsub_d, 0b1000111, 0b01);
- INSN(fnmsub_d, 0b1001011, 0b01);
- INSN(fnmadd_d, 0b1001111, 0b01);
-
-#undef INSN
-
-// Float and Double Rigster Instruction
-#define INSN(NAME, op, funct3, funct7) \
- void NAME(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, funct3); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- patch_reg((address)&insn, 20, Rs2); \
- emit(insn); \
+ template
+ void fp_base(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm) {
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2->raw_encoding(), rm);
}
- INSN(fsgnj_s, 0b1010011, 0b000, 0b0010000);
- INSN(fsgnjn_s, 0b1010011, 0b001, 0b0010000);
- INSN(fsgnjx_s, 0b1010011, 0b010, 0b0010000);
- INSN(fmin_s, 0b1010011, 0b000, 0b0010100);
- INSN(fmax_s, 0b1010011, 0b001, 0b0010100);
- INSN(fsgnj_d, 0b1010011, 0b000, 0b0010001);
- INSN(fsgnjn_d, 0b1010011, 0b001, 0b0010001);
- INSN(fsgnjx_d, 0b1010011, 0b010, 0b0010001);
- INSN(fmin_d, 0b1010011, 0b000, 0b0010101);
- INSN(fmax_d, 0b1010011, 0b001, 0b0010101);
-
-#undef INSN
-
-// Float and Double Rigster Arith Instruction
-#define INSN(NAME, op, funct3, funct7) \
- void NAME(Register Rd, FloatRegister Rs1, FloatRegister Rs2) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, funct3); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- patch_reg((address)&insn, 20, Rs2); \
- emit(insn); \
+ template
+ void fp_base(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, int8_t rm) {
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2->raw_encoding(), (RoundingMode)rm);
}
- INSN(feq_s, 0b1010011, 0b010, 0b1010000);
- INSN(flt_s, 0b1010011, 0b001, 0b1010000);
- INSN(fle_s, 0b1010011, 0b000, 0b1010000);
- INSN(feq_d, 0b1010011, 0b010, 0b1010001);
- INSN(fle_d, 0b1010011, 0b000, 0b1010001);
- INSN(flt_d, 0b1010011, 0b001, 0b1010001);
-#undef INSN
-
-// Float and Double Arith Instruction
-#define INSN(NAME, op, funct7) \
- void NAME(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, rm); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- patch_reg((address)&insn, 20, Rs2); \
- emit(insn); \
+ template
+ void fp_base(Register Rd, FloatRegister Rs1, FloatRegister Rs2, int8_t rm) {
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2->raw_encoding(), (RoundingMode)rm);
}
- INSN(fadd_s, 0b1010011, 0b0000000);
- INSN(fsub_s, 0b1010011, 0b0000100);
- INSN(fmul_s, 0b1010011, 0b0001000);
- INSN(fdiv_s, 0b1010011, 0b0001100);
- INSN(fadd_d, 0b1010011, 0b0000001);
- INSN(fsub_d, 0b1010011, 0b0000101);
- INSN(fmul_d, 0b1010011, 0b0001001);
- INSN(fdiv_d, 0b1010011, 0b0001101);
-
-#undef INSN
-
-// Whole Float and Double Conversion Instruction
-#define INSN(NAME, op, funct5, funct7) \
- void NAME(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, rm); \
- patch((address)&insn, 24, 20, funct5); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- emit(insn); \
+ template
+ void fp_base(FloatRegister Rd, FloatRegister Rs1, int8_t Rs2, int8_t rm) {
+ guarantee(is_uimm5(Rs2), "Rs2 is out of validity");
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2, (RoundingMode)rm);
}
- INSN(fcvt_s_w, 0b1010011, 0b00000, 0b1101000);
- INSN(fcvt_s_wu, 0b1010011, 0b00001, 0b1101000);
- INSN(fcvt_s_l, 0b1010011, 0b00010, 0b1101000);
- INSN(fcvt_s_lu, 0b1010011, 0b00011, 0b1101000);
- INSN(fcvt_d_w, 0b1010011, 0b00000, 0b1101001);
- INSN(fcvt_d_wu, 0b1010011, 0b00001, 0b1101001);
- INSN(fcvt_d_l, 0b1010011, 0b00010, 0b1101001);
- INSN(fcvt_d_lu, 0b1010011, 0b00011, 0b1101001);
-
-#undef INSN
-
-// Float and Double Conversion Instruction
-#define INSN(NAME, op, funct5, funct7) \
- void NAME(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, rm); \
- patch((address)&insn, 24, 20, funct5); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- emit(insn); \
+ template
+ void fp_base(FloatRegister Rd, Register Rs1, FloatRegister Rs2, RoundingMode rm) {
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2->raw_encoding(), rm);
}
- INSN(fcvt_w_s, 0b1010011, 0b00000, 0b1100000);
- INSN(fcvt_l_s, 0b1010011, 0b00010, 0b1100000);
- INSN(fcvt_wu_s, 0b1010011, 0b00001, 0b1100000);
- INSN(fcvt_lu_s, 0b1010011, 0b00011, 0b1100000);
- INSN(fcvt_w_d, 0b1010011, 0b00000, 0b1100001);
- INSN(fcvt_wu_d, 0b1010011, 0b00001, 0b1100001);
- INSN(fcvt_l_d, 0b1010011, 0b00010, 0b1100001);
- INSN(fcvt_lu_d, 0b1010011, 0b00011, 0b1100001);
-
-#undef INSN
-
-// Float and Double Move Instruction
-#define INSN(NAME, op, funct3, funct5, funct7) \
- void NAME(FloatRegister Rd, Register Rs1) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, funct3); \
- patch((address)&insn, 20, funct5); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- emit(insn); \
+ template
+ void fp_base(Register Rd, FloatRegister Rs1, uint8_t Rs2, RoundingMode rm) {
+ guarantee(is_uimm5(Rs2), "Rs2 is out of validity");
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2, rm);
}
- INSN(fmv_h_x, 0b1010011, 0b000, 0b00000, 0b1111010);
- INSN(fmv_w_x, 0b1010011, 0b000, 0b00000, 0b1111000);
- INSN(fmv_d_x, 0b1010011, 0b000, 0b00000, 0b1111001);
-
-#undef INSN
-
-enum fclass_mask {
- minf = 1 << 0, // negative infinite
- mnorm = 1 << 1, // negative normal number
- msubnorm = 1 << 2, // negative subnormal number
- mzero = 1 << 3, // negative zero
- pzero = 1 << 4, // positive zero
- psubnorm = 1 << 5, // positive subnormal number
- pnorm = 1 << 6, // positive normal number
- pinf = 1 << 7, // positive infinite
- snan = 1 << 8, // signaling NaN
- qnan = 1 << 9, // quiet NaN
- zero = mzero | pzero,
- subnorm = msubnorm | psubnorm,
- norm = mnorm | pnorm,
- inf = minf | pinf,
- nan = snan | qnan,
- finite = zero | subnorm | norm,
-};
-
-// Float and Double Conversion/Classify Instruction
-#define INSN(NAME, op, funct3, funct5, funct7) \
- void NAME(Register Rd, FloatRegister Rs1) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, op); \
- patch((address)&insn, 14, 12, funct3); \
- patch((address)&insn, 20, funct5); \
- patch((address)&insn, 31, 25, funct7); \
- patch_reg((address)&insn, 7, Rd); \
- patch_reg((address)&insn, 15, Rs1); \
- emit(insn); \
+ template
+ void fp_base(Register Rd, FloatRegister Rs1, uint8_t Rs2, uint8_t rm) {
+ guarantee(is_uimm5(Rs2), "Rs2 is out of validity");
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2, (RoundingMode)rm);
}
- INSN(fclass_h, 0b1010011, 0b001, 0b00000, 0b1110010);
- INSN(fclass_s, 0b1010011, 0b001, 0b00000, 0b1110000);
- INSN(fclass_d, 0b1010011, 0b001, 0b00000, 0b1110001);
- INSN(fmv_x_h, 0b1010011, 0b000, 0b00000, 0b1110010);
- INSN(fmv_x_w, 0b1010011, 0b000, 0b00000, 0b1110000);
- INSN(fmv_x_d, 0b1010011, 0b000, 0b00000, 0b1110001);
+ template
+ void fp_base(FloatRegister Rd, Register Rs1, uint8_t Rs2, RoundingMode rm) {
+ guarantee(is_uimm5(Rs2), "Rs2 is out of validity");
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2, rm);
+ }
-#undef INSN
+ template
+ void fp_base(FloatRegister Rd, Register Rs1, uint8_t Rs2, int8_t rm) {
+ guarantee(is_uimm5(Rs2), "Rs2 is out of validity");
+ fp_base(Rd->raw_encoding(), Rs1->raw_encoding(), Rs2, (RoundingMode)rm);
+ }
+
+ template
+ void fp_base(FloatRegister Rd, uint8_t Rs1, uint8_t Rs2, int8_t rm) {
+ guarantee(is_uimm5(Rs1), "Rs1 is out of validity");
+ guarantee(is_uimm5(Rs2), "Rs2 is out of validity");
+ fp_base(Rd->raw_encoding(), Rs1, Rs2, (RoundingMode)rm);
+ }
+
+ public:
+
+ enum FClassBits {
+ minf = 1 << 0, // negative infinite
+ mnorm = 1 << 1, // negative normal number
+ msubnorm = 1 << 2, // negative subnormal number
+ mzero = 1 << 3, // negative zero
+ pzero = 1 << 4, // positive zero
+ psubnorm = 1 << 5, // positive subnormal number
+ pnorm = 1 << 6, // positive normal number
+ pinf = 1 << 7, // positive infinite
+ snan = 1 << 8, // signaling NaN
+ qnan = 1 << 9, // quiet NaN
+ zero = mzero | pzero,
+ subnorm = msubnorm | psubnorm,
+ norm = mnorm | pnorm,
+ inf = minf | pinf,
+ nan = snan | qnan,
+ finite = zero | subnorm | norm,
+ };
+
+ void fsqrt_s(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fsqrt_d(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fcvt_s_d(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00001, rm);
+ }
+
+ void fcvt_d_s(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fsgnj_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b000);
+ }
+
+ void fsgnjn_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b001);
+ }
+
+ void fsgnjx_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b010);
+ }
+
+ void fmin_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b000);
+ }
+
+ void fmax_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b001);
+ }
+
+ void fsgnj_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b000);
+ }
+
+ void fsgnjn_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b001);
+ }
+
+ void fsgnjx_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b010);
+ }
+
+ void fmin_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b000);
+ }
+
+ void fmax_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b001);
+ }
+
+ void feq_s(Register Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b010);
+ }
+
+ void flt_s(Register Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b001);
+ }
+
+ void fle_s(Register Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b000);
+ }
+
+ void feq_d(Register Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b010);
+ }
+
+ void fle_d(Register Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b000);
+ }
+
+ void flt_d(Register Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ fp_base(Rd, Rs1, Rs2, 0b001);
+ }
+
+ void fadd_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fsub_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fmul_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fdiv_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fadd_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fsub_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fmul_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fdiv_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, Rs2, rm);
+ }
+
+ void fcvt_s_w(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fcvt_s_wu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00001, rm);
+ }
+
+ void fcvt_s_l(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00010, rm);
+ }
+
+ void fcvt_s_lu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00011, rm);
+ }
+
+ void fcvt_d_w(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fcvt_d_wu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00001, rm);
+ }
+
+ void fcvt_d_l(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00010, rm);
+ }
+
+ void fcvt_d_lu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) {
+ fp_base(Rd, Rs1, 0b00011, rm);
+ }
+
+ void fcvt_w_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fcvt_l_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00010, rm);
+ }
+
+ void fcvt_wu_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00001, rm);
+ }
+
+ void fcvt_lu_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00011, rm);
+ }
+
+ void fcvt_w_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fcvt_wu_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00001, rm);
+ }
+
+ void fcvt_l_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00010, rm);
+ }
+
+ void fcvt_lu_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) {
+ fp_base(Rd, Rs1, 0b00011, rm);
+ }
+
+ void fmv_w_x(FloatRegister Rd, Register Rs1) {
+ fp_base(Rd, Rs1, 0b00000, 0b000);
+ }
+
+ void fmv_d_x(FloatRegister Rd, Register Rs1) {
+ fp_base(Rd, Rs1, 0b00000, 0b000);
+ }
+
+ void fclass_s(Register Rd, FloatRegister Rs1) {
+ fp_base(Rd, Rs1, 0b00000, 0b001);
+ }
+
+ void fclass_d(Register Rd, FloatRegister Rs1) {
+ fp_base(Rd, Rs1, 0b00000, 0b001);
+ }
+
+ void fmv_x_w(Register Rd, FloatRegister Rs1) {
+ fp_base(Rd, Rs1, 0b00000, 0b000);
+ }
+
+ void fmv_x_d(Register Rd, FloatRegister Rs1) {
+ fp_base(Rd, Rs1, 0b00000, 0b000);
+ }
+
+ private:
+ static constexpr unsigned int OP_LOAD_FP = 0b0000111;
+
+ template
+ void fp_load(FloatRegister Rd, Register Rs, const int32_t offset) {
+ guarantee(is_uimm3(FpWidth), "Rounding mode is out of validity");
+ guarantee(is_simm12(offset), "offset is invalid.");
+ unsigned insn = 0;
+ uint32_t val = offset & 0xfff;
+ patch((address)&insn, 6, 0, OP_LOAD_FP);
+ patch_reg((address)&insn, 7, Rd);
+ patch((address)&insn, 14, 12, FpWidth);
+ patch_reg((address)&insn, 15, Rs);
+ patch((address)&insn, 31, 20, val);
+ emit(insn);
+ }
+
+ 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); }
+
+ private:
+ template
+ void fp_fm(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm) {
+ assert_cond(Fmt != Q_128_qp);
+ guarantee(is_uimm3(rm), "Rounding mode is out of validity");
+ guarantee(is_uimm2(Fmt), "FMT is out of validity");
+ unsigned insn = 0;
+ patch((address)&insn, 6, 0, OpVal);
+ patch_reg((address)&insn, 7, Rd);
+ patch((address)&insn, 14, 12, rm);
+ patch_reg((address)&insn, 15, Rs1);
+ patch_reg((address)&insn, 20, Rs2);
+ patch((address)&insn, 26, 25, Fmt);
+ patch_reg((address)&insn, 27, Rs3);
+ emit(insn);
+ }
+
+ public:
+ void fmadd_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+ void fmsub_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+ void fnmsub_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+ void fnmadd_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+ void fmadd_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+ void fmsub_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+ void fnmsub_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+ void fnmadd_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) {
+ fp_fm(Rd, Rs1, Rs2, Rs3, rm);
+ }
+
+// -------------- ZFH Instruction Definitions --------------
+// Zfh Standard Extensions for Half-Precision Floating-Point
+ void fclass_h(Register Rd, FloatRegister Rs1) {
+ assert_cond(UseZfh);
+ fp_base(Rd, Rs1, 0b00000, 0b001);
+ }
+
+// Zfh and Zfhmin Half-Precision Floating-Point
+ void fcvt_s_h(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) {
+ assert_cond(UseZfh || UseZfhmin);
+ fp_base(Rd, Rs1, 0b00010, rm);
+ }
+
+ void fcvt_h_s(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) {
+ assert_cond(UseZfh || UseZfhmin);
+ fp_base(Rd, Rs1, 0b00000, rm);
+ }
+
+ void fmv_h_x(FloatRegister Rd, Register Rs1) {
+ assert_cond(UseZfh || UseZfhmin);
+ fp_base(Rd, Rs1, 0b00000, 0b000);
+ }
+
+ void fmv_x_h(Register Rd, FloatRegister Rs1) {
+ assert_cond(UseZfh || UseZfhmin);
+ 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);
+ }
+
+ void _fli_d(FloatRegister Rd, uint8_t Rs1) {
+ assert_cond(UseZfa);
+ 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(Rd, Rs1, Rs2, 0b011);
+ }
+
+ void fminm_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfa);
+ fp_base(Rd, Rs1, Rs2, 0b010);
+ }
+
+ void fmaxm_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfa);
+ fp_base(Rd, Rs1, Rs2, 0b011);
+ }
+
+ void fminm_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfa);
+ fp_base(Rd, Rs1, Rs2, 0b010);
+ }
+
+ void fmaxm_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) {
+ assert_cond(UseZfa);
+ fp_base(Rd, Rs1, Rs2, 0b011);
+ }
// ==========================
// RISC-V Vector Extension
@@ -2015,10 +2414,10 @@ enum Nf {
}
INSN(add_uw, 0b0111011, 0b000, 0b0000100);
- INSN(rol, 0b0110011, 0b001, 0b0110000);
- INSN(rolw, 0b0111011, 0b001, 0b0110000);
- INSN(ror, 0b0110011, 0b101, 0b0110000);
- INSN(rorw, 0b0111011, 0b101, 0b0110000);
+ INSN(rolr, 0b0110011, 0b001, 0b0110000);
+ INSN(rolrw, 0b0111011, 0b001, 0b0110000);
+ INSN(rorr, 0b0110011, 0b101, 0b0110000);
+ INSN(rorrw, 0b0111011, 0b101, 0b0110000);
INSN(sh1add, 0b0110011, 0b010, 0b0010000);
INSN(sh2add, 0b0110011, 0b100, 0b0010000);
INSN(sh3add, 0b0110011, 0b110, 0b0010000);
@@ -2046,6 +2445,7 @@ enum Nf {
emit(insn); \
}
+ INSN(brev8, 0b0010011, 0b101, 0b011010000111);
INSN(rev8, 0b0010011, 0b101, 0b011010111000);
INSN(_sext_b, 0b0010011, 0b001, 0b011000000100);
INSN(_sext_h, 0b0010011, 0b001, 0b011000000101);
@@ -2230,7 +2630,7 @@ public:
}
#define INSN(NAME, funct3, op) \
- void NAME(Register Rd_Rs1, int32_t imm) { \
+ void NAME(Register Rd_Rs1, int64_t imm) { \
assert_cond(is_simm6(imm)); \
uint16_t insn = 0; \
c_patch((address)&insn, 1, 0, op); \
@@ -2247,7 +2647,7 @@ public:
#undef INSN
#define INSN(NAME, funct3, op) \
- void NAME(int32_t imm) { \
+ void NAME(int64_t imm) { \
assert_cond(is_simm10(imm)); \
assert_cond((imm & 0b1111) == 0); \
assert_cond(imm != 0); \
@@ -2268,7 +2668,7 @@ public:
#undef INSN
#define INSN(NAME, funct3, op) \
- void NAME(Register Rd, uint32_t uimm) { \
+ void NAME(Register Rd, uint64_t uimm) { \
assert_cond(is_uimm10(uimm)); \
assert_cond((uimm & 0b11) == 0); \
assert_cond(uimm != 0); \
@@ -2325,7 +2725,7 @@ public:
#undef INSN
#define INSN(NAME, funct3, funct2, op) \
- void NAME(Register Rd_Rs1, int32_t imm) { \
+ void NAME(Register Rd_Rs1, int64_t imm) { \
assert_cond(is_simm6(imm)); \
uint16_t insn = 0; \
c_patch((address)&insn, 1, 0, op); \
@@ -2950,7 +3350,7 @@ public:
// Immediate Instructions
// --------------------------
#define INSN(NAME) \
- void NAME(Register Rd, Register Rs1, int32_t imm) { \
+ void NAME(Register Rd, Register Rs1, int64_t imm) { \
/* addi -> c.addi/c.nop/c.mv/c.addi16sp/c.addi4spn */ \
if (do_compress()) { \
if (Rd == Rs1 && is_simm6(imm)) { \
@@ -2978,7 +3378,7 @@ public:
// --------------------------
#define INSN(NAME) \
- void NAME(Register Rd, Register Rs1, int32_t imm) { \
+ void NAME(Register Rd, Register Rs1, int64_t imm) { \
/* addiw -> c.addiw */ \
if (do_compress() && (Rd == Rs1 && Rd != x0 && is_simm6(imm))) { \
c_addiw(Rd, imm); \
@@ -2993,17 +3393,17 @@ public:
// --------------------------
#define INSN(NAME) \
- void NAME(Register Rd, Register Rs1, int32_t imm) { \
- /* and_imm12 -> c.andi */ \
+ void NAME(Register Rd, Register Rs1, int64_t imm) { \
+ /* andi -> c.andi */ \
if (do_compress() && \
(Rd == Rs1 && Rd->is_compressed_valid() && is_simm6(imm))) { \
c_andi(Rd, imm); \
return; \
} \
- _and_imm12(Rd, Rs1, imm); \
+ _andi(Rd, Rs1, imm); \
}
- INSN(and_imm12);
+ INSN(andi);
#undef INSN
@@ -3070,42 +3470,63 @@ public:
#undef INSN
// Cache Management Operations
-#define INSN(NAME, funct) \
- void NAME(Register Rs1) { \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, 0b0001111); \
- patch((address)&insn, 14, 12, 0b010); \
- patch_reg((address)&insn, 15, Rs1); \
- patch((address)&insn, 31, 20, funct); \
- emit(insn); \
+// These instruction may be turned off for user space.
+ private:
+ enum CBO_FUNCT : unsigned int {
+ CBO_INVAL = 0b0000000000000,
+ CBO_CLEAN = 0b0000000000001,
+ CBO_FLUSH = 0b0000000000010,
+ CBO_ZERO = 0b0000000000100
+ };
+
+ template
+ void cbo_base(Register Rs1) {
+ assert((UseZicbom && FUNCT != CBO_ZERO) || UseZicboz, "sanity");
+ unsigned insn = 0;
+ patch((address)&insn, 6, 0, 0b0001111);
+ patch((address)&insn, 14, 12, 0b010);
+ patch_reg((address)&insn, 15, Rs1);
+ patch((address)&insn, 31, 20, FUNCT);
+ emit(insn);
}
- INSN(cbo_inval, 0b0000000000000);
- INSN(cbo_clean, 0b0000000000001);
- INSN(cbo_flush, 0b0000000000010);
- INSN(cbo_zero, 0b0000000000100);
+ // This instruction have some security implication.
+ // At this time it's not likely to be enabled for user mode.
+ void cbo_inval(Register Rs1) { cbo_base(Rs1); }
+ public:
+ // Zicbom
+ void cbo_clean(Register Rs1) { cbo_base(Rs1); }
+ void cbo_flush(Register Rs1) { cbo_base(Rs1); }
+ // Zicboz
+ void cbo_zero(Register Rs1) { cbo_base(Rs1); }
-#undef INSN
+ private:
+ enum PREFETCH_FUNCT : unsigned int {
+ PREFETCH_I = 0b0000000000000,
+ PREFETCH_R = 0b0000000000001,
+ PREFETCH_W = 0b0000000000011
+ };
-#define INSN(NAME, funct) \
- void NAME(Register Rs1, int32_t offset) { \
- guarantee((offset & 0x1f) == 0, "offset lowest 5 bits must be zero"); \
- int32_t upperOffset = offset >> 5; \
- unsigned insn = 0; \
- patch((address)&insn, 6, 0, 0b0010011); \
- patch((address)&insn, 14, 12, 0b110); \
- patch_reg((address)&insn, 15, Rs1); \
- patch((address)&insn, 24, 20, funct); \
- upperOffset &= 0x7f; \
- patch((address)&insn, 31, 25, upperOffset); \
- emit(insn); \
+ template
+ void prefetch_base(Register Rs1, int32_t offset) {
+ assert_cond(UseZicbop);
+ guarantee((offset & 0x1f) == 0, "offset lowest 5 bits must be zero");
+ int32_t upperOffset = offset >> 5;
+ unsigned insn = 0;
+ patch((address)&insn, 6, 0, 0b0010011);
+ patch((address)&insn, 14, 12, 0b110);
+ patch_reg((address)&insn, 15, Rs1);
+ patch((address)&insn, 24, 20, FUNCT);
+ upperOffset &= 0x7f;
+ patch((address)&insn, 31, 25, upperOffset);
+ emit(insn);
}
- INSN(prefetch_i, 0b0000000000000);
- INSN(prefetch_r, 0b0000000000001);
- INSN(prefetch_w, 0b0000000000011);
-
-#undef INSN
+ public:
+ // Zicbop
+ void prefetch_i(Register Rs1, int32_t offset) { prefetch_base