Skip to content
forked from openjdk/jdk

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
theaoqi committed Mar 8, 2023
2 parents ea5c4ce + 638d612 commit b1a571e
Show file tree
Hide file tree
Showing 454 changed files with 12,745 additions and 6,482 deletions.
3 changes: 3 additions & 0 deletions make/autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ JDKOPT_SETUP_ADDRESS_SANITIZER
# UndefinedBehaviorSanitizer
JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER

# LeakSanitizer
JDKOPT_SETUP_LEAK_SANITIZER

###############################################################################
#
# Check dependencies for external and internal libraries.
Expand Down
33 changes: 33 additions & 0 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,39 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
AC_SUBST(ASAN_ENABLED)
])

###############################################################################
#
# LeakSanitizer
#
AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
[
UTIL_ARG_ENABLE(NAME: lsan, DEFAULT: false, RESULT: LSAN_ENABLED,
DESC: [enable LeakSanitizer],
CHECK_AVAILABLE: [
AC_MSG_CHECKING([if LeakSanitizer (lsan) is available])
if test "x$TOOLCHAIN_TYPE" = "xgcc" ||
test "x$TOOLCHAIN_TYPE" = "xclang"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AVAILABLE=false
fi
],
IF_ENABLED: [
LSAN_CFLAGS="-fsanitize=leak -fno-omit-frame-pointer -DLEAK_SANITIZER"
LSAN_LDFLAGS="-fsanitize=leak"
JVM_CFLAGS="$JVM_CFLAGS $LSAN_CFLAGS"
JVM_LDFLAGS="$JVM_LDFLAGS $LSAN_LDFLAGS"
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $LSAN_CFLAGS"
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $LSAN_CFLAGS"
CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $LSAN_CFLAGS"
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $LSAN_CFLAGS"
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $LSAN_LDFLAGS"
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $LSAN_LDFLAGS"
])
AC_SUBST(LSAN_ENABLED)
])

###############################################################################
#
# UndefinedBehaviorSanitizer
Expand Down
3 changes: 3 additions & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ JCOV_FILTERS=@JCOV_FILTERS@
# AddressSanitizer
ASAN_ENABLED:=@ASAN_ENABLED@

# LeakSanitizer
LSAN_ENABLED:=@LSAN_ENABLED@

# UndefinedBehaviorSanitizer
UBSAN_ENABLED:=@UBSAN_ENABLED@
UBSAN_CFLAGS:=@UBSAN_CFLAGS@
Expand Down
4 changes: 4 additions & 0 deletions make/common/modules/LauncherCommon.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ define SetupBuildLauncherBody
$1_EXTRA_FILES += $(TOPDIR)/make/data/asan/asan_default_options.c
endif

ifeq ($(LSAN_ENABLED), true)
$1_EXTRA_FILES += $(TOPDIR)/make/data/lsan/lsan_default_options.c
endif

$$(eval $$(call SetupJdkExecutable, BUILD_LAUNCHER_$1, \
NAME := $1, \
EXTRA_FILES := $$($1_EXTRA_FILES), \
Expand Down
16 changes: 15 additions & 1 deletion make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,20 @@ var getJibProfilesProfiles = function (input, common, data) {
};
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra);
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra);
} else if (input.build_os == "windows") {
// On windows, add the devkit debugger to the path in all the run-test profiles
// to make them available to the jtreg failure handler.
var archDir = "x64";
if (input.build_arch == "aarch64") {
archDir = "arm64"
}
windowsRunTestExtra = {
environment_path: [
input.get("devkit", "install_path") + "/10/Debuggers/" + archDir
]
}
profiles["run-test"] = concatObjects(profiles["run-test"], windowsRunTestExtra);
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], windowsRunTestExtra);
}

