[PATCH] D24957: [x86][ms-inline-asm] use of "jmp short" in asm is not supported
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 14 01:18:47 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL284211: [x86][ms-inline-asm] use of "jmp short" in asm is not supported (authored by mzuckerm).
Changed prior to commit:
https://reviews.llvm.org/D24957?vs=73762&id=74625#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24957
Files:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Index: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -2157,6 +2157,20 @@
InstInfo = &Info;
StringRef PatchedName = Name;
+ if (Name == "jmp" && isParsingIntelSyntax() && isParsingInlineAsm()) {
+ StringRef NextTok = Parser.getTok().getString();
+ if (NextTok == "short") {
+ SMLoc NameEndLoc =
+ NameLoc.getFromPointer(NameLoc.getPointer() + Name.size());
+ // Eat the short keyword
+ Parser.Lex();
+ // MS ignores the short keyword, it determines the jmp type based
+ // on the distance of the label
+ InstInfo->AsmRewrites->emplace_back(AOK_Skip, NameEndLoc,
+ NextTok.size() + 1);
+ }
+ }
+
// FIXME: Hack to recognize setneb as setne.
if (PatchedName.startswith("set") && PatchedName.endswith("b") &&
PatchedName != "setb" && PatchedName != "setnb")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24957.74625.patch
Type: text/x-patch
Size: 1058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161014/aa52b30b/attachment.bin>
More information about the llvm-commits
mailing list