<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 --- - failure to parse %b0"
href="http://llvm.org/bugs/show_bug.cgi?id=18315">18315</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>failure to parse %b0
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>LLVM assembly language parser
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dhill@mindcry.org
</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 the following code snippet:
#define DOINT(n) "int $0x20+(" #n ")"
__asm __volatile(DOINT(0x1a) "\n\t"
"setc %b0\n\t"
"movb %%ch, 0(%2)\n\t"
"movb %%cl, 1(%2)\n\t"
"movb %%dh, 2(%2)\n\t"
"movb %%dl, 3(%2)\n\t"
: "=a" (f)
: "0" (f), "p" (b) : "%ecx", "%edx", "cc");
clang reports
error:
unexpected token in memory operand
"setc %b0\n\t"
^
<inline asm>:3:14: note: instantiated into assembly here
movb %ch, 0(-8(%ebp))
^
/usr/src/sys/arch/i386/stand/boot/../libsa/time.c:81:25: error:
unexpected token in memory operand
"movb %%ch, 0(%2)\n\t"
^
<inline asm>:4:14: note: instantiated into assembly here
movb %cl, 1(-8(%ebp))
^
/usr/src/sys/arch/i386/stand/boot/../libsa/time.c:82:25: error:
unexpected token in memory operand
"movb %%cl, 1(%2)\n\t"
^
<inline asm>:5:14: note: instantiated into assembly here
movb %dh, 2(-8(%ebp))
^
/usr/src/sys/arch/i386/stand/boot/../libsa/time.c:83:25: error:
unexpected token in memory operand
"movb %%dh, 2(%2)\n\t"
^
<inline asm>:6:14: note: instantiated into assembly here
movb %dl, 3(-8(%ebp))
^
4 errors generated.
While, -no-integrated-as, it produces:
/tmp/time-cEtCow.s: Assembler messages:
/tmp/time-cEtCow.s:172: Error: junk `(-8(%ebp))' after expression
/tmp/time-cEtCow.s:173: Error: junk `(-8(%ebp))' after expression
/tmp/time-cEtCow.s:174: Error: junk `(-8(%ebp))' after expression
/tmp/time-cEtCow.s:175: Error: junk `(-8(%ebp))' after expression
clang-3.3: error: assembler command failed with exit code 1 (use -v to
see invocation)</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>