From 8811ad4f81766bfb6f49fafbf6ba5f419d61dcd3 Mon Sep 17 00:00:00 2001 From: Stefanus Du Toit Date: Tue, 18 Jun 2013 17:08:10 +0000 Subject: Add support for encoding the HLE XACQUIRE and XRELEASE prefixes. For decoding, keep the current behavior of always decoding these as their REP versions. In the future, this could be improved to recognize the cases where these behave as XACQUIRE and XRELEASE and decode them as such. llvm-svn: 184207 --- llvm/utils/TableGen/X86RecognizableInstr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/utils/TableGen/X86RecognizableInstr.cpp') diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index 46f2052b010..76d986b1c1c 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -461,6 +461,12 @@ RecognizableInstr::filter_ret RecognizableInstr::filter() const { Name == "VMOVQs64rr") return FILTER_WEAK; + // XACQUIRE and XRELEASE reuse REPNE and REP respectively. + // For now, just prefer the REP versions. + if (Name == "XACQUIRE_PREFIX" || + Name == "XRELEASE_PREFIX") + return FILTER_WEAK; + if (HasFROperands && Name.find("MOV") != Name.npos && ((Name.find("2") != Name.npos && Name.find("32") == Name.npos) || (Name.find("to") != Name.npos))) -- cgit v1.2.3