<html>
    <head>
      <base href="http://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 --- - .cpsetup syntax handler doesn't deal with absolute offsets"
   href="http://llvm.org/bugs/show_bug.cgi?id=22518">22518</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>.cpsetup syntax handler doesn't deal with absolute offsets
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </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>new bugs
          </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>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>FreeBSD has several cases in its MIPS tree where .cpsetup is used with an
absolute offset instead of a label.

The most obvious use is in the gcc config for mips:

gcc/config/mips/mips.h

#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) \
   || (defined _ABI64 && _MIPS_SIM == _ABI64)
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
   asm (SECTION_OP "\n\
        .set noreorder\n\
        bal 1f\n\
        nop\n\
1:      .set reorder\n\
        .cpsetup $31, $2, 1b\n\
        jal " USER_LABEL_PREFIX #FUNC "\n\
        " TEXT_SECTION_ASM_OP);
#endif


I'm also tracking this in a freebsd bug at:
<a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197259">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197259</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>