<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Assertion failed when using RSP as .cfi_def_cfa_register: (MRI.getLLVMRegNum(Inst.getRegister(), true) == (Is64Bit ? X86::RBP : X86::EBP) && "Invalid frame pointer!")"
   href="https://llvm.org/bugs/show_bug.cgi?id=30453">30453</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed when using RSP as .cfi_def_cfa_register: (MRI.getLLVMRegNum(Inst.getRegister(), true) == (Is64Bit ? X86::RBP : X86::EBP) && "Invalid frame pointer!")
          </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>MacOS X
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sean.william.g@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Repro:

// %clang -target x86_64-apple-macho -c %s -o /dev/null

_label:
        .cfi_startproc
        .cfi_def_cfa_register rsp
        .cfi_endproc

Outputs:
Assertion failed: (MRI.getLLVMRegNum(Inst.getRegister(), true) == (Is64Bit ?
X86::RBP : X86::EBP) && "Invalid frame pointer!"), function
generateCompactUnwindEncodingImpl, file
/Users/sean/Documents/workspace/clang/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp,
line 550.
Stack dump:
0.      Program arguments:
/Users/sean/Documents/workspace/clang/build/debug/bin/clang-4.0 -cc1as -triple
x86_64-apple--macho -filetype obj -main-file-name repro.S -target-cpu x86-64
-fdebug-compilation-dir /Users/sean/Documents/workspace/clang/llvm
-dwarf-debug-producer clang version 4.0.0 (trunk 281680) (llvm/trunk 281679)
-dwarf-version=4 -mrelocation-model pic -o /dev/null
/var/folders/b2/t16__58j5437wpqs_fbms4gr0000gn/T/repro-cfe9af.s
clang-4.0: error: unable to execute command: Abort trap: 6
clang-4.0: error: clang integrated assembler command failed due to signal (use
-v to see invocation)
clang version 4.0.0 (trunk 281680) (llvm/trunk 281679)
Target: x86_64-apple--macho
Thread model: posix
InstalledDir: /Users/sean/Documents/workspace/clang/llvm/../build/debug/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.0: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg:
/var/folders/b2/t16__58j5437wpqs_fbms4gr0000gn/T/repro-d8f001.S
clang-4.0: note: diagnostic msg:
/var/folders/b2/t16__58j5437wpqs_fbms4gr0000gn/T/repro-d8f001.sh
clang-4.0: note: diagnostic msg:

********************

The expected behavior is for clang to raise an error in this case (for the ABI
violation) instead of asserting.</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>