[cfe-dev] MS style ASM failure and crash

David Majnemer david.majnemer at gmail.com
Thu Feb 27 09:52:10 PST 2014


Regardless of the validity, you are seeing an assertion failure.

Please file a bug report at llvm.org/bugs and attach the preprocessed
output and include the command line used.

Thanks!

On Thu Feb 27 2014 at 7:24:35 AM, JB Feldman <jb.feldman at kyrus-tech.com>
wrote:

> Hi guys,
>
> I will file a bug report in a little bit (once I get a minimal test case)
> but I wanted to ask if anyone understands the problem I'm seeing.
>
> Trying to include ntddk.h and compiling with clang-cl, I get the following
> message:
>
> In file included from kbfiltr.c:19:
> In file included from ./kbfiltr.h:28:
> C:\WINDDK\3790.1830\inc\ddk\wxp\ntddk.h(7149,29) :  error: unexpected type
> name
>       'KPCR': expected expression
>     __asm {  movzx eax, _PCR KPCR.Number  }
>                              ^
> Assertion failed: End.getPointer() <= EndPtr && "frontend claimed part of
> a token?", file ..\..\..\..\..\lib\Target\X86\AsmParser\X86AsmParser.cpp,
> line 1481
> clang-cl.exe: error: clang frontend command failed with exit code 3 (use
> -v to s
> ee invocation)
>
> The assertion failure obviously results in a crash.
>
> So my initial guess was some kind of Lexer issue, maybe because of no
> semicolon, or... who knows. But then, I rewrote that code to read:
>
> int x = FIELD_OFFSET(KPCR, Number);
> __asm { movzx eax, fs:[x] }
>
> Which compiles to the same code, and that actually did work with clang-cl.
> Can anyone tell me why one works and the other doesn't? (My guess: MS not
> following standard Intel notation spec)
>
> Thanks,
> JB
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140227/58a1c3e1/attachment.html>


More information about the cfe-dev mailing list