mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-28 10:46:11 +00:00
[X86] Remove checks for FeatureAVX512 from the X86 assembly parser. Remove mcpu/mattr from assembly test command lines.
Summary: We should always be able to accept AVX512 registers and instructions in llvm-mc. The only subtarget mode that should be checked is 16-bit vs 32-bit vs 64-bit mode. I've also removed all the mattr/mcpu lines from test RUN lines to be consistent with this. Most were due to AVX512, but a few were for other features. Fixes PR36202 Reviewers: RKSimon, echristo, bkramer Reviewed By: echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42824 llvm-svn: 324106
This commit is contained in:
parent
c40fdcdd7e
commit
e538fc74d4
@ -1055,11 +1055,6 @@ bool X86AsmParser::ParseRegister(unsigned &RegNo,
|
||||
return Error(StartLoc, "register %"
|
||||
+ Tok.getString() + " is only available in 64-bit mode",
|
||||
SMRange(StartLoc, EndLoc));
|
||||
} else if (!getSTI().getFeatureBits()[X86::FeatureAVX512]) {
|
||||
if (X86II::is32ExtendedReg(RegNo))
|
||||
return Error(StartLoc, "register %"
|
||||
+ Tok.getString() + " is only available with AVX512",
|
||||
SMRange(StartLoc, EndLoc));
|
||||
}
|
||||
|
||||
// Parse "%st" as "%st(0)" and "%st(1)", which is multiple tokens.
|
||||
@ -1793,8 +1788,7 @@ std::unique_ptr<X86Operand> X86AsmParser::ParseIntelOperand() {
|
||||
Start = Tok.getLoc();
|
||||
|
||||
// Rounding mode operand.
|
||||
if (getSTI().getFeatureBits()[X86::FeatureAVX512] &&
|
||||
getLexer().is(AsmToken::LCurly))
|
||||
if (getLexer().is(AsmToken::LCurly))
|
||||
return ParseRoundingModeOp(Start);
|
||||
|
||||
// Register operand.
|
||||
@ -1897,9 +1891,7 @@ std::unique_ptr<X86Operand> X86AsmParser::ParseATTOperand() {
|
||||
}
|
||||
case AsmToken::LCurly:{
|
||||
SMLoc Start = Parser.getTok().getLoc();
|
||||
if (getSTI().getFeatureBits()[X86::FeatureAVX512])
|
||||
return ParseRoundingModeOp(Start);
|
||||
return ErrorOperand(Start, "Unexpected '{' in expression");
|
||||
return ParseRoundingModeOp(Start);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1929,82 +1921,80 @@ bool X86AsmParser::ParseZ(std::unique_ptr<X86Operand> &Z,
|
||||
bool X86AsmParser::HandleAVX512Operand(OperandVector &Operands,
|
||||
const MCParsedAsmOperand &Op) {
|
||||
MCAsmParser &Parser = getParser();
|
||||
if(getSTI().getFeatureBits()[X86::FeatureAVX512]) {
|
||||
if (getLexer().is(AsmToken::LCurly)) {
|
||||
// Eat "{" and mark the current place.
|
||||
const SMLoc consumedToken = consumeToken();
|
||||
// Distinguish {1to<NUM>} from {%k<NUM>}.
|
||||
if(getLexer().is(AsmToken::Integer)) {
|
||||
// Parse memory broadcasting ({1to<NUM>}).
|
||||
if (getLexer().getTok().getIntVal() != 1)
|
||||
return TokError("Expected 1to<NUM> at this point");
|
||||
Parser.Lex(); // Eat "1" of 1to8
|
||||
if (!getLexer().is(AsmToken::Identifier) ||
|
||||
!getLexer().getTok().getIdentifier().startswith("to"))
|
||||
return TokError("Expected 1to<NUM> at this point");
|
||||
// Recognize only reasonable suffixes.
|
||||
const char *BroadcastPrimitive =
|
||||
StringSwitch<const char*>(getLexer().getTok().getIdentifier())
|
||||
.Case("to2", "{1to2}")
|
||||
.Case("to4", "{1to4}")
|
||||
.Case("to8", "{1to8}")
|
||||
.Case("to16", "{1to16}")
|
||||
.Default(nullptr);
|
||||
if (!BroadcastPrimitive)
|
||||
return TokError("Invalid memory broadcast primitive.");
|
||||
Parser.Lex(); // Eat "toN" of 1toN
|
||||
if (!getLexer().is(AsmToken::RCurly))
|
||||
return TokError("Expected } at this point");
|
||||
Parser.Lex(); // Eat "}"
|
||||
Operands.push_back(X86Operand::CreateToken(BroadcastPrimitive,
|
||||
consumedToken));
|
||||
// No AVX512 specific primitives can pass
|
||||
// after memory broadcasting, so return.
|
||||
return false;
|
||||
} else {
|
||||
// Parse either {k}{z}, {z}{k}, {k} or {z}
|
||||
// last one have no meaning, but GCC accepts it
|
||||
// Currently, we're just pass a '{' mark
|
||||
std::unique_ptr<X86Operand> Z;
|
||||
if (ParseZ(Z, consumedToken))
|
||||
return true;
|
||||
// Reaching here means that parsing of the allegadly '{z}' mark yielded
|
||||
// no errors.
|
||||
// Query for the need of further parsing for a {%k<NUM>} mark
|
||||
if (!Z || getLexer().is(AsmToken::LCurly)) {
|
||||
SMLoc StartLoc = Z ? consumeToken() : consumedToken;
|
||||
// Parse an op-mask register mark ({%k<NUM>}), which is now to be
|
||||
// expected
|
||||
unsigned RegNo;
|
||||
SMLoc RegLoc;
|
||||
if (!ParseRegister(RegNo, RegLoc, StartLoc) &&
|
||||
X86MCRegisterClasses[X86::VK1RegClassID].contains(RegNo)) {
|
||||
if (RegNo == X86::K0)
|
||||
return Error(RegLoc, "Register k0 can't be used as write mask");
|
||||
if (!getLexer().is(AsmToken::RCurly))
|
||||
return Error(getLexer().getLoc(), "Expected } at this point");
|
||||
Operands.push_back(X86Operand::CreateToken("{", StartLoc));
|
||||
Operands.push_back(
|
||||
X86Operand::CreateReg(RegNo, StartLoc, StartLoc));
|
||||
Operands.push_back(X86Operand::CreateToken("}", consumeToken()));
|
||||
} else
|
||||
if (getLexer().is(AsmToken::LCurly)) {
|
||||
// Eat "{" and mark the current place.
|
||||
const SMLoc consumedToken = consumeToken();
|
||||
// Distinguish {1to<NUM>} from {%k<NUM>}.
|
||||
if(getLexer().is(AsmToken::Integer)) {
|
||||
// Parse memory broadcasting ({1to<NUM>}).
|
||||
if (getLexer().getTok().getIntVal() != 1)
|
||||
return TokError("Expected 1to<NUM> at this point");
|
||||
Parser.Lex(); // Eat "1" of 1to8
|
||||
if (!getLexer().is(AsmToken::Identifier) ||
|
||||
!getLexer().getTok().getIdentifier().startswith("to"))
|
||||
return TokError("Expected 1to<NUM> at this point");
|
||||
// Recognize only reasonable suffixes.
|
||||
const char *BroadcastPrimitive =
|
||||
StringSwitch<const char*>(getLexer().getTok().getIdentifier())
|
||||
.Case("to2", "{1to2}")
|
||||
.Case("to4", "{1to4}")
|
||||
.Case("to8", "{1to8}")
|
||||
.Case("to16", "{1to16}")
|
||||
.Default(nullptr);
|
||||
if (!BroadcastPrimitive)
|
||||
return TokError("Invalid memory broadcast primitive.");
|
||||
Parser.Lex(); // Eat "toN" of 1toN
|
||||
if (!getLexer().is(AsmToken::RCurly))
|
||||
return TokError("Expected } at this point");
|
||||
Parser.Lex(); // Eat "}"
|
||||
Operands.push_back(X86Operand::CreateToken(BroadcastPrimitive,
|
||||
consumedToken));
|
||||
// No AVX512 specific primitives can pass
|
||||
// after memory broadcasting, so return.
|
||||
return false;
|
||||
} else {
|
||||
// Parse either {k}{z}, {z}{k}, {k} or {z}
|
||||
// last one have no meaning, but GCC accepts it
|
||||
// Currently, we're just pass a '{' mark
|
||||
std::unique_ptr<X86Operand> Z;
|
||||
if (ParseZ(Z, consumedToken))
|
||||
return true;
|
||||
// Reaching here means that parsing of the allegadly '{z}' mark yielded
|
||||
// no errors.
|
||||
// Query for the need of further parsing for a {%k<NUM>} mark
|
||||
if (!Z || getLexer().is(AsmToken::LCurly)) {
|
||||
SMLoc StartLoc = Z ? consumeToken() : consumedToken;
|
||||
// Parse an op-mask register mark ({%k<NUM>}), which is now to be
|
||||
// expected
|
||||
unsigned RegNo;
|
||||
SMLoc RegLoc;
|
||||
if (!ParseRegister(RegNo, RegLoc, StartLoc) &&
|
||||
X86MCRegisterClasses[X86::VK1RegClassID].contains(RegNo)) {
|
||||
if (RegNo == X86::K0)
|
||||
return Error(RegLoc, "Register k0 can't be used as write mask");
|
||||
if (!getLexer().is(AsmToken::RCurly))
|
||||
return Error(getLexer().getLoc(), "Expected } at this point");
|
||||
Operands.push_back(X86Operand::CreateToken("{", StartLoc));
|
||||
Operands.push_back(
|
||||
X86Operand::CreateReg(RegNo, StartLoc, StartLoc));
|
||||
Operands.push_back(X86Operand::CreateToken("}", consumeToken()));
|
||||
} else
|
||||
return Error(getLexer().getLoc(),
|
||||
"Expected an op-mask register at this point");
|
||||
// {%k<NUM>} mark is found, inquire for {z}
|
||||
if (getLexer().is(AsmToken::LCurly) && !Z) {
|
||||
// Have we've found a parsing error, or found no (expected) {z} mark
|
||||
// - report an error
|
||||
if (ParseZ(Z, consumeToken()) || !Z)
|
||||
return Error(getLexer().getLoc(),
|
||||
"Expected an op-mask register at this point");
|
||||
// {%k<NUM>} mark is found, inquire for {z}
|
||||
if (getLexer().is(AsmToken::LCurly) && !Z) {
|
||||
// Have we've found a parsing error, or found no (expected) {z} mark
|
||||
// - report an error
|
||||
if (ParseZ(Z, consumeToken()) || !Z)
|
||||
return Error(getLexer().getLoc(),
|
||||
"Expected a {z} mark at this point");
|
||||
"Expected a {z} mark at this point");
|
||||
|
||||
}
|
||||
// '{z}' on its own is meaningless, hence should be ignored.
|
||||
// on the contrary - have it been accompanied by a K register,
|
||||
// allow it.
|
||||
if (Z)
|
||||
Operands.push_back(std::move(Z));
|
||||
}
|
||||
// '{z}' on its own is meaningless, hence should be ignored.
|
||||
// on the contrary - have it been accompanied by a K register,
|
||||
// allow it.
|
||||
if (Z)
|
||||
Operands.push_back(std::move(Z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple i386-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vaddpd 4096(%edx,%eax), %zmm2, %zmm2
|
||||
// CHECK: encoding: [0x62,0xf1,0xed,0x48,0x58,0x54,0x02,0x40]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vaddpd 4096(%rdx,%rax,4), %zmm19, %zmm19
|
||||
// CHECK: encoding: [0x62,0xe1,0xe5,0x40,0x58,0x5c,0x82,0x40]
|
||||
|
@ -1,8 +1,8 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+pku --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
// CHECK: rdpkru
|
||||
// CHECK: encoding: [0x0f,0x01,0xee]
|
||||
rdpkru
|
||||
|
||||
// CHECK: wrpkru
|
||||
// CHECK: encoding: [0x0f,0x01,0xef]
|
||||
wrpkru
|
||||
wrpkru
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vaddpd %zmm6, %zmm27, %zmm8
|
||||
// CHECK: encoding: [0x62,0x71,0xa5,0x40,0x58,0xc6]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: not llvm-mc %s -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512dq -mattr=+avx512f --show-encoding -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
// RUN: not llvm-mc %s -triple x86_64-unknown-unknown --show-encoding -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
|
||||
// ERR: Register k0 can't be used as write mask
|
||||
vpcmpd $1, %zmm24, %zmm7, %k5{%k0}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512bitalg --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpopcntb %zmm23, %zmm21
|
||||
// CHECK: encoding: [0x62,0xa2,0x7d,0x48,0x54,0xef]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpblendmb %zmm25, %zmm18, %zmm17
|
||||
// CHECK: encoding: [0x62,0x82,0x6d,0x40,0x66,0xc9]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+gfni,+avx512f,+avx512bw --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vgf2p8affineinvqb $7, %zmm2, %zmm20, %zmm1
|
||||
// CHECK: encoding: [0x62,0xf3,0xdd,0x40,0xcf,0xca,0x07]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512ifma --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
vpmadd52luq %zmm4, %zmm5, %zmm6
|
||||
//CHECK: vpmadd52luq %zmm4, %zmm5, %zmm6
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512ifma -mattr=+avx512vl --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
vpmadd52luq %xmm4, %xmm5, %xmm6 {%k7}
|
||||
//CHECK: vpmadd52luq %xmm4, %xmm5, %xmm6 {%k7}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+vaes --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vaesenc %zmm3, %zmm2, %zmm21
|
||||
// CHECK: encoding: [0x62,0xe2,0x6d,0x48,0xdc,0xeb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx -mattr=+avx512vl -mattr=+avx512vbmi --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
vpermb %xmm28, %xmm29, %xmm30 {%k7}
|
||||
//CHECK: vpermb %xmm28, %xmm29, %xmm30 {%k7}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vbmi2 --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpexpandb %zmm3, %zmm1
|
||||
// CHECK: encoding: [0x62,0xf2,0x7d,0x48,0x62,0xcb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vbmi2 -mattr=+avx512vl --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpexpandb %xmm3, %xmm1
|
||||
// CHECK: encoding: [0x62,0xf2,0x7d,0x08,0x62,0xcb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vblendmpd %xmm19, %xmm20, %xmm27
|
||||
// CHECK: encoding: [0x62,0x22,0xdd,0x00,0x65,0xdb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl,+avx512bitalg --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpopcntb %xmm23, %xmm21
|
||||
// CHECK: encoding: [0x62,0xa2,0x7d,0x08,0x54,0xef]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+gfni,+avx512vl,+avx512bw --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vgf2p8affineinvqb $7, %xmm2, %xmm20, %xmm1
|
||||
// CHECK: encoding: [0x62,0xf3,0xdd,0x00,0xcf,0xca,0x07]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx -mattr=+vaes --show-encoding < %s | FileCheck %s
|
||||
//RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vaesenc %xmm3, %xmm2, %xmm21
|
||||
// CHECK: encoding: [0x62,0xe2,0x6d,0x08,0xdc,0xeb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vnni,+avx512vl --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpdpbusd %xmm3, %xmm2, %xmm1
|
||||
// CHECK: encoding: [0x62,0xf2,0x6d,0x08,0x50,0xcb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx -mattr=+vpclmulqdq --show-encoding < %s | FileCheck %s
|
||||
//RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpclmulqdq $1, %xmm3, %xmm22, %xmm1
|
||||
// CHECK: encoding: [0x62,0xf3,0x4d,0x00,0x44,0xcb,0x01]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vnni --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpdpbusd %zmm3, %zmm2, %zmm1
|
||||
// CHECK: encoding: [0x62,0xf2,0x6d,0x48,0x50,0xcb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+vpclmulqdq --show-encoding < %s | FileCheck %s
|
||||
//RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: vpclmulqdq $1, %zmm3, %zmm22, %zmm1
|
||||
// CHECK: encoding: [0x62,0xf3,0x4d,0x40,0x44,0xcb,0x01]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=vaes --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vaesenc %ymm3, %ymm2, %ymm1
|
||||
// CHECK: encoding: [0xc4,0xe2,0x6d,0xdc,0xcb]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+shstk -mattr=+ibt --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: incsspd %r13d
|
||||
// CHECK: # encoding: [0xf3,0x41,0x0f,0xae,0xed]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=avx512f -show-encoding %s > %t 2> %t.err
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -show-encoding %s > %t 2> %t.err
|
||||
// RUN: FileCheck < %t %s
|
||||
// RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+gfni --show-encoding < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s
|
||||
|
||||
// CHECK: gf2p8affineinvqb $7, %xmm2, %xmm1
|
||||
// CHECK: encoding: [0x66,0x0f,0x3a,0xcf,0xca,0x07]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: not llvm-mc %s -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512f -x86-asm-syntax=intel -output-asm-variant=1 -o /dev/null 2>&1 | FileCheck %s
|
||||
// RUN: not llvm-mc %s -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
// Validate that only OpMask/Zero mark may immediately follow destination
|
||||
vfmsub213ps zmm8{rn-sae} {k2}, zmm8, zmm8
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 -mcpu=knl --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vaddps zmm1, zmm1, zmmword ptr [rax]
|
||||
// CHECK: encoding: [0x62,0xf1,0x74,0x48,0x58,0x08]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -mcpu=knl %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s | FileCheck %s
|
||||
|
||||
// Check that we deduce unsized memory operands in the general, unambiguous, case.
|
||||
// We can't deduce xword memory operands, because there is no instruction
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl,+avx512dq -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vcmppd k3, xmm27, xmm23, 171
|
||||
// CHECK: encoding: [0x62,0xb1,0xa5,0x00,0xc2,0xdf,0xab]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl -mattr=+avx512dq -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vcvtps2qq xmm2 {k2} {z}, qword ptr [rcx + 128]
|
||||
// CHECK: encoding: [0x62,0xf1,0x7d,0x8a,0x7b,0x51,0x10]
|
||||
@ -47,7 +47,6 @@
|
||||
// CHECK: vcvttps2uqq xmm1, qword ptr [rcx + 128]
|
||||
// CHECK: encoding: [0x62,0xf1,0x7d,0x08,0x78,0x49,0x10]
|
||||
vcvttps2uqq xmm1, qword ptr [rcx + 128]
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl -mattr=+avx512dq -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vcvtps2qq xmm2 {k2} {z}, qword ptr [rcx + 128]
|
||||
// CHECK: encoding: [0x62,0xf1,0x7d,0x8a,0x7b,0x51,0x10]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl,+avx512vbmi -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpmultishiftqb xmm1, xmm2, qword ptr [rcx]{1to2}
|
||||
// CHECK: encoding: [0x62,0xf2,0xed,0x18,0x83,0x09]
|
||||
|
@ -1,8 +1,8 @@
|
||||
// RUN: llvm-mc -triple x86_64-- -mattr=+mpx --show-encoding %s |\
|
||||
// RUN: llvm-mc -triple x86_64-- --show-encoding %s |\
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,ENCODING
|
||||
|
||||
// RUN: llvm-mc -triple x86_64-- -mattr=+mpx -filetype=obj %s |\
|
||||
// RUN: llvm-objdump -d - -mattr=+mpx | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-- -filetype=obj %s |\
|
||||
// RUN: llvm-objdump -d - | FileCheck %s
|
||||
|
||||
// CHECK: bndmk (%rax), %bnd0
|
||||
// ENCODING: encoding: [0xf3,0x48,0x0f,0x1b,0x00]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+vpclmulqdq --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpclmulqdq $17, %ymm3, %ymm2, %ymm1
|
||||
// CHECK: encoding: [0xc4,0xe3,0x6d,0x44,0xcb,0x11]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512bw --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpaddb %zmm23, %zmm24, %zmm19
|
||||
// CHECK: encoding: [0x62,0xa1,0x3d,0x40,0xfc,0xdf]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512bw -mattr=+avx512vl --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpaddb %xmm22, %xmm17, %xmm26
|
||||
// CHECK: encoding: [0x62,0x21,0x75,0x00,0xfc,0xd6]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512cd --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vplzcntq %zmm22, %zmm21
|
||||
// CHECK: encoding: [0x62,0xa2,0xfd,0x48,0x44,0xee]
|
||||
@ -359,7 +359,6 @@
|
||||
// CHECK: vpconflictd (%rcx){1to16}, %zmm25
|
||||
// CHECK: encoding: [0x62,0x62,0x7d,0x58,0xc4,0x09]
|
||||
vpconflictd (%rcx){1to16}, %zmm25
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512cd --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpconflictd 4064(%rdx), %zmm25
|
||||
// CHECK: encoding: [0x62,0x62,0x7d,0x48,0xc4,0x8a,0xe0,0x0f,0x00,0x00]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512cd -mattr=+avx512vl --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vplzcntq %xmm20, %xmm18
|
||||
// CHECK: encoding: [0x62,0xa2,0xfd,0x08,0x44,0xd4]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512dq --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpmullq %zmm18, %zmm24, %zmm18
|
||||
// CHECK: encoding: [0x62,0xa2,0xbd,0x40,0x40,0xd2]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512dq -mattr=+avx512vl --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpmullq %xmm22, %xmm17, %xmm26
|
||||
// CHECK: encoding: [0x62,0x22,0xf5,0x00,0x40,0xd6]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vaddpd %xmm19, %xmm29, %xmm20
|
||||
// CHECK: encoding: [0x62,0xa1,0x95,0x00,0x58,0xe3]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+avx512vpopcntdq --show-encoding %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
||||
|
||||
// CHECK: vpopcntq %zmm25, %zmm20
|
||||
// CHECK: encoding: [0x62,0x82,0xfd,0x48,0x55,0xe1]
|
||||
|
@ -11,10 +11,6 @@ cmp $0, 0(%eax)
|
||||
// 32: error: register %rax is only available in 64-bit mode
|
||||
addl $0, 0(%rax)
|
||||
|
||||
// 32: error: register %xmm16 is only available in 64-bit mode
|
||||
// 64: error: register %xmm16 is only available with AVX512
|
||||
vaddps %xmm16, %xmm0, %xmm0
|
||||
|
||||
// 32: test.s:8:2: error: invalid instruction mnemonic 'movi'
|
||||
|
||||
# 8 "test.s"
|
||||
|
Loading…
Reference in New Issue
Block a user