<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<div class="moz-cite-prefix">On 6/27/19 1:10 PM, Bill Wendling via cfe-dev wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAEzuVAdGGX8A+QHTCELz-Scy1EGABH41m+kBG07-AOAGHEKt-Q@mail.gmail.com">
<div dir="ltr">
<div dir="ltr" style="font-family:arial,sans-serif;color:rgb(0,0,0)"><span id="gmail-m_8357673808029225001gmail-docs-internal-guid-90f5d1f9-7fff-5d14-b18e-9466b93bf7e4">
<p style="line-height:1.38;margin-top:24pt;margin-bottom:0pt">Now that ASM goto support has landed, Nick Desaulniers and I wrote up a document describing how to expand clang's implementation of ASM goto to support output constraints. The work <i>should</i> be
straight-forward, but as always will need to be verified to work. Below is a copy of our whitepaper. Please take a look and offer any comments you have.</p>
</span></div>
</div>
</blockquote>
<p><br>
</p>
<p>This all sounds fairly straightforward and removes an technically-unnecessary restriction to produce a more-general capability - LLVM terminators can have return values, and so we have no problem representing the underlying concept. There is no governing
standard here, and we made a fairly invasive change to LLVM already to support this extension in the first place. We should leverage that work to make the extension as useful as possible.</p>
<p> -Hal<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:CAEzuVAdGGX8A+QHTCELz-Scy1EGABH41m+kBG07-AOAGHEKt-Q@mail.gmail.com">
<div dir="ltr">
<div dir="ltr" style="font-family:arial,sans-serif;color:rgb(0,0,0)"><span id="gmail-m_8357673808029225001gmail-docs-internal-guid-90f5d1f9-7fff-5d14-b18e-9466b93bf7e4">
<p style="line-height:1.38;margin-top:24pt;margin-bottom:0pt">Share and enjoy!<br>
-bw</p>
<h1 dir="ltr" style="line-height:1.38;margin-top:24pt;margin-bottom:6pt"><span style="font-size:18pt;font-family:Arial;color:rgb(74,134,232);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Overview</span></h1>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Support for
</span><a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html" target="_blank" style="text-decoration-line:none" moz-do-not-send="true"><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">asm
goto</span></a><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> with output constraints is a feature that the Linux community is interested in having. A</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">dding
this new feature should give Clang a higher profile in the Linux community:</span></p>
<br>
<ul style="margin-top:0pt;margin-bottom:0pt">
<li dir="ltr" style="list-style-type:disc;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
<p dir="ltr" style="font-family:arial,sans-serif;line-height:1.38;margin-top:0pt;margin-bottom:0pt">
<span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">It demonstrates the Clang community's commitment to supporting Linux.</span></p>
</li><li dir="ltr" style="list-style-type:disc;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
<p dir="ltr" style="font-family:arial,sans-serif;line-height:1.38;margin-top:0pt;margin-bottom:0pt">
<span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">Developers are likely to adopt it on their own, which means they will need to use Clang in some fashion, either as a complete replacement for or in addition to
GCC.</span></p>
</li></ul>
<h1 dir="ltr" style="line-height:1.38;margin-top:24pt;margin-bottom:6pt"><span style="font-size:18pt;font-family:Arial;color:rgb(74,134,232);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Current
state</span></h1>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Clang's implementation of
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm goto</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
converts this code:</span></p>
<br>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">int</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">unsigned</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
a, </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">unsigned</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
b) {</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">goto</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry
%0, %1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> : :
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(a),
"r"(b) : : error);</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
a + b;</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">-1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">;</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">into the following LLVM IR:</span></p>
<br>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">define</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">)
{</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">entry:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> callbr void
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">sideeffect</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry $0, $1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"r,r,X"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> (</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i8</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">*
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">blockaddress</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">))</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">to</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asm.fallthrough</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
[label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">]</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.fallthrough:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%add</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">add</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">br</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%retval.0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">phi</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
[ </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%add</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asm.fallthrough</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
], [ </span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">-1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%entry</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
]</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ret</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%retval.0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Our proposal won't change
LLVM's current behavior</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">–i.e. a
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
without a return value will act in the same way as the current implementation.</span></p>
<h1 dir="ltr" style="line-height:1.38;margin-top:24pt;margin-bottom:6pt"><span style="font-size:18pt;font-family:Arial;color:rgb(74,134,232);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Proposal</span></h1>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">GCC restricts
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm goto</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
from having output constraints due to limitations in its internal representation–i.e. GCC's control transfer instructions cannot have outputs.
</span><span style="font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">For example:</span></p>
<br>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">int</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">int</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
a, </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">int</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
b) {</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> asm goto(</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry
%0, %1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> :
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(a),
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(b)
: : : </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
a + b;</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
-1;</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">currently fails to compile in GCC with the following
error:</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span></p>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">source</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">>:
In function </span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">'vogon'</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">source</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">>:</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">2</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">29</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:
expected </span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">':'</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
before </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">string</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
constant</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">2</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
| asm goto(</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry %0, %1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
: </span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(a),
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(b)
: : : </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> | ^~~~~</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> | :</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ToT Clang matches GCC's behavior:</span></p>
<br>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><source>:</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">2</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">30</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,134,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:
'asm </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">goto</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">'
cannot have </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">output</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
constraints</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> asm
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">goto</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry
%0, %1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> :
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(a),
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(b)
: : : </span><span style="font-family:Consolas,sans-serif;color:rgb(0,134,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">However, LLVM doesn't restrict control transfer instructions
from having outputs (e.g. the </span><a href="https://llvm.org/docs/LangRef.html#invoke-instruction" target="_blank" style="text-decoration-line:none" moz-do-not-send="true"><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">invoke</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">
instruction</span></a><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">). We propose changing LLVM's
</span><a href="https://llvm.org/docs/LangRef.html#callbr-instruction" target="_blank" style="text-decoration-line:none" moz-do-not-send="true"><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">
instruction</span></a><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> to allow return values, similar to how LLVM's implementation of inline assembly (via the
</span><a href="https://llvm.org/docs/LangRef.html#call-instruction" target="_blank" style="text-decoration-line:none" moz-do-not-send="true"><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">call</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">
instruction</span></a><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">) allows return values. Since there can potentially be zero to many output constraints,
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
would now return an aggregate which contains an element for each output constraint. These values would then be extracted via
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.
With our proposal, the above C example will be converted to LLVM IR like this:</span></p>
<br>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">define</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">)
{</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">entry:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= callbr { </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">sideeffect</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry $0, $1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r,=r,X"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> (</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i8</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">*
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">blockaddress</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">))</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">to</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asm.fallthrough</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
[label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">]</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.fallthrough:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
{ </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
{ </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%result</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">add</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ret</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%result</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ret</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">-1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Note that unlike the
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">invoke</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
instruction, </span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">'s
return values are assumed valid on </span><span style="font-family:Arial;font-style:italic;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">all</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
branches. The assumption is that the programmer knows what their inline assembly is doing and where its output constraints are valid. If the value isn't valid on a particular branch but is used there anyway, then the result is a poison value. (Also,
</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">if a
</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-family:"Roboto Mono",monospace;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">'s
return values affect a branch, it will be handled similarly to the </span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-family:"Roboto Mono",monospace;vertical-align:baseline;white-space:pre-wrap">invoke</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">
instruction's implementation.) Here's an example of how this would work:</span></p>
<br>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">int</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">int</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
a, </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">int</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
b) {</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> asm goto(</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry
%0, %1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> :
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(a),
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(b)
: : : </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">if</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
(a == </span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">42</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">)</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">42</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
* b;</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
a + b;</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
b - 42;</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">generates the following LLVM IR:</span></p>
<br>
<div dir="ltr" style="margin-left:0pt" align="left">
<table style="border:none;border-collapse:collapse">
<colgroup></colgroup>
<tbody>
<tr style="height:0pt">
<td style="font-family:arial,sans-serif;font-size:13px;vertical-align:top;background-color:rgb(248,248,248);padding:5pt;overflow:hidden">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">define</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">)
{</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">entry:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= callbr { </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">sideeffect</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"poetry $0, $1"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(221,17,68);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"=r,=r,X"</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> (</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i8</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">*
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">blockaddress</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@vogon</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">))</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">to</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asm.fallthrough</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
[label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">]</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.fallthrough:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
{ </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%tobool</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">icmp</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">eq</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.a</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">42</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">br</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%tobool</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%if.true</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
label </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%if.false</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">if.</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">true</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
{ </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%mul</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">mul</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">42</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ret</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%mul</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">if.</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">false</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.a.1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
{ </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b.1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
{ </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%result</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">add</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.a.1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b.1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ret</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%result</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">error:</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b.error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
{ </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
} </span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%0</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">1</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%error.result</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
= </span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">sub</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%asmresult.b.error</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,
</span><span style="font-family:Consolas,sans-serif;color:rgb(0,128,128);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">42</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ret</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">i32</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(153,0,115);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">%error.result</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
</span><span style="font-family:Consolas,sans-serif;color:rgb(51,51,51);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<h1 dir="ltr" style="line-height:1.38;margin-top:24pt;margin-bottom:6pt"><span style="font-size:18pt;font-family:Arial;color:rgb(74,134,232);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Implementation</span></h1>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Because LLVM's
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">invoke</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
instruction is a terminating instruction that may have return values, we can use it as a template for
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">'s
changes. The new functionality lies mostly in modifying Clang's front-end. In particular, we need to do the following:</span></p>
<br>
<ul style="margin-top:0pt;margin-bottom:0pt">
<li dir="ltr" style="list-style-type:disc;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
<p dir="ltr" style="font-family:arial,sans-serif;line-height:1.38;margin-top:0pt;margin-bottom:0pt">
<span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">Remove all error checks restricting
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">asm goto</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline"> from
returning values, and</span></p>
</li><li dir="ltr" style="list-style-type:disc;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
<p dir="ltr" style="font-family:arial,sans-serif;line-height:1.38;margin-top:0pt;margin-bottom:0pt">
<span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">Generate the
</span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">extractvalue</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">
instructions on </span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">callbr</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline">'s
branches.</span></p>
</li></ul>
<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">LLVM's middle- and back-ends need to be audited to
ensure there are no restrictions on </span><span style="font-family:"Roboto Mono",monospace;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">
returning a value. We expect all passes to Just Work™ without modifications, but of course will be verified.</span></p>
</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>