<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Moritz Angermann pushed to branch wip/angerman/aarch64-ncg
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/27ea955ba4ed6d547ac86428bbe95272652a48dc">27ea955b</a></strong>
<div>
<span>by Moritz Angermann</span>
<i>at 2020-07-11T13:36:56+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add latest opt changes.
</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class="file-stats">
<a href="#6997a0cd37829d3d08db1c48185aaa3d7dfc3e6b">
compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="6997a0cd37829d3d08db1c48185aaa3d7dfc3e6b">
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/27ea955ba4ed6d547ac86428bbe95272652a48dc#6997a0cd37829d3d08db1c48185aaa3d7dfc3e6b"><strong>compiler/GHC/CmmToAsm/AArch64/CodeGen.hs</strong></a>
<hr>
<table class="code white" style="font-family: monospace; font-size: 90%;" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder match" id="" style="line-height: 1.6;">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="601" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="601" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="padding-left: 0.5em; padding-right: 0.5em; color: rgba(0,0,0,0.3);" bgcolor="#fafafa">@@ -601,16 +601,20 @@ getRegister' config plat expr</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="601" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
601
</td>
<td class="diff-line-num new_line" data-linenumber="601" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
601
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC601" class="line" lang="haskell">    <span class="c1" style="color: #998; font-style: italic;">-- XXX: for now we'll only implement the 64bit versions. And rely on the</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="602" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
602
</td>
<td class="diff-line-num new_line" data-linenumber="602" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
602
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC602" class="line" lang="haskell">    <span class="c1" style="color: #998; font-style: italic;">--      fallthrough to alert us if things go wrong!</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="603" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
603
</td>
<td class="diff-line-num new_line" data-linenumber="603" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
603
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC603" class="line" lang="haskell">    <span class="c1" style="color: #998; font-style: italic;">-- OPTIMIZATION WARNING: Dyadic CmmMachOp destructuring</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="604" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="604" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
604
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC604" class="line" lang="haskell">    <span class="c1" style="color: #998; font-style: italic;">-- 0. XXX This should not exist! Rewrite: Reg +- 0 -> Reg</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="604" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="605" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
605
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC605" class="line" lang="haskell">    <span class="kt" style="color: #458; font-weight: 600;">CmmMachOp</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">MO_Add</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)</span> <span class="p">[</span><span class="n" style="color: #333;">expr'</span><span class="o" style="font-weight: 600;">@</span><span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmReg</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmGlobal</span> <span class="n" style="color: #333;">r</span><span class="p">)),</span> <span class="kt" style="color: #458; font-weight: 600;">CmmLit</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmInt</span> <span class="mi" style="color: #099;">0</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)]</span> <span class="o" style="font-weight: 600;">-></span> <span class="n" style="color: #333;">getRegister'</span> <span class="n" style="color: #333;">config</span> <span class="n" style="color: #333;">plat</span> <span class="n" style="color: #333;">expr'</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="604" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="606" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
606
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC606" class="line" lang="haskell">    <span class="kt" style="color: #458; font-weight: 600;">CmmMachOp</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">MO_Sub</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)</span> <span class="p">[</span><span class="n" style="color: #333;">expr'</span><span class="o" style="font-weight: 600;">@</span><span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmReg</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmGlobal</span> <span class="n" style="color: #333;">r</span><span class="p">)),</span> <span class="kt" style="color: #458; font-weight: 600;">CmmLit</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmInt</span> <span class="mi" style="color: #099;">0</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)]</span> <span class="o" style="font-weight: 600;">-></span> <span class="n" style="color: #333;">getRegister'</span> <span class="n" style="color: #333;">config</span> <span class="n" style="color: #333;">plat</span> <span class="n" style="color: #333;">expr'</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="604" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
604
</td>
<td class="diff-line-num new_line" data-linenumber="607" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
607
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC607" class="line" lang="haskell">    <span class="c1" style="color: #998; font-style: italic;">-- 1. Compute Reg +/- n directly.</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="605" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
605
</td>
<td class="diff-line-num new_line" data-linenumber="608" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
608
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC608" class="line" lang="haskell">    <span class="c1" style="color: #998; font-style: italic;">--    For Add/Sub we can directly encode 12bits, or 12bits lsl #12.</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="" style="line-height: 1.6;">
<td class="diff-line-num old old_line" data-linenumber="606" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
606
</td>
<td class="diff-line-num new_line old" data-linenumber="609" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC606" class="line" lang="haskell">    <span class="kt" style="color: #458; font-weight: 600;">CmmMachOp</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">MO_Add</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)</span> <span class="p">[(</span><span class="kt" style="color: #458; font-weight: 600;">CmmReg</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmGlobal</span> <span class="n" style="color: #333;">r</span><span class="p">)),</span> <span class="kt" style="color: #458; font-weight: 600;">CmmLit</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmInt</span> <span class="mi" style="color: #099;">0</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)]</span> <span class="o" style="font-weight: 600;">-></span> <span class="n" style="color: #333;">pprPanic</span> <span class="s" style="color: #d14;">"getRegister:CmmMachOp:Add:Imm is 0"</span> <span class="p">(</span><span class="n" style="color: #333;">ppr</span> <span class="n" style="color: #333;">expr</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="607" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
607
</td>
<td class="diff-line-num new_line" data-linenumber="609" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
609
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC609" class="line" lang="haskell">    <span class="kt" style="color: #458; font-weight: 600;">CmmMachOp</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">MO_Add</span> <span class="n" style="color: #333;">w</span><span class="p">)</span> <span class="p">[(</span><span class="kt" style="color: #458; font-weight: 600;">CmmReg</span> <span class="n" style="color: #333;">reg</span><span class="o" style="font-weight: 600;">@</span><span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmGlobal</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)),</span> <span class="kt" style="color: #458; font-weight: 600;">CmmLit</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmInt</span> <span class="n" style="color: #333;">n</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)]</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="608" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
608
</td>
<td class="diff-line-num new_line" data-linenumber="610" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
610
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC610" class="line" lang="haskell">      <span class="o" style="font-weight: 600;">|</span> <span class="n" style="color: #333;">n</span> <span class="o" style="font-weight: 600;">></span> <span class="mi" style="color: #099;">0</span> <span class="o" style="font-weight: 600;">&&</span> <span class="n" style="color: #333;">n</span> <span class="o" style="font-weight: 600;"><</span> <span class="mi" style="color: #099;">4096</span> <span class="o" style="font-weight: 600;">-></span> <span class="n" style="color: #333;">return</span> <span class="o" style="font-weight: 600;">$</span> <span class="kt" style="color: #458; font-weight: 600;">Any</span> <span class="p">(</span><span class="n" style="color: #333;">intFormat</span> <span class="n" style="color: #333;">w</span><span class="p">)</span> <span class="p">(</span><span class="nf" style="color: #900; font-weight: 600;">\</span><span class="n" style="color: #333;">d</span> <span class="o" style="font-weight: 600;">-></span> <span class="n" style="color: #333;">unitOL</span> <span class="o" style="font-weight: 600;">$</span> <span class="kt" style="color: #458; font-weight: 600;">ANN</span> <span class="p">(</span><span class="n" style="color: #333;">text</span> <span class="o" style="font-weight: 600;">$</span> <span class="n" style="color: #333;">show</span> <span class="n" style="color: #333;">expr</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">ADD</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">OpReg</span> <span class="n" style="color: #333;">w</span> <span class="n" style="color: #333;">d</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">OpReg</span> <span class="n" style="color: #333;">w'</span> <span class="n" style="color: #333;">r'</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">OpImm</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">ImmInteger</span> <span class="n" style="color: #333;">n</span><span class="p">))))</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="609" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="611" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
611
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC611" class="line" lang="haskell">      <span class="c1" style="color: #998; font-style: italic;">-- XXX: 12bits lsl #12; e.g. lower 12 bits of n are 0; shift n >> 12, and set lsl to #12.</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="609" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
609
</td>
<td class="diff-line-num new_line" data-linenumber="612" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
612
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC612" class="line" lang="haskell">      <span class="c1" style="color: #998; font-style: italic;">-- OPTIMIZATION WARNING: This only works because reg is CmmGlobal</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="610" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
610
</td>
<td class="diff-line-num new_line" data-linenumber="613" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
613
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC613" class="line" lang="haskell">      <span class="kr" style="font-weight: 600;">where</span> <span class="n" style="color: #333;">w'</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">formatToWidth</span> <span class="p">(</span><span class="n" style="color: #333;">cmmTypeFormat</span> <span class="p">(</span><span class="n" style="color: #333;">cmmRegType</span> <span class="n" style="color: #333;">plat</span> <span class="n" style="color: #333;">reg</span><span class="p">))</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="611" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
611
</td>
<td class="diff-line-num new_line" data-linenumber="614" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
614
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC614" class="line" lang="haskell">            <span class="n" style="color: #333;">r'</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">getRegisterReg</span> <span class="n" style="color: #333;">plat</span> <span class="n" style="color: #333;">reg</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="612" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
612
</td>
<td class="diff-line-num new_line" data-linenumber="615" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
615
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC615" class="line" lang="haskell">    <span class="kt" style="color: #458; font-weight: 600;">CmmMachOp</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">MO_Sub</span> <span class="n" style="color: #333;">w</span><span class="p">)</span> <span class="p">[(</span><span class="kt" style="color: #458; font-weight: 600;">CmmReg</span> <span class="n" style="color: #333;">reg</span><span class="o" style="font-weight: 600;">@</span><span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmGlobal</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)),</span> <span class="kt" style="color: #458; font-weight: 600;">CmmLit</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">CmmInt</span> <span class="n" style="color: #333;">n</span> <span class="kr" style="font-weight: 600;">_</span><span class="p">)]</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="613" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
613
</td>
<td class="diff-line-num new_line" data-linenumber="616" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
616
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC616" class="line" lang="haskell">      <span class="o" style="font-weight: 600;">|</span> <span class="n" style="color: #333;">n</span> <span class="o" style="font-weight: 600;">></span> <span class="mi" style="color: #099;">0</span> <span class="o" style="font-weight: 600;">&&</span> <span class="n" style="color: #333;">n</span> <span class="o" style="font-weight: 600;"><</span> <span class="mi" style="color: #099;">4096</span> <span class="o" style="font-weight: 600;">-></span> <span class="n" style="color: #333;">return</span> <span class="o" style="font-weight: 600;">$</span> <span class="kt" style="color: #458; font-weight: 600;">Any</span> <span class="p">(</span><span class="n" style="color: #333;">intFormat</span> <span class="n" style="color: #333;">w</span><span class="p">)</span> <span class="p">(</span><span class="nf" style="color: #900; font-weight: 600;">\</span><span class="n" style="color: #333;">d</span> <span class="o" style="font-weight: 600;">-></span> <span class="n" style="color: #333;">unitOL</span> <span class="o" style="font-weight: 600;">$</span> <span class="kt" style="color: #458; font-weight: 600;">ANN</span> <span class="p">(</span><span class="n" style="color: #333;">text</span> <span class="o" style="font-weight: 600;">$</span> <span class="n" style="color: #333;">show</span> <span class="n" style="color: #333;">expr</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">SUB</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">OpReg</span> <span class="n" style="color: #333;">w</span> <span class="n" style="color: #333;">d</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">OpReg</span> <span class="n" style="color: #333;">w'</span> <span class="n" style="color: #333;">r'</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">OpImm</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">ImmInteger</span> <span class="n" style="color: #333;">n</span><span class="p">))))</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="614" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="617" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
617
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC617" class="line" lang="haskell">      <span class="c1" style="color: #998; font-style: italic;">-- XXX: 12bits lsl #12; e.g. lower 12 bits of n are 0; shift n >> 12, and set lsl to #12.</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="614" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
614
</td>
<td class="diff-line-num new_line" data-linenumber="618" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
618
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC618" class="line" lang="haskell">      <span class="c1" style="color: #998; font-style: italic;">-- OPTIMIZATION WARNING: This only works because reg is CmmGlobal</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="615" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
615
</td>
<td class="diff-line-num new_line" data-linenumber="619" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
619
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC619" class="line" lang="haskell">      <span class="kr" style="font-weight: 600;">where</span> <span class="n" style="color: #333;">w'</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">formatToWidth</span> <span class="p">(</span><span class="n" style="color: #333;">cmmTypeFormat</span> <span class="p">(</span><span class="n" style="color: #333;">cmmRegType</span> <span class="n" style="color: #333;">plat</span> <span class="n" style="color: #333;">reg</span><span class="p">))</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="616" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
616
</td>
<td class="diff-line-num new_line" data-linenumber="620" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
620
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC620" class="line" lang="haskell">            <span class="n" style="color: #333;">r'</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">getRegisterReg</span> <span class="n" style="color: #333;">plat</span> <span class="n" style="color: #333;">reg</span></span>
</pre>
</td>
</tr>

</table>
<br>
</li>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/27ea955ba4ed6d547ac86428bbe95272652a48dc">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.haskell.org/ghc/ghc/-/commit/27ea955ba4ed6d547ac86428bbe95272652a48dc"}}</script>


</p>
</div>
</body>
</html>