[llvm-bugs] [Bug 51654] New: error: invalid type 'const _ExtInt(32)' in asm input cmp eax, magic

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 27 16:53:05 PDT 2021


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

            Bug ID: 51654
           Summary: error: invalid type 'const _ExtInt(32)' in asm input
                    cmp eax, magic
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pedro.lamarao at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Expected:

Clang assembler accepts constexpr _ExtInt(32) as immediate input operand in an
asm block.

Current:

Clang rejects _ExtInt input operands in asm blocks.

Consider:

constexpr _ExtInt(32) magic = 0x36d76289;

extern
void kernel ();

extern "C"
[[gnu::naked]]
void start ()
{
    __asm__
    {
        cmp eax, magic
        jne halt
        call kernel
        halt:
        hlt
        jmp halt
    }
}


https://godbolt.org/z/3588MW9s3

-- 
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/20210827/d554ffc5/attachment.html>


More information about the llvm-bugs mailing list