<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Windows][AArch64] Inconsistent handling of HFAs/HVAs"
   href="https://bugs.llvm.org/show_bug.cgi?id=47611">47611</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Windows][AArch64] Inconsistent handling of HFAs/HVAs
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Richard.Townsend@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Mentioned by Eli Friedman when the initial Clang work was done to support the
Windows on Arm ABI[1] Microsoft have confirmed how their HFA/HVA handling
works.[2] In the case of:

  struct Pod {
    double b[2];
  };
  struct NotAggregate {
    NotAggregate();
    double b[2];
  };
  struct NotPod {
    NotAggregate x;
  };
  Pod copy(Pod *x) { return *x; }  // MSVC: ldp d0,d1,[x0], Clang: ldp
d0,d1,[x0]
  NotAggregate copy(NotAggregate *x) { return *x; } // MSVC: stp x8,x9,[x0],
Clang: str q0,[x0]
  NotPod copy(NotPod *x) { return *x; } // MSVC: ldp x0,x1,[x8], Clang:
d0,d1,[x0]

Microsoft has clarified that NotPod is not considered HFA in this ABI, because
NotAggregate is also considered not to be HFA - all base classes and members
should have the same HFA type to be considered HFA.

[1] <a href="https://reviews.llvm.org/D60349">https://reviews.llvm.org/D60349</a> 
[2]
<a href="https://developercommunity.visualstudio.com/content/problem/1179157/arm64-abi-inconsistent-handling-of-hfas.html">https://developercommunity.visualstudio.com/content/problem/1179157/arm64-abi-inconsistent-handling-of-hfas.html</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>