<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 - LVI-CFI overwrites register used for return value"
   href="https://bugs.llvm.org/show_bug.cgi?id=47740">47740</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LVI-CFI overwrites register used for return value
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm-bugzilla@jbeekman.nl
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following code:

target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define { i64, i128 } @ret_i64_i128() #0 {
  ret { i64, i128 } { i64 1, i128 36893488147419103235 }
}

attributes #0 = { "target-features"="+lvi-cfi" }

Generates the following assembly:

ret_i64_i128:                           # @ret_i64_i128
        .cfi_startproc
# %bb.0:
        movl    $1, %eax
        movl    $3, %edx
        movl    $2, %ecx
        popq    %rcx
        lfence
        jmpq    *%rcx
.Lfunc_end0:
        .size   ret_i64_i128, .Lfunc_end0-ret_i64_i128
        .cfi_endproc

As you can tell, the LVI-CFI pass is using RCX although that register was used
for part of the return value.</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>