[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

Nick Desaulniers via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 11 10:34:14 PST 2019


On Thu, Jan 10, 2019 at 6:11 PM Yu, Jennifer <jennifer.yu at intel.com> wrote:
>
> Syntax for asm goto:
> Syntax:
>   asm [volatile] goto ( AssemblerTemplate
>                       :
>                       : InputOperands
>                       : Clobbers
>                       : GotoLabels)
>
> Only input is allowed.  Output is not allowed

To match parity with GCC, yes.  Support for output is requested by
kernel developers, but it can understandably be left out of v1.

> Thanks.
> Jennifer
>
> -----Original Message-----
> From: Eli Friedman via Phabricator [mailto:reviews at reviews.llvm.org]
> Sent: Thursday, January 10, 2019 5:58 PM
> To: craig.topper at gmail.com; Keane, Erich <erich.keane at intel.com>; ndesaulniers at google.com; chandlerc at gmail.com; Yu, Jennifer <jennifer.yu at intel.com>; syaghmour at apple.com
> Cc: efriedma at codeaurora.org; srhines at google.com; eraman at google.com; cfe-commits at lists.llvm.org
> Subject: [PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM
>
> efriedma added a comment.
>
> Missing changes to lib/Analysis/CFG.cpp.
>
>
>
> ================
> Comment at: lib/Sema/SemaStmtAsm.cpp:470
> +    if (NS->isGCCAsmGoto() &&
> +        Exprs[ConstraintIdx]->getStmtClass() == Stmt::AddrLabelExprClass)
> +      break;
> ----------------
> This looks suspicious; an AddrLabelExpr could be an input or output, e.g. `"r"(&&foo)`.
>
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D56571/new/
>
> https://reviews.llvm.org/D56571
>
>
>


-- 
Thanks,
~Nick Desaulniers


More information about the cfe-commits mailing list