clang doesn't support Y-prefixed asm constraints #13571
Labels
bugzilla
Issues migrated from bugzilla
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
Extended Description
$ cat 1.c
#include <inttypes.h>
static uint64_t y = 0x123456789ABCDEF0ULL;
int
main()
{
register uint64_t x;
asm volatile ( "movq %1, %0" : "=Yz"(x) : "m"(y) );
}
$ cc -O0 -ggdb -Wall -W -mssse3 -m64 1.c -o 1
$ objdump -d 1
:...
0000000000400530
400530: 55 push %rbp
400531: 48 89 e5 mov %rsp,%rbp
400534: f3 0f 7e 05 a4 00 10 movq 1048740(%rip),%xmm0 # 5005e0
40053b: 00
40053c: b8 00 00 00 00 mov $0x0,%eax
400541: c9 leaveq
400542: c3 retq
...
$ clang -O0 -ggdb -Wall -W -mssse3 -m64 1.c -o 1
1.c:9:33: error: invalid output constraint '=Yz' in asm
asm volatile ( "movq %1, %0" : "=Yz"(x) : "m"(y) );
^
1 error generated.
$ cc --version
cc (GCC) 4.2.2 20070831 prerelease [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ clang --version
clang version 3.1 (trunk)
Target: amd64-portbld-freebsd8.2
Thread model: posix
The text was updated successfully, but these errors were encountered: