[PATCH] D103036: [cfe][inline-asm] Support target-specific escaped character in inline asm

Min-Yih Hsu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 24 10:03:16 PDT 2021


myhsu created this revision.
myhsu added reviewers: nickdesaulniers, nathanchance, m_zuckerman, rnk.
myhsu requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

GCC allows each target to define a set of non-letter and non-digit escaped characters for inline assembly that will be replaced by another string (They call this "punctuation" characters. The existing "%%" and "%{" -- replaced by '%' and '{' at the end -- can be seen as special cases shared by all targets).
This patch implements this feature by adding a new hook in `TargetInfo`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103036

Files:
  clang/include/clang/Basic/TargetInfo.h
  clang/lib/AST/Stmt.cpp
  clang/lib/Basic/Targets/M68k.cpp
  clang/lib/Basic/Targets/M68k.h
  clang/test/CodeGen/m68k-asm.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103036.347430.patch
Type: text/x-patch
Size: 3716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210524/ced2e90f/attachment-0001.bin>


More information about the cfe-commits mailing list