<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 --- - Upper 8 registers are no longer available to asm statement" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23955&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=ZvNRW0MpOrhrj1TxuoQ50nadsctVMOMFro52-HNLVdk&s=u_W9QXF8yh4BXtYE7l7X5YuD2pcR0MYel9WLd2alTn0&e=">23955</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Upper 8 registers are no longer available to asm statement
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>hjl.tools@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, matze@braunis.de
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Before r239309, this works:

[hjl@gnu-32 bin]$ cat x.c
void
foo (int p)
{
  register int reg __asm__("r8") = p;
  __asm__ __volatile__("# %0" : : "r" (reg));
}
[hjl@gnu-32 bin]$ ./clang  -S -O2 x.c
[hjl@gnu-32 bin]$ cat x.s
    .text
    .file    "x.c"
    .globl    foo
    .align    16, 0x90
    .type    foo,@function
foo:                                    # @foo
    .cfi_startproc
# BB#0:
    movl    %edi, %r8d
    #APP

    #NO_APP
    retq
.Lfunc_end0:
    .size    foo, .Lfunc_end0-foo
    .cfi_endproc

Now, I got

[hjl@gnu-6 bin]$ ./clang  -S -O2 x.c
x.c:5:24: error: couldn't allocate input reg for constraint '{r8}'
  __asm__ __volatile__("# %0" : : "r" (reg));
                       ^
1 error generated.
[hjl@gnu-6 bin]$ 

If I use "r8d", I get

[hjl@gnu-6 bin]$ cat x.c
void
foo (int p)
{
  register int reg __asm__("r8d") = p;
  __asm__ __volatile__("# %0" : : "r" (reg));
}
[hjl@gnu-6 bin]$ ./clang  -S -O2 x.c
x.c:4:28: error: unknown register name 'r8d' in asm
  register int reg __asm__("r8d") = p;
                           ^
1 error generated.
[hjl@gnu-6 bin]$</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>