<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang-cl: psubb xmm0, byte ptr kFsub80 - error: invalid operand for instruction"
href="https://llvm.org/bugs/show_bug.cgi?id=28266">28266</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl: psubb xmm0, byte ptr kFsub80 - error: invalid operand for instruction
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>fbarchard@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The following builds with Visual C but not clang-cl
typedef __declspec(align(16)) uint8 uvec8[16];
static uvec8 kFsub80 =
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
psubb xmm0, kFsub80
clang-cl reports:
..\..\source\scale_win.cc(877,3): error: invalid operand for instruction
__asm {
^
<inline asm>(35,2): note: instantiated into assembly here
psubb xmm0, byte ptr kFsub80
^
as a work around I can cast the pointer:
psubb xmm0, xmmword ptr kFsub80
For clangcl I'm using Visual C syntax
typedef __declspec(align(16)) uint8 uvec8[16];
but for clang I use GCC syntax
typedef uint8 __attribute__((vector_size(16))) uvec8;
Is there a Visual C way to declare a vector that is compatible with clangcl
without explicit casts?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>