<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 - llvm does not support loopw/loopl"
href="https://bugs.llvm.org/show_bug.cgi?id=33741">33741</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm does not support loopw/loopl
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</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>TableGen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bonzini@gnu.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>LLVM supports jcxz/jecxz, but doesn't allow overriding the register used by the
'loop' instruction.
// compile with:
// clang -m32 test-loopw.c -O2 -o test-loopw
//
// expected output:
// 0xffff0000
#include <stdlib.h>
#include <stdio.h>
int main()
{
unsigned x = 0xffff1234;
// Intel syntax:
// asm volatile("1: addr16 loop 1b" : "+c" (x));
asm volatile("1: loopw 1b" : "+c" (x));
printf("%x\n", x);
exit (x == 0xffff0000 ? 0 : 1);
}
This seems to affect the disassembler as well. The above program is
disassembled like this:
Disassembly of section .text:
main:
...
8048354: 89 d9 movl %ebx, %ecx
8048356: 67 e2 fd loop -3
...</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>