<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 - ARM inline assembler constant value operand substitution with %c does not work"
href="https://bugs.llvm.org/show_bug.cgi?id=36609">36609</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ARM inline assembler constant value operand substitution with %c does not work
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</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>Keywords</th>
<td>compile-fail
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>llc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>matthias.lange@kernkonzept.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=19999" name="attach_19999" title="test case triggering the bug">attachment 19999</a> <a href="attachment.cgi?id=19999&action=edit" title="test case triggering the bug">[details]</a></span>
test case triggering the bug
I have an inline assembly statement which uses '%c' for constant value operand
substitution
asm volatile (".long %c[xfmt] \n\t" : : [xfmt] "i" (&get_3));
This compiles fine with clang for x86 with the following cmdline
$ clang test.c
However, cross compiling it for ARM with
$ clang --target=arm-linux-gnueabihf test.c
or using clang natively on an ARM machine results in the following error
error: invalid operand in inline asm: '.long ${0:c}
I have attached a test case (test.c) and I verified this issue with clang 3.8,
3.9, 4.0 and 5.0.</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>