This is documented as the appropriate template modifier for call operands.
Fixes PR44272, and adds a regression test.
Also adds support for operand modifiers in Intel-style inline assembly.
Paths
| Differential D71677
[ms] [X86] Use "P" modifier on operands to call instructions in inline X86 assembly. ClosedPublic Authored by epastor on Dec 18 2019, 1:47 PM.
Details Summary This is documented as the appropriate template modifier for call operands. Also adds support for operand modifiers in Intel-style inline assembly.
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 18 2019, 1:47 PM epastor retitled this revision from Summary:
Use "P" modifier on operands to call instructions in inline X86 assembly. to [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 assembly..Dec 18 2019, 1:52 PM Comment Actions Unit tests: pass. 60853 tests passed, 0 failed and 726 were skipped. clang-tidy: fail. Please fix clang-tidy findings. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml Comment Actions Where is {0:P} actually documented? I don't see it in LangRef, but I do see it in the code.
Comment Actions
https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers, under X86; specifically documented to be used on the operands of call instructions.
Comment Actions lgtm
This revision is now accepted and ready to land.Dec 21 2019, 3:21 PM epastor marked an inline comment as done. Comment ActionsFix test; missing anchor meant the previous version would not catch a regression. Comment Actions Unit tests: pass. 61087 tests passed, 0 failed and 728 were skipped. clang-tidy: fail. Please fix clang-tidy findings. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml Closed by commit rGdc5b614fa9a1: [ms] [X86] Use "P" modifier on operands to call instructions in inline X86… (authored by epastor). · Explain WhyDec 22 2019, 6:48 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 234610 clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/mozilla-ms-inline-asm.cclang/test/CodeGen/ms-inline-asm.c
clang/test/CodeGen/ms-inline-asm.cpp
llvm/include/llvm/MC/MCParser/MCParsedAsmOperand.h
llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/lib/Target/X86/AsmParser/X86Operand.h
llvm/lib/Target/X86/X86AsmPrinter.h
llvm/lib/Target/X86/X86AsmPrinter.cpp
llvm/test/CodeGen/X86/ms-inline-asm-PR44272.ll
|
clang-format: please reformat the code