aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-06-05 06:42:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-07-23 05:12:51 -0700
commit7c124e3714c38157230ed1a5d743b37defe64dc2 (patch)
treef1e13e18239c4421675234b56d880ae081d4bdcd /manual
parent5b8d271571434a74b2464c278eafe2ff81f31029 (diff)
downloadglibc-7c124e3714c38157230ed1a5d743b37defe64dc2.zip
glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.gz
glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.bz2
x86: Install <bits/platform/x86.h> [BZ #27958]
1. Install <bits/platform/x86.h> for <sys/platform/x86.h> which includes <bits/platform/x86.h>. 2. Rename HAS_CPU_FEATURE to CPU_FEATURE_PRESENT which checks if the processor has the feature. 3. Rename CPU_FEATURE_USABLE to CPU_FEATURE_ACTIVE which checks if the feature is active. There may be other preconditions, like sufficient stack space or further setup for AMX, which must be satisfied before the feature can be used. This fixes BZ #27958. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'manual')
-rw-r--r--manual/platform.texi18
1 files changed, 10 insertions, 8 deletions
diff --git a/manual/platform.texi b/manual/platform.texi
index c56ba7d..d5fdc5b 100644
--- a/manual/platform.texi
+++ b/manual/platform.texi
@@ -148,14 +148,16 @@ Return a pointer to x86 CPU feature structure used by query macros for x86
CPU feature @var{leaf}.
@end deftypefun
-@deftypefn Macro int HAS_CPU_FEATURE (@var{name})
+@deftypefn Macro int CPU_FEATURE_PRESENT (@var{name})
This macro returns a nonzero value (true) if the processor has the feature
@var{name}.
@end deftypefn
-@deftypefn Macro int CPU_FEATURE_USABLE (@var{name})
+@deftypefn Macro int CPU_FEATURE_ACTIVE (@var{name})
This macro returns a nonzero value (true) if the processor has the feature
-@var{name} and the feature is supported by the operating system.
+@var{name} and the feature is active. There may be other preconditions,
+like sufficient stack space or further setup for AMX, which must be
+satisfied before the feature can be used.
@end deftypefn
The supported processor features are:
@@ -685,20 +687,20 @@ You could query if a processor supports @code{AVX} with:
#include <sys/platform/x86.h>
int
-support_avx (void)
+avx_present (void)
@{
- return HAS_CPU_FEATURE (AVX);
+ return CPU_FEATURE_PRESENT (AVX);
@}
@end smallexample
-and if @code{AVX} is usable with:
+and if @code{AVX} is active and may be used with:
@smallexample
#include <sys/platform/x86.h>
int
-usable_avx (void)
+avx_active (void)
@{
- return CPU_FEATURE_USABLE (AVX);
+ return CPU_FEATURE_ACTIVE (AVX);
@}
@end smallexample