[llvm-bugs] [Bug 30930] Assertion failed: isValidGCCRegisterName(Name) && "Invalid register passed in", file E:\llvm\tools\clang\lib\Basic\Targe tInfo.cpp, line 415

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 31 07:10:13 PDT 2019


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

Nico Weber <nicolasweber at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
                 CC|                            |nicolasweber at gmx.de

--- Comment #1 from Nico Weber <nicolasweber at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190731/d5ecf74a/attachment.html>


More information about the llvm-bugs mailing list