This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Add new GNU_PROPERTY_X86_ISA_1_XXX bits
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: x86-64-abi at googlegroups dot com, Binutils <binutils at sourceware dot org>
- Date: Thu, 9 Aug 2018 10:15:21 -0700
- Subject: Add new GNU_PROPERTY_X86_ISA_1_XXX bits
New GNU_PROPERTY_X86_ISA_1_XXX bits:
#define GNU_PROPERTY_X86_ISA_1_FMA (1U << 18)
#define GNU_PROPERTY_X86_ISA_1_AVX512_4FMAP (1U << 19)
#define GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW (1U << 20)
#define GNU_PROPERTY_X86_ISA_1_AVX512_BITALG (1U << 21)
#define GNU_PROPERTY_X86_ISA_1_AVX512_IFMA (1U << 22)
#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI (1U << 23)
#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2 (1U << 24)
#define GNU_PROPERTY_X86_ISA_1_AVX512_VNNI (1U << 25)
I am enclosing the binutils patch here.
--
H.J.
From 5abb25c13fd64eadff4279bfe4e24834ce52c2af Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 9 Aug 2018 10:11:01 -0700
Subject: [PATCH] x86: Add new GNU_PROPERTY_X86_ISA_1_XXX bits
New GNU_PROPERTY_X86_ISA_1_XXX bits:
#define GNU_PROPERTY_X86_ISA_1_FMA (1U << 18)
#define GNU_PROPERTY_X86_ISA_1_AVX512_4FMAP (1U << 19)
#define GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW (1U << 20)
#define GNU_PROPERTY_X86_ISA_1_AVX512_BITALG (1U << 21)
#define GNU_PROPERTY_X86_ISA_1_AVX512_IFMA (1U << 22)
#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI (1U << 23)
#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2 (1U << 24)
#define GNU_PROPERTY_X86_ISA_1_AVX512_VNNI (1U << 25)
binutils/
* readelf.c (decode_x86_isa): Support GNU_PROPERTY_X86_ISA_1_FMA,
GNU_PROPERTY_X86_ISA_1_AVX512_4FMAP,
GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW,
GNU_PROPERTY_X86_ISA_1_AVX512_BITALG,
GNU_PROPERTY_X86_ISA_1_AVX512_IFMA,
GNU_PROPERTY_X86_ISA_1_AVX512_VBMI,
GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2 and
GNU_PROPERTY_X86_ISA_1_AVX512_VNNI.
* testsuite/binutils-all/i386/pr21231b.d: Updated.
* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
include/
* include/elf/common.h (GNU_PROPERTY_X86_ISA_1_FMA): New.
(GNU_PROPERTY_X86_ISA_1_AVX512_4FMAP): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_BITALG): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_IFMA): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_VBMI): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_VNNI): Likewise.
---
binutils/readelf.c | 22 +++++++++++++++++++
.../testsuite/binutils-all/i386/pr21231b.d | 2 +-
.../testsuite/binutils-all/x86-64/pr21231b.d | 2 +-
include/elf/common.h | 8 +++++++
4 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 8a61db6459..2a17b0200c 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -16957,6 +16957,28 @@ decode_x86_isa (unsigned int bitmask)
case GNU_PROPERTY_X86_ISA_1_AVX512VL: printf ("AVX512VL"); break;
case GNU_PROPERTY_X86_ISA_1_AVX512DQ: printf ("AVX512DQ"); break;
case GNU_PROPERTY_X86_ISA_1_AVX512BW: printf ("AVX512BW"); break;
+ case GNU_PROPERTY_X86_ISA_1_FMA: printf ("FMA"); break;
+ case GNU_PROPERTY_X86_ISA_1_AVX512_4FMAP:
+ printf ("AVX512_4FMAP");
+ break;
+ case GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW:
+ printf ("AVX512_4VNNIW");
+ break;
+ case GNU_PROPERTY_X86_ISA_1_AVX512_BITALG:
+ printf ("AVX512_BITALG");
+ break;
+ case GNU_PROPERTY_X86_ISA_1_AVX512_IFMA:
+ printf ("AVX512_IFMA");
+ break;
+ case GNU_PROPERTY_X86_ISA_1_AVX512_VBMI:
+ printf ("AVX512_VBMI");
+ break;
+ case GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2:
+ printf ("AVX512_VBMI2");
+ break;
+ case GNU_PROPERTY_X86_ISA_1_AVX512_VNNI:
+ printf ("AVX512_VNNI");
+ break;
default: printf (_("<unknown: %x>"), bit); break;
}
if (bitmask)
diff --git a/binutils/testsuite/binutils-all/i386/pr21231b.d b/binutils/testsuite/binutils-all/i386/pr21231b.d
index 29a8f44570..26106c498b 100644
--- a/binutils/testsuite/binutils-all/i386/pr21231b.d
+++ b/binutils/testsuite/binutils-all/i386/pr21231b.d
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
GNU 0x0000002c NT_GNU_PROPERTY_TYPE_0
Properties: stack size: 0x800000
no copy on protected
- x86 ISA used: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, <unknown: 40000>, <unknown: 80000>, <unknown: 100000>, <unknown: 200000>, <unknown: 400000>, <unknown: 800000>, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
+ x86 ISA used: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, FMA, AVX512_4FMAP, AVX512_4VNNIW, AVX512_BITALG, AVX512_IFMA, AVX512_VBMI, AVX512_VBMI2, AVX512_VNNI, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
x86 ISA needed: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL
diff --git a/binutils/testsuite/binutils-all/x86-64/pr21231b.d b/binutils/testsuite/binutils-all/x86-64/pr21231b.d
index 9d7761c3fe..7178f812a4 100644
--- a/binutils/testsuite/binutils-all/x86-64/pr21231b.d
+++ b/binutils/testsuite/binutils-all/x86-64/pr21231b.d
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
GNU 0x00000038 NT_GNU_PROPERTY_TYPE_0
Properties: stack size: 0x800000
no copy on protected
- x86 ISA used: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, <unknown: 40000>, <unknown: 80000>, <unknown: 100000>, <unknown: 200000>, <unknown: 400000>, <unknown: 800000>, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
+ x86 ISA used: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, FMA, AVX512_4FMAP, AVX512_4VNNIW, AVX512_BITALG, AVX512_IFMA, AVX512_VBMI, AVX512_VBMI2, AVX512_VNNI, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
x86 ISA needed: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL
diff --git a/include/elf/common.h b/include/elf/common.h
index 1a940ff7b5..8716d1566c 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -770,6 +770,14 @@
#define GNU_PROPERTY_X86_ISA_1_AVX512VL (1U << 15)
#define GNU_PROPERTY_X86_ISA_1_AVX512DQ (1U << 16)
#define GNU_PROPERTY_X86_ISA_1_AVX512BW (1U << 17)
+#define GNU_PROPERTY_X86_ISA_1_FMA (1U << 18)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_4FMAP (1U << 19)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW (1U << 20)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_BITALG (1U << 21)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_IFMA (1U << 22)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI (1U << 23)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2 (1U << 24)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_VNNI (1U << 25)
#define GNU_PROPERTY_X86_FEATURE_1_IBT (1U << 0)
#define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1)
--
2.17.1