[llvm-bugs] [Bug 33741] New: llvm does not support loopw/loopl
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 11 01:00:54 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33741
Bug ID: 33741
Summary: llvm does not support loopw/loopl
Product: tools
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: TableGen
Assignee: unassignedbugs at nondot.org
Reporter: bonzini at gnu.org
CC: llvm-bugs at lists.llvm.org
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
...
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170711/051254a7/attachment.html>
More information about the llvm-bugs
mailing list