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 ...
*** Bug 33737 has been marked as a duplicate of this bug. ***