http://llvm.org/bugs/show_bug.cgi?id=9437
Summary: ambiguous instructions require an explicit suffix
Product: clang
Version: 2.9
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
With:
void set_bit(volatile long *addr)
{
int nr = 2;
asm volatile("bts %1,%0" : "+m" (*addr) : "Ir" (nr) : "memory");
}
OK:
$ clang --version
clang version 2.8 (branches/release_28)
$ clang -nostdinc -O2 bts.c -o bts.o -c
$ objdump -d bts.o
0000000000000000 <set_bit>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 0f ba 2f 02 btsl $0x2,(%rdi)
8: 5d pop %rbp
9: c3 retq
$ gcc --version
gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
$ gcc -nostdinc -O2 bts.c -o bts.o -c
$ objdump -d bts.o
0000000000000000 <set_bit>:
0: 0f ba 2f 02 btsl $0x2,(%rdi)
4: c3 retq
Not OK:
$ /l/latest/repos/llvm-build/bin/clang --version
clang version 2.9 (trunk)
$ /l/latest/repos/llvm-build/bin/clang -nostdinc -O2 bts.c -o bts.o -c
bts.c:4:15: error: ambiguous instructions require an explicit suffix (could be
'btsw', 'btsl', or 'btsq')
asm volatile("bts %1,%0" : "+m" (*addr) : "Ir" (nr) : "memory");
^
<inline asm>:1:2: note: instantiated into assembly here
bts $2,(%rdi)
^
1 error generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs