https://bugs.llvm.org/show_bug.cgi?id=30930

Nico Weber <nicolaswe...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
                 CC|                            |nicolaswe...@gmx.de

--- Comment #1 from Nico Weber <nicolaswe...@gmx.de> ---
This seems to work now:

$ cat test.c
void foo(void)
{
    __asm mov cr2, eax;
}
$ out/gn/bin/clang-cl /c test.c
test.c(3,5): error: instruction requires: Not 64-bit mode
    __asm mov cr2, eax;
    ^
<inline asm>(2,2): note: instantiated into assembly here
        mov cr2, eax
        ^
1 error generated.
$ out/gn/bin/clang-cl /c test.c -m32

$ out/gn/bin/llvm-objdump --disassemble test.obj

test.obj:       file format COFF-i386


Disassembly of section .text:

00000000 _foo:
       0: 55                            pushl   %ebp
       1: 89 e5                         movl    %esp, %ebp
       3: 0f 22 d0                      movl    %eax, %cr2
       6: 5d                            popl    %ebp
       7: c3                            retl

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to