[PATCH] x86_64: Improve Intel MPX check to reject incomplete Clang support
H.J. Lu
hjl.tools@gmail.com
Sun Oct 10 23:37:46 GMT 2021
On Sun, Oct 10, 2021 at 4:23 PM Fangrui Song <maskray@google.com> wrote:
>
> LLVM integrated assembler has incomplete MPX support, e.g.
> bnd is not supported while bndmov is supported:
>
> error: invalid instruction mnemonic 'bnd'
>
> Improve the configure check so that HAVE_MPX_SUPPORT code can be
> properly skipped.
> ---
> sysdeps/x86_64/configure | 2 ++
> sysdeps/x86_64/configure.ac | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
> index 585279f83d..c3145e6030 100755
> --- a/sysdeps/x86_64/configure
> +++ b/sysdeps/x86_64/configure
> @@ -30,6 +30,8 @@ if ${libc_cv_asm_mpx+:} false; then :
> else
> cat > conftest.s <<\EOF
> bndmov %bnd0,(%rsp)
> + bnd
> + jmp *%r11
> EOF
> if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
> { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
> diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
> index 29e14033c0..3c935d66e1 100644
> --- a/sysdeps/x86_64/configure.ac
> +++ b/sysdeps/x86_64/configure.ac
> @@ -14,6 +14,8 @@ dnl Check whether asm supports Intel MPX
> AC_CACHE_CHECK(for Intel MPX support, libc_cv_asm_mpx, [dnl
> cat > conftest.s <<\EOF
> bndmov %bnd0,(%rsp)
> + bnd
> + jmp *%r11
> EOF
> if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
> libc_cv_asm_mpx=yes
> --
> 2.33.0.882.g93a45727a2-goog
>
Intel MPX has been deprecated. Can you simply remove MPX support?
Thanks.
--
H.J.
More information about the Libc-alpha
mailing list