8298472: AArch64: Detect Ampere-1 and Ampere-1A CPUs and set default options
Reviewed-by: aph, ngasson
This commit is contained in:
parent
500c3c1737
commit
7068457436
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, 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.
|
||||
*
|
||||
@ -132,7 +132,7 @@ void VM_Version::initialize() {
|
||||
// Enable vendor specific features
|
||||
|
||||
// Ampere eMAG
|
||||
if (_cpu == CPU_AMCC && (_model == 0) && (_variant == 0x3)) {
|
||||
if (_cpu == CPU_AMCC && (_model == CPU_MODEL_EMAG) && (_variant == 0x3)) {
|
||||
if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
|
||||
FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true);
|
||||
}
|
||||
@ -144,6 +144,13 @@ void VM_Version::initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
// Ampere CPUs: Ampere-1 and Ampere-1A
|
||||
if (_cpu == CPU_AMPERE && ((_model == CPU_MODEL_AMPERE_1) || (_model == CPU_MODEL_AMPERE_1A))) {
|
||||
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
|
||||
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
|
||||
}
|
||||
}
|
||||
|
||||
// ThunderX
|
||||
if (_cpu == CPU_CAVIUM && (_model == 0xA1)) {
|
||||
guarantee(_variant != 0, "Pre-release hardware no longer supported.");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, 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.
|
||||
*
|
||||
@ -102,6 +102,14 @@ public:
|
||||
CPU_APPLE = 'a',
|
||||
};
|
||||
|
||||
enum Ampere_CPU_Model {
|
||||
CPU_MODEL_EMAG = 0x0, /* CPU implementer is CPU_AMCC */
|
||||
CPU_MODEL_ALTRA = 0xd0c, /* CPU implementer is CPU_ARM, Neoverse N1 */
|
||||
CPU_MODEL_ALTRAMAX = 0xd0c, /* CPU implementer is CPU_ARM, Neoverse N1 */
|
||||
CPU_MODEL_AMPERE_1 = 0xac3, /* CPU implementer is CPU_AMPERE */
|
||||
CPU_MODEL_AMPERE_1A = 0xac4 /* CPU implementer is CPU_AMPERE */
|
||||
};
|
||||
|
||||
#define CPU_FEATURE_FLAGS(decl) \
|
||||
decl(FP, fp, 0) \
|
||||
decl(ASIMD, asimd, 1) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user