mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-04 23:48:33 +00:00
Merge
This commit is contained in:
commit
05ec00e16b
@ -2173,9 +2173,8 @@ const bool Matcher::clone_shift_expressions = false;
|
||||
|
||||
// Do we need to mask the count passed to shift instructions or does
|
||||
// the cpu only look at the lower 5/6 bits anyway?
|
||||
// Off, as masks are generated in expand rules where required.
|
||||
// Constant shift counts are handled in Ideal phase.
|
||||
const bool Matcher::need_masked_shift_count = false;
|
||||
// PowerPC requires masked shift counts.
|
||||
const bool Matcher::need_masked_shift_count = true;
|
||||
|
||||
// This affects two different things:
|
||||
// - how Decode nodes are matched
|
||||
|
||||
@ -79,7 +79,7 @@ define_pd_global(bool, PreserveFramePointer, false);
|
||||
// GC Ergo Flags
|
||||
define_pd_global(size_t, CMSYoungGenPerWorker, 16*M); // default max size of CMS young gen, per GC worker thread
|
||||
|
||||
define_pd_global(uintx, TypeProfileLevel, 0);
|
||||
define_pd_global(uintx, TypeProfileLevel, 111);
|
||||
|
||||
#define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
|
||||
\
|
||||
|
||||
@ -61,6 +61,8 @@ define_pd_global(size_t, CMSYoungGenPerWorker, 16*M); // default max size of CM
|
||||
|
||||
define_pd_global(uintx, TypeProfileLevel, 0);
|
||||
|
||||
define_pd_global(bool, PreserveFramePointer, false);
|
||||
|
||||
#define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
|
||||
product(bool, UseFastEmptyMethods, true, \
|
||||
"Use fast method entry code for empty methods") \
|
||||
|
||||
64
hotspot/test/compiler/codegen/IntRotateWithImmediate.java
Normal file
64
hotspot/test/compiler/codegen/IntRotateWithImmediate.java
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 2015 SAP AG. All Rights Reserved.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8080190
|
||||
* @key regression
|
||||
* @summary Test that the rotate distance used in the rotate instruction is properly masked with 0x1f
|
||||
* @run main/othervm -Xbatch -XX:-UseOnStackReplacement IntRotateWithImmediate
|
||||
* @author volker.simonis@gmail.com
|
||||
*/
|
||||
|
||||
public class IntRotateWithImmediate {
|
||||
|
||||
// This is currently the same as Integer.rotateRight()
|
||||
static int rotateRight(int i, int distance) {
|
||||
// On some architectures (i.e. x86_64 and ppc64) the following computation is
|
||||
// matched in the .ad file into a single MachNode which emmits a single rotate
|
||||
// machine instruction. It is important that the shift amount is masked to match
|
||||
// corresponding immediate width in the native instruction. On x86_64 the rotate
|
||||
// left instruction ('rol') encodes an 8-bit immediate while the corresponding
|
||||
// 'rotlwi' instruction on Power only encodes a 5-bit immediate.
|
||||
return ((i >>> distance) | (i << -distance));
|
||||
}
|
||||
|
||||
static int compute(int x) {
|
||||
return rotateRight(x, 3);
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
int val = 4096;
|
||||
|
||||
int firstResult = compute(val);
|
||||
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
int newResult = compute(val);
|
||||
if (firstResult != newResult) {
|
||||
throw new InternalError(firstResult + " != " + newResult);
|
||||
}
|
||||
}
|
||||
System.out.println("OK");
|
||||
}
|
||||
|
||||
}
|
||||
@ -129,7 +129,8 @@ public abstract class IntrinsicBase extends CompilerWhiteBoxTest {
|
||||
|
||||
@Override
|
||||
protected boolean isIntrinsicSupported() {
|
||||
return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && (Platform.isX86() || Platform.isX64());
|
||||
return isServerVM() && Boolean.valueOf(useMathExactIntrinsics)
|
||||
&& (Platform.isX86() || Platform.isX64() || Platform.isAArch64());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -146,7 +147,7 @@ public abstract class IntrinsicBase extends CompilerWhiteBoxTest {
|
||||
@Override
|
||||
protected boolean isIntrinsicSupported() {
|
||||
return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) &&
|
||||
(Platform.isX64() || Platform.isPPC());
|
||||
(Platform.isX64() || Platform.isPPC() || Platform.isAArch64());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
* @bug 8076276
|
||||
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : long test
|
||||
*
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Double
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Double
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Long
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Long
|
||||
*
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=8 -XX:CompileThresholdScaling=0.1 SumRed_Double
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=8 -XX:CompileThresholdScaling=0.1 SumRed_Double
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=8 -XX:CompileThresholdScaling=0.1 SumRed_Long
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=8 -XX:CompileThresholdScaling=0.1 SumRed_Long
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@ -198,6 +198,11 @@ if [ $? = 0 ]
|
||||
then
|
||||
VM_CPU="ia64"
|
||||
fi
|
||||
grep "aarch64" vm_version.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
VM_CPU="aarch64"
|
||||
fi
|
||||
export VM_TYPE VM_BITS VM_OS VM_CPU
|
||||
echo "VM_TYPE=${VM_TYPE}"
|
||||
echo "VM_BITS=${VM_BITS}"
|
||||
|
||||
@ -132,6 +132,10 @@ public class Platform {
|
||||
return isArch("(amd64)|(x86_64)");
|
||||
}
|
||||
|
||||
public static boolean isAArch64() {
|
||||
return isArch("aarch64");
|
||||
}
|
||||
|
||||
private static boolean isArch(String archnameRE) {
|
||||
return Pattern.compile(archnameRE, Pattern.CASE_INSENSITIVE)
|
||||
.matcher(osArch)
|
||||
|
||||
@ -45,7 +45,7 @@ import java.util.Set;
|
||||
*/
|
||||
public class TestMutuallyExclusivePlatformPredicates {
|
||||
private static enum MethodGroup {
|
||||
ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64"),
|
||||
ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64", "isAArch64"),
|
||||
BITNESS("is32bit", "is64bit"),
|
||||
OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
|
||||
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user