Skip to content

Commit 834a18e

Browse files
committed
[JDK-8350672] Adapt JDK-8345125: Aarch64: Add aarch64 backend for Float16 scalar operations
PullRequest: graal/20169
2 parents cd1181b + 9a4804f commit 834a18e

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
11-
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+21-2453", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+21-2454", "platformspecific": true, "extrabundles": ["static-libs"]},
1212

1313
"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
1414
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/aarch64/AArch64LibCHelper.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2019, 2020, Arm Limited. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -131,6 +131,14 @@ public interface CPUFeatures extends PointerBase {
131131
@AllowNarrowingCast
132132
@CField
133133
boolean fSVEBITPERM();
134+
135+
@AllowNarrowingCast
136+
@CField
137+
boolean fFPHP();
138+
139+
@AllowNarrowingCast
140+
@CField
141+
boolean fASIMDHP();
134142
}
135143
// Checkstyle: resume
136144
}

substratevm/src/com.oracle.svm.native.libchelper/include/aarch64cpufeatures.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2019, 2020, Arm Limited. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -46,4 +46,6 @@ typedef struct {
4646
uint8_t fDMB_ATOMICS;
4747
uint8_t fPACA;
4848
uint8_t fSVEBITPERM;
49+
uint8_t fFPHP;
50+
uint8_t fASIMDHP;
4951
} CPUFeatures;

substratevm/src/com.oracle.svm.native.libchelper/src/cpuid.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -718,6 +718,12 @@ void determineCPUFeatures(CPUFeatures* features) {
718718
#ifndef HWCAP_PACA
719719
#define HWCAP_PACA (1L << 30)
720720
#endif
721+
#ifndef HWCAP_FPHP
722+
#define HWCAP_FPHP (1L << 9)
723+
#endif
724+
#ifndef HWCAP_ASIMDHP
725+
#define HWCAP_ASIMDHP (1L << 10)
726+
#endif
721727
#ifndef HWCAP2_SVE2
722728
#define HWCAP2_SVE2 (1L << 1)
723729
#endif
@@ -755,6 +761,8 @@ void determineCPUFeatures(CPUFeatures* features) {
755761
features->fDMB_ATOMICS = 0;
756762
features->fPACA = !!(auxv & HWCAP_PACA);
757763
features->fSVEBITPERM = !!(auxv2 & HWCAP2_SVEBITPERM);
764+
features->fFPHP = !!(auxv & HWCAP_FPHP);
765+
features->fASIMDHP = !!(auxv & HWCAP_ASIMDHP);
758766

759767
//checking for features signaled in another way
760768

0 commit comments

Comments
 (0)