[LLVMbugs] [Bug 23955] New: Upper 8 registers are no longer available to asm statement
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jun 25 16:25:41 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23955
Bug ID: 23955
Summary: Upper 8 registers are no longer available to asm
statement
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: hjl.tools at gmail.com
CC: llvmbugs at cs.uiuc.edu, matze at braunis.de
Classification: Unclassified
Before r239309, this works:
[hjl at gnu-32 bin]$ cat x.c
void
foo (int p)
{
register int reg __asm__("r8") = p;
__asm__ __volatile__("# %0" : : "r" (reg));
}
[hjl at gnu-32 bin]$ ./clang -S -O2 x.c
[hjl at gnu-32 bin]$ cat x.s
.text
.file "x.c"
.globl foo
.align 16, 0x90
.type foo, at 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 at 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 at gnu-6 bin]$
If I use "r8d", I get
[hjl at gnu-6 bin]$ cat x.c
void
foo (int p)
{
register int reg __asm__("r8d") = p;
__asm__ __volatile__("# %0" : : "r" (reg));
}
[hjl at 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 at gnu-6 bin]$
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150625/c9985b2d/attachment.html>
More information about the llvm-bugs
mailing list