[PATCH] D35892: [x86][inline-asm][ms-compat] legalize the use of "jc/jz short <op>"

coby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 08:18:23 PDT 2017


coby created this revision.

MS ignores the keyword "short" when used after a jc/jz instruction, LLVM ought to do the same.
Test:


Repository:
  rL LLVM

https://reviews.llvm.org/D35892

Files:
  lib/Target/X86/AsmParser/X86AsmParser.cpp


Index: lib/Target/X86/AsmParser/X86AsmParser.cpp
===================================================================
--- lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -2309,7 +2309,8 @@
   InstInfo = &Info;
   StringRef PatchedName = Name;
 
-  if (Name == "jmp" && isParsingIntelSyntax() && isParsingInlineAsm()) {
+  if ((Name.equals("jmp") || Name.equals("jc") || Name.equals("jz")) &&
+      isParsingIntelSyntax() && isParsingInlineAsm()) {
     StringRef NextTok = Parser.getTok().getString();
     if (NextTok == "short") {
       SMLoc NameEndLoc =


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35892.108283.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170726/4cc6c397/attachment.bin>


More information about the llvm-commits mailing list