<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 --- - .cpreturn unsupported" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23660&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=vLrhLClrSPj_04xoDyGV_U-roMw9UpCBmjJ6FfDDfTc&s=zEVMdKZQMD1xyI_HdevXpmYnxa47MVC9srL_6PPMS0s&e=">23660</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>.cpreturn unsupported
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </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>Backend: MIPS
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sbruno@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>emaste@freebsd.org, joerg@NetBSD.org, llvmbugs@cs.uiuc.edu, sbruno@freebsd.org, toma.tabacu@imgtec.com
          </td>
        </tr>

        <tr>
          <th>Depends on</th>
          <td>20967
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>23370
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The .cpreturn instruction is not supported by IAS and is used in the FreeBSD
build of libc:

sys/mips/include/asm.h:#define  RESTORE_GP64            .cpreturn

lib/libc/mips/sys/cerror.S:
        .globl  _C_LABEL(__error)
NESTED_NOPROFILE(__cerror, CALLFRAME_SIZ, ra)
        .mask   0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ)
        SETUP_GP
        PTR_SUBU        sp, sp, CALLFRAME_SIZ
        SETUP_GP64(CALLFRAME_GP, __cerror)
        SAVE_GP(CALLFRAME_GP)

        PTR_S           ra, CALLFRAME_RA(sp)
        REG_S           v0, CALLFRAME_S0(sp)    # save errno value

        PTR_LA          t9, _C_LABEL(__error)   # locate address of errno
        jalr            t9

        REG_L           t0, CALLFRAME_S0(sp)
        PTR_L           ra, CALLFRAME_RA(sp)
        INT_S           t0, 0(v0)               # update errno value

        RESTORE_GP64
        PTR_ADDU        sp, sp, CALLFRAME_SIZ

        li              v0, -1
        li              v1, -1

        j               ra
END(__cerror)</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>