[all-commits] [llvm/llvm-project] cbe4d9: [X86] Define __LAHF_SAHF__ if feature 'sahf' is se...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Oct 11 09:46:16 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cbe4d973edadba7664ab8783770fa51742cd93b9
      https://github.com/llvm/llvm-project/commit/cbe4d973edadba7664ab8783770fa51742cd93b9
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-10-11 (Sun, 11 Oct 2020)

  Changed paths:
    M clang/lib/Basic/Targets/X86.cpp
    M clang/test/Preprocessor/predefined-arch-macros.c

  Log Message:
  -----------
  [X86] Define __LAHF_SAHF__ if feature 'sahf' is set or 32-bit mode

GCC 11 will define this macro.

In LLVM, the feature flag only applies to 64-bit mode and we always define the
macro in 32-bit mode. This is different from GCC -m32 in which -mno-sahf can
suppress the macro. The discrepancy can unlikely cause trouble.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D89198




More information about the All-commits mailing list