
Until now curly braces could only be used in MS inline assembly to mark block start/end. All curly braces were removed completely at a very early stage. This approach caused bugs like: "m{o}v eax, ebx" turned into "mov eax, ebx" without any error. In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such. Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such). This patch fixes the bug described above and enables the use of AVX-512 special operands. This commit is the the clang part of the patch. The clang part of the review is: http://reviews.llvm.org/D17766 The llvm part of the review is: http://reviews.llvm.org/D17767 Differential Revision: http://reviews.llvm.org/D17766 llvm-svn: 262842
22 lines
571 B
C
22 lines
571 B
C
// REQUIRES: x86-registered-target
|
|
// RUN: %clang_cc1 %s -triple x86_64-pc-windows-msvc -target-cpu knl -fasm-blocks -emit-llvm -o - | FileCheck %s
|
|
|
|
void t1() {
|
|
// CHECK: @t1
|
|
// CHECK: call void asm sideeffect inteldialect "vaddpd zmm8, zmm27, zmm6", "~{zmm8},~{dirflag},~{fpsr},~{flags}"()
|
|
// CHECK: ret void
|
|
__asm {
|
|
vaddpd zmm8, zmm27, zmm6
|
|
}
|
|
}
|
|
|
|
|
|
void t2() {
|
|
// CHECK: @t2
|
|
// CHECK: call void asm sideeffect inteldialect "vaddpd zmm8 {k1}, zmm27, zmm6", "~{zmm8},~{dirflag},~{fpsr},~{flags}"()
|
|
// CHECK: ret void
|
|
__asm {
|
|
vaddpd zmm8 {k1}, zmm27, zmm6
|
|
}
|
|
}
|