// The profile run-test-prebuilt defines src.conf as the src bundle. When
Expand Down Expand Up @@ -1051,7 +1065,7 @@ var getJibProfilesDependencies = function (input, common) {
var devkit_platform_revisions = {
linux_x64: "gcc11.2.0-OL6.4+1.0",
macosx: "Xcode12.4+1.1",
windows_x64: "VS2022-17.1.0+1.0",
windows_x64: "VS2022-17.1.0+1.1",
linux_aarch64: "gcc11.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
Expand Down
14 changes: 11 additions & 3 deletions make/data/asan/asan_default_options.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Google and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -50,8 +50,16 @@
// used. You can override these options by setting the environment variable ASAN_OPTIONS.
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __asan_default_options() {
return
#ifndef LEAK_SANITIZER
#ifdef LEAK_SANITIZER
"leak_check_at_exit=0,"
#else
// ASan bundles LSan, however we only support LSan when it is explicitly requested during
// configuration. Thus we disable it to match if it was not requested.
"detect_leaks=0,"
#endif
"handle_segv=0";
"print_suppressions=0,"
"handle_segv=0,"
// See https://github.com/google/sanitizers/issues/1322. Hopefully this is resolved
// at some point and we can remove this option.
"intercept_tls_get_addr=0";
}
2 changes: 1 addition & 1 deletion make/data/asan/asan_default_options.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Google and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down
67 changes: 67 additions & 0 deletions make/data/lsan/lsan_default_options.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright (c) 2023, Google and/or its affiliates. All rights reserved.
* 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.
*/

#ifndef LEAK_SANITIZER
#error "Build misconfigured, preprocessor macro LEAK_SANITIZER should be defined"
#endif

#ifndef __has_attribute
#define __has_attribute(x) 0
#endif

#if (defined(__GNUC__) && !defined(__clang__)) || __has_attribute(visibility)
#define ATTRIBUTE_DEFAULT_VISIBILITY __attribute__((visibility("default")))
#else
#define ATTRIBUTE_DEFAULT_VISIBILITY
#endif

#if (defined(__GNUC__) && !defined(__clang__)) || __has_attribute(used)
#define ATTRIBUTE_USED __attribute__((used))
#else
#define ATTRIBUTE_USED
#endif

// Override weak symbol exposed by LSan to override default options. This is called by LSan
// extremely early during library loading, before main is called. We need to override the default
// options because LSan will perform leak checking at program exit. Unfortunately Hotspot does not
// shutdown cleanly at the moment and some leaks occur, we want to ignore these. Instead we
// explicitly perform leak checking early during JVM shutdown.
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __lsan_default_options() {
return
"print_suppressions=0,"
"leak_check_at_exit=0,"
// See https://github.com/google/sanitizers/issues/1322. Hopefully this is resolved
// at some point and we can remove this option.
"intercept_tls_get_addr=0";
}

// Override weak symbol exposed by LSan to override default suppressions. This is called by LSan
// extremely early during library loading, before main is called.
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __lsan_default_suppressions() {
return
// Remove after JDK-8297688 is resolved.
"leak:^JLI_MemAlloc$\n"
"leak:^JLI_StringDup$\n";
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Google and/or its affiliates. All rights reserved.
* 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
Expand All @@ -21,13 +23,8 @@
* questions.
*/

#include "native_thread.cpp"
#include "nsk_tools.cpp"
#include "jni_tools.cpp"
#include "jvmti_tools.cpp"
#include "agent_tools.cpp"
#include "jvmti_FollowRefObjects.cpp"
#include "Injector.cpp"
#include "JVMTITools.cpp"
#include "agent_common.cpp"
#include "allthr002.cpp"
extern "C" {

#include "./lsan_default_options.c"

} // extern "C"
25 changes: 21 additions & 4 deletions make/devkit/createWindowsDevkit.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand All @@ -26,6 +26,12 @@

# This script copies parts of a Visual Studio installation into a devkit
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin or WSL.
#
# To include the debugger tools for the jtreg failure_handler, those need to
# be explicitly added to the Windows SDK installation first. That is done
# through Windows Settings - Apps, find the Windows Software Development Kit
# installation, click modify, and add the debugger tools.
#
# [email protected]

usage_and_exit() {
Expand Down Expand Up @@ -197,6 +203,17 @@ mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist
cp -r "$SDK_INSTALL_DIR/Redist/$UCRT_VERSION/ucrt" $DEVKIT_ROOT/$SDK_VERSION/Redist/
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
if [ -d "$SDK_INSTALL_DIR/Debuggers" ]; then
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Debuggers/lib
cp -r "$SDK_INSTALL_DIR/Debuggers/arm64" $DEVKIT_ROOT/$SDK_VERSION/Debuggers/
cp -r "$SDK_INSTALL_DIR/Debuggers/x64" $DEVKIT_ROOT/$SDK_VERSION/Debuggers/
cp -r "$SDK_INSTALL_DIR/Debuggers/x86" $DEVKIT_ROOT/$SDK_VERSION/Debuggers/
cp -r "$SDK_INSTALL_DIR/Debuggers/lib/arm64" $DEVKIT_ROOT/$SDK_VERSION/Debuggers/lib/
cp -r "$SDK_INSTALL_DIR/Debuggers/lib/x64" $DEVKIT_ROOT/$SDK_VERSION/Debuggers/lib/
cp -r "$SDK_INSTALL_DIR/Debuggers/lib/x86" $DEVKIT_ROOT/$SDK_VERSION/Debuggers/lib/
else
echo "No SDK debuggers found, skipping"
fi

################################################################################
# Generate devkit.info
Expand All @@ -211,22 +228,22 @@ echo-info "# This file describes to configure how to interpret the contents of t
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
echo-info ""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/Debuggers/x86\""
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib/x86;\$DEVKIT_ROOT/VC/atlmfc/lib/x86;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
echo-info "DEVKIT_UCRT_DLL_DIR_x86=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x86\""
echo-info ""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/Debuggers/x64\""
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/x64;\$DEVKIT_ROOT/VC/atlmfc/lib/x64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
echo-info "DEVKIT_VCRUNTIME_1_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$VCRUNTIME_1_DLL\""
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
echo-info "DEVKIT_UCRT_DLL_DIR_x86_64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x64\""
echo-info ""
echo-info "DEVKIT_TOOLCHAIN_PATH_aarch64=\"\$DEVKIT_ROOT/VC/bin/arm64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
echo-info "DEVKIT_TOOLCHAIN_PATH_aarch64=\"\$DEVKIT_ROOT/VC/bin/arm64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/Debuggers/arm64\""
echo-info "DEVKIT_VS_INCLUDE_aarch64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
echo-info "DEVKIT_VS_LIB_aarch64=\"\$DEVKIT_ROOT/VC/lib/arm64;\$DEVKIT_ROOT/VC/atlmfc/lib/arm64;\$DEVKIT_ROOT/$SDK_VERSION/lib/arm64\""
echo-info "DEVKIT_MSVCR_DLL_aarch64=\"\$DEVKIT_ROOT/VC/redist/arm64/$MSVCR_DLL\""
Expand Down
4 changes: 4 additions & 0 deletions make/hotspot/lib/CompileGtest.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ ifeq ($(ASAN_ENABLED), true)
GTEST_LAUNCHER_SRC += $(TOPDIR)/make/data/asan/asan_default_options.cpp
endif

ifeq ($(LSAN_ENABLED), true)
GTEST_LAUNCHER_SRC += $(TOPDIR)/make/data/lsan/lsan_default_options.cpp
endif

# On Windows, there are no internal debug symbols so must set copying to true
# to get any at all.
ifeq ($(call isTargetOs, windows), true)
Expand Down
8 changes: 7 additions & 1 deletion make/test/JtregNativeHotspot.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,13 @@ endif
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
BUILD_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
endif

# This evaluation is expensive and should only be done if this target was
Expand Down
8 changes: 7 additions & 1 deletion make/test/JtregNativeJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ endif
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_JDK_JTREG_EXTRA_FILES := $(TOPDIR)/make/data/asan/asan_default_options.c
BUILD_JDK_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_JDK_JTREG_EXTRA_FILES += $(TOPDIR)/make/data/lsan/lsan_default_options.c
endif

# This evaluation is expensive and should only be done if this target was
Expand Down
25 changes: 25 additions & 0 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -14056,6 +14056,31 @@ instruct maxI_immM1_reg(iRegINoSp dst, immI_M1 imm, iRegIorL2I src)
%}
%}

// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct bits_reverse_I(iRegINoSp dst, iRegIorL2I src)
%{
match(Set dst (ReverseI src));
ins_cost(INSN_COST);
format %{ "rbitw $dst, $src" %}
ins_encode %{
__ rbitw($dst$$Register, $src$$Register);
%}
ins_pipe(ialu_reg);
%}

// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct bits_reverse_L(iRegLNoSp dst, iRegL src)
%{
match(Set dst (ReverseL src));
ins_cost(INSN_COST);
format %{ "rbit $dst, $src" %}
ins_encode %{
__ rbit($dst$$Register, $src$$Register);
%}
ins_pipe(ialu_reg);
%}


// END This section of the file is automatically generated. Do not edit --------------
Expand Down
17 changes: 16 additions & 1 deletion src/hotspot/cpu/aarch64/aarch64_ad.m4
Original file line number Diff line number Diff line change
Expand Up @@ -615,4 +615,19 @@ MINMAX_DRAW_INSN(Max, I, _, 1, gt)
MINMAX_DRAW_INSN(Max, I, _, 1, gt, rev)
MINMAX_DRAW_INSN(Max, I, _, M1, ge)
MINMAX_DRAW_INSN(Max, I, _, M1, ge, rev)

dnl
define(`BITS_REVERSE', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct bits_reverse_$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src)
%{
match(Set dst (Reverse$1 src));
ins_cost(INSN_COST);
format %{ "$2 $dst, $src" %}
ins_encode %{
__ $2($dst$$Register, $src$$Register);
%}
ins_pipe(ialu_reg);
%}
')dnl
BITS_REVERSE(I, rbitw)
BITS_REVERSE(L, rbit)
Loading

0 comments on commit b1a571e

Please sign in to comment.