<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - ppc64 VSX asm inline asm fails."
href="https://bugs.llvm.org/show_bug.cgi?id=33684">33684</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ppc64 VSX asm inline asm fails.
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rich@pennware.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18747" name="attach_18747" title="The functions that fail.">attachment 18747</a> <a href="attachment.cgi?id=18747&action=edit" title="The functions that fail.">[details]</a></span>
The functions that fail.
/*The following four functions from the current musl sources fail to compile
for various reasons with the command line
clang -target ppc64le-linux ppc.c
The first two get
ppc.c:38:38: error: invalid output constraint '=ww' in asm
__asm__ ("xsmaxdp %x0, %x1, %x2" : "=ww"(x) : "ww"(x), "ww"(y));
^
ppc.c:44:38: error: invalid output constraint '=ww' in asm
__asm__ ("xsmindp %x0, %x1, %x2" : "=ww"(x) : "ww"(x), "ww"(y));
^
and the second two two get
ppc.c:52:12: error: invalid operand in inline asm: 'xsmaxdp ${0:x}, ${1:x},
${2:x}'
__asm__ ("xsmaxdp %x0, %x1, %x2" : "=ws"(x) : "ws"(x), "ws"(y));
^
ppc.c:52:12: error: invalid operand in inline asm: 'xsmaxdp ${0:x}, ${1:x},
${2:x}'
ppc.c:52:12: error: invalid operand in inline asm: 'xsmaxdp ${0:x}, ${1:x},
${2:x}'
ppc.c:52:12: error: unknown operand
<inline asm>:1:10: note: instantiated into assembly here
xsmaxdp , ,
^
ppc.c:58:12: error: invalid operand in inline asm: 'xsmindp ${0:x}, ${1:x},
${2:x}'
__asm__ ("xsmindp %x0, %x1, %x2" : "=ws"(x) : "ws"(x), "ws"(y));
^
ppc.c:58:12: error: invalid operand in inline asm: 'xsmindp ${0:x}, ${1:x},
${2:x}'
ppc.c:58:12: error: invalid operand in inline asm: 'xsmindp ${0:x}, ${1:x},
${2:x}'
ppc.c:58:12: error: unknown operand
<inline asm>:1:10: note: instantiated into assembly here
xsmindp , ,
^
*/
#if 1
float fmaxf(float x, float y)
{
__asm__ ("xsmaxdp %x0, %x1, %x2" : "=ww"(x) : "ww"(x), "ww"(y));
return x;
}
float fminf(float x, float y)
{
__asm__ ("xsmindp %x0, %x1, %x2" : "=ww"(x) : "ww"(x), "ww"(y));
return x;
}
#else
double fmax(double x, double y)
{
__asm__ ("xsmaxdp %x0, %x1, %x2" : "=ws"(x) : "ws"(x), "ws"(y));
return x;
}
double fmin(double x, double y)
{
__asm__ ("xsmindp %x0, %x1, %x2" : "=ws"(x) : "ws"(x), "ws"(y));
return x;
}
#endif</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>