[clang] b1ad813 - [clang] Address review comments on https://reviews.llvm.org/D113707

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 17 11:04:24 PST 2021


Author: Nico Weber
Date: 2021-11-17T14:04:16-05:00
New Revision: b1ad813b474ab7935b2c40d84c99c2b59cd67f79

URL: https://github.com/llvm/llvm-project/commit/b1ad813b474ab7935b2c40d84c99c2b59cd67f79
DIFF: https://github.com/llvm/llvm-project/commit/b1ad813b474ab7935b2c40d84c99c2b59cd67f79.diff

LOG: [clang] Address review comments on https://reviews.llvm.org/D113707

- Drop a needless `l` size suffix on a mov instruction in AT&T mode
- Move varying bits of test flags to front
- Add a comment about MS mode test

Added: 
    

Modified: 
    clang/lib/Headers/x86gprintrin.h
    clang/test/CodeGen/inline-asm-intel.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/x86gprintrin.h b/clang/lib/Headers/x86gprintrin.h
index 83f13f0cf208..01e741f1eb61 100644
--- a/clang/lib/Headers/x86gprintrin.h
+++ b/clang/lib/Headers/x86gprintrin.h
@@ -26,10 +26,10 @@
 #endif
 
 #define __SSC_MARK(Tag)                                                        \
-  __asm__ __volatile__("mov{l} {%%ebx, %%eax|eax, ebx}; "                      \
-                       "mov{l} {%0, %%ebx|ebx, %0}; "                          \
+  __asm__ __volatile__("mov {%%ebx, %%eax|eax, ebx}; "                      \
+                       "mov {%0, %%ebx|ebx, %0}; "                          \
                        ".byte 0x64, 0x67, 0x90; "                              \
-                       "mov{l} {%%eax, %%ebx|ebx, eax};" ::"i"(Tag)            \
+                       "mov {%%eax, %%ebx|ebx, eax};" ::"i"(Tag)            \
                        : "%eax");
 
 #endif /* __X86GPRINTRIN_H */

diff  --git a/clang/test/CodeGen/inline-asm-intel.c b/clang/test/CodeGen/inline-asm-intel.c
index 25d88b1140fe..fb737a6e85e2 100644
--- a/clang/test/CodeGen/inline-asm-intel.c
+++ b/clang/test/CodeGen/inline-asm-intel.c
@@ -1,15 +1,17 @@
 // REQUIRES: x86-registered-target
 
 /// Accept intel inline asm but write it out as att:
-// RUN: %clang_cc1 -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -triple i386-unknown-unknown -mllvm -x86-asm-syntax=att -inline-asm=intel -O0 -S %s -o - | FileCheck --check-prefix=ATT %s
-// RUN: %clang_cc1 -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -triple x86_64-unknown-unknown -mllvm -x86-asm-syntax=att -inline-asm=intel -O0 -S %s -o - | FileCheck --check-prefix=ATT %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -mllvm -x86-asm-syntax=att -inline-asm=intel -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -O0 -S %s -o - | FileCheck --check-prefix=ATT %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -mllvm -x86-asm-syntax=att -inline-asm=intel -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -O0 -S %s -o - | FileCheck --check-prefix=ATT %s
 
 /// Accept intel inline asm and write it out as intel:
-// RUN: %clang_cc1 -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -triple i386-unknown-unknown -mllvm -x86-asm-syntax=intel -inline-asm=intel -O0 -S %s -o - | FileCheck  --check-prefix=INTEL %s
-// RUN: %clang_cc1 -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -triple x86_64-unknown-unknown -mllvm -x86-asm-syntax=intel -inline-asm=intel -O0 -S %s -o - | FileCheck  --check-prefix=INTEL %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -mllvm -x86-asm-syntax=intel -inline-asm=intel -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -O0 -S %s -o - | FileCheck  --check-prefix=INTEL %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -mllvm -x86-asm-syntax=intel -inline-asm=intel -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -O0 -S %s -o - | FileCheck  --check-prefix=INTEL %s
 
-// RUN: %clang_cc1 -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -triple i386-pc-win32 -mllvm -x86-asm-syntax=intel -inline-asm=intel -O0 -S %s -o - -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 | FileCheck  --check-prefix=INTEL %s
-// RUN: %clang_cc1 -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -triple x86_64-pc-win32 -mllvm -x86-asm-syntax=intel -inline-asm=intel -O0 -S %s -o - -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 | FileCheck  --check-prefix=INTEL %s
+/// Check MS compat mode (_MSC_VER defined). The driver always picks intel
+/// output in that mode, so test only that.
+// RUN: %clang_cc1 -triple i386-pc-win32 -mllvm -x86-asm-syntax=intel -inline-asm=intel -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -O0 -S %s -o - -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 | FileCheck  --check-prefix=INTEL %s
+// RUN: %clang_cc1 -triple x86_64-pc-win32 -mllvm -x86-asm-syntax=intel -inline-asm=intel -Werror -target-feature +hreset -target-feature +pconfig -target-feature +sgx -ffreestanding -O0 -S %s -o - -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 | FileCheck  --check-prefix=INTEL %s
 
 // Test that intrinsics headers still work with -masm=intel.
 #ifdef _MSC_VER


        


More information about the cfe-commits mailing list