<html>
<head>
<base href="http://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 MIPS: invalid input constraint '0' in asm"
href="http://llvm.org/bugs/show_bug.cgi?id=21613">21613</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang MIPS: invalid input constraint '0' in asm
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</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>npennequ@cisco.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>When compiling a file that includes linux_syscall_support.h[1] for MIPS
(-target mipsel-linux-uclibc -march=mips32), the following errors occur:
./linux_syscall_support.h:2977:14: error: invalid input constraint '0' in asm
LSS_INLINE _syscall1(void *, brk, void *, e)
^
./linux_syscall_support.h:2596:27: note: expanded from macro '_syscall1'
LSS_REG(4, arg1); LSS_BODY(type, name, "=r", "r"(__r4)); \
^
./linux_syscall_support.h:2583:35: note: expanded from macro 'LSS_BODY'
: "0"(__v0), ##__VA_ARGS__ \
^
./linux_syscall_support.h:2978:14: error: invalid input constraint '0' in asm
LSS_INLINE _syscall1(int, chdir, const char *,p)
^
./linux_syscall_support.h:2596:27: note: expanded from macro '_syscall1'
LSS_REG(4, arg1); LSS_BODY(type, name, "=r", "r"(__r4)); \
^
./linux_syscall_support.h:2583:35: note: expanded from macro 'LSS_BODY'
: "0"(__v0), ##__VA_ARGS__ \
^
(many more of the same follow)
The same code compiles without error using mipsel-linux-uclibc-gcc 4.5.3 and
4.8.3.
$ clang --version
clang version 3.5.0 (trunk 214024)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[1]
<a href="https://code.google.com/p/linux-syscall-support/source/browse/trunk/lss/linux_syscall_support.h">https://code.google.com/p/linux-syscall-support/source/browse/trunk/lss/linux_syscall_support.h</a></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>