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

            Bug ID: 20201
           Summary: clang-cl: cannot compile this unexpected cast lvalue
                    yet in inline assembly
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

$ cat test.cpp
#include <stdint.h>

typedef __declspec(align(16)) uint32_t uvec32[4];

static uvec32 kHash16x33 = { 0x92d9e201, 0, 0, 0 }; // 33 ^ 16
static uvec32 kHashMul3 = {
  0x00008c61, // 33 ^ 3
  0x00000441, // 33 ^ 2
  0x00000021, // 33 ^ 1
  0x00000001, // 33 ^ 0
};

uint32_t HashDjb2_SSE41(const uint8_t* src) {
  uint32_t hash;
  asm volatile ( // NOLINT
    "movd      %%xmm0,%3                       \n"
  : "+r"(src), // %0
    "=g"(hash) // %3
  : "m"(kHash16x33), // %4
    "m"(kHashMul3) // %8
  : "memory", "cc"
    , "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
  ); // NOLINT
  return hash;
}


$ clang-cl -c test.cpp
test.cpp(19,9) :  error: cannot compile this unexpected cast lvalue yet
  : "m"(kHash16x33), // %4
        ^~~~~~~~~~
test.cpp(20,9) :  error: cannot compile this unexpected cast lvalue yet
    "m"(kHashMul3) // %8
        ^~~~~~~~~
2 errors generated.

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

Reply via email to