<div dir="ltr">I think this is fine, except that it stops at the point where things actually start to get interesting and tricky.<div><br></div><div>How will you actually handle the flow of values from the callbr into the error blocks? A callbr can specify requirements on where its outputs live. So, what if two callbr, in different branches of code, specify _different_ constraints for the same output, and list the same block as a possible error successor? How can the resulting phi be codegened?</div><div><br></div><div>It'd sure be a whole lot easier to not have the values valid on the secondary exit blocks. Can you present examples where preserving the values on the branches is be a requirement? (I feel like I've seen some before, but it'd be good to be reminded).<br></div><div><br></div><div>E.g., imagine code like this:</div><div><br></div><div><<</div><div>entry:</div><div>  br i1 %cmp, label %true, label %false</div><div>true:</div><div>  %0 = callbr { i32, i32 } asm sideeffect "poetry $0, $1", "={r8},={r9},X" (i8* blockaddress(@vogon, %error)) to label %asm.fallthrough [label %error]<br></div><div>false:<br></div><div>  %1 = callbr { i32, i32 } asm sideeffect "poetry2 $0, $1", "={r10},={r11},X" (i8* blockaddress(@vogon, %error)) to label %asm.fallthrough [label %error]</div><div><br></div><div>error:</div><div>  %vals = phi { i32, i32 } [ %0, %true ], [ %1, %false ]</div><div>>></div><div><br></div><div>Normally, if a common register cannot be found to use across relevant block transitions, it can simply fall back on storing values on the stack. But, that's not possible with callbr, since the location is fixed by the asm, and no code can be inserted after the values are written, before the branch (as both value writes and the branch are inside the asm blob). So what can be done, in that case?</div><div><br></div><div>One thing you might be able to do is to duplicate the error block so you have a different target for every callbr, but I'd consider that an invalid transform (because the address of the block is potentially being used as a value in the asm too).<br></div><div><br></div><div>Another thing you could perhaps do is reify the source-block-number as an actual value -- storing a "1" before the callbr in true, and storing a "2" before the callbr in "false". Then conditional-branch based on that...but that's real ugly...</div><div></div><div></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 3:18 PM Nick Desaulniers via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">+ CBL mailing list<br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 11:08 AM Bill Wendling <<a href="mailto:isanbard@gmail.com" target="_blank">isanbard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">[Adding the correct cfe-dev mailing list address.]</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 11:06 AM Bill Wendling <<a href="mailto:isanbard@gmail.com" target="_blank">isanbard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span id="m_-6165181318752167789gmail-m_5422889615267227770gmail-m_7315644313067770944gmail-m_-6035809721782067189gmail-docs-internal-guid-90f5d1f9-7fff-5d14-b18e-9466b93bf7e4"><p style="text-align:left;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><p style="text-align:left;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;color:rgb(0,0,0);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" style="text-decoration-line:none" target="_blank"><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;color:rgb(0,0,0);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;color:rgb(0,0,0);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;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">It demonstrates the Clang community's commitment to supporting Linux.</span></p></li><li dir="ltr" style="list-style-type:disc;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm goto</span><span style="font-family:Arial;color:rgb(0,0,0);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="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"><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">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"><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">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"><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"><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">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"><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">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"><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></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;color:rgb(0,0,0);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="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"><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">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"><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">  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"><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">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"><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">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"><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"><br></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"><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(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"><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">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"><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"><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">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"><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(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"><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">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"><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></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;color:rgb(0,0,0);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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">asm goto</span><span style="font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);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="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"><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">  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"><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">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"><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"><br></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"><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">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"><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></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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><br><br></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="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"><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">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"><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(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"><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-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></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;color:rgb(0,0,0);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;color:rgb(0,0,0);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="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"><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">  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;color:rgb(0,0,0);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" style="text-decoration-line:none" target="_blank"><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;color:rgb(0,0,0);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" style="text-decoration-line:none" target="_blank"><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;color:rgb(0,0,0);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" style="text-decoration-line:none" target="_blank"><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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">extractvalue</span><span style="font-family:Arial;color:rgb(0,0,0);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="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"><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">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"><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(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"><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">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"><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">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"><br></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"><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(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"><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(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"><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(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"><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">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"><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"><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">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"><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">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"><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></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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">invoke</span><span style="font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);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;color:rgb(0,0,0);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;color:rgb(0,0,0);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;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">invoke</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-family:Arial;color:rgb(0,0,0);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="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"><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">  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"><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">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"><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">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"><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">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"><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"><br></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"><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">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"><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></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;color:rgb(0,0,0);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="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"><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">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"><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(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"><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">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"><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">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"><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"><br></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"><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(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"><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(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"><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">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"><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"><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">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"><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(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"><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(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"><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">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"><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"><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">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"><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(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"><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(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"><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(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"><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">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"><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"><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">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"><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(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"><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(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"><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">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"><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></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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">invoke</span><span style="font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;color:rgb(0,0,0);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;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">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;white-space:pre-wrap">asm goto</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> from returning values, and</span></p></li><li dir="ltr" style="list-style-type:disc;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Generate 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">extractvalue</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> instructions 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-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">'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;color:rgb(0,0,0);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;color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">callbr</span><span style="font-family:Arial;color:rgb(0,0,0);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>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-6165181318752167789gmail-m_5422889615267227770gmail_signature"><div dir="ltr">Thanks,<div>~Nick Desaulniers</div></div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>