Skip to content

Commit cf7b15c

Browse files
committed
svm: adopt "JDK-8365633: Incorrect info is reported on hybrid CPU"
1 parent 0960dcd commit cf7b15c

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/amd64/AMD64LibCHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ public interface CPUFeatures extends PointerBase {
322322
@AllowNarrowingCast
323323
@CField
324324
boolean fAVX10_2();
325+
326+
@AllowNarrowingCast
327+
@CField
328+
boolean fHYBRID();
325329
}
326330
// Checkstyle: resume
327331
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,5 @@ typedef struct {
9191
uint8_t fAVX512_FP16;
9292
uint8_t fAVX10_1;
9393
uint8_t fAVX10_2;
94+
uint8_t fHYBRID;
9495
} CPUFeatures;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ typedef union {
265265
fast_short_rep_mov : 1,
266266
: 9,
267267
serialize : 1,
268-
: 5,
268+
hybrid : 1,
269+
: 4,
269270
cet_ibt : 1,
270271
: 2,
271272
avx512_fp16 : 1,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ NO_INLINE static void set_cpufeatures(CPUFeatures *features, CpuidInfo *_cpuid_i
577577
{
578578
if (_cpuid_info->sef_cpuid7_edx.bits.serialize != 0)
579579
features->fSERIALIZE = 1;
580+
if (_cpuid_info->sef_cpuid7_edx.bits.hybrid != 0)
581+
features->fHYBRID = 1;
580582
if (_cpuid_info->sef_cpuid7_edx.bits.avx512_fp16 != 0)
581583
features->fAVX512_FP16 = 1;
582584
}

0 commit comments

Comments
 (0)