[LLVMbugs] [Bug 13199] New: clang doesn't support Y* constraints

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 25 04:54:39 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13199

             Bug #: 13199
           Summary: clang doesn't support Y* constraints
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: valery.khromov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ 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) );

    return 0;
}

$ cc -O0 -ggdb -Wall -W -mssse3 -m64 1.c -o 1

$ objdump -d 1
...
0000000000400530 <main>:
  400530:    55                       push   %rbp
  400531:    48 89 e5                 mov    %rsp,%rbp
  400534:    f3 0f 7e 05 a4 00 10     movq   1048740(%rip),%xmm0        #
5005e0 <y>
  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

-- 
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.



More information about the llvm-bugs mailing list