[PATCH] D35621: X86 Asm can't work properly with symbolic Scale
Andrew V. Tischenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 03:43:51 PDT 2017
avt77 added inline comments.
================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:616
State = IES_INTEGER;
- Sym = SymRef;
- SymName = SymRefName;
- IC.pushOperand(IC_IMM);
+ if (isParsingInlineAsm || !isNextMult) {
+ Sym = SymRef;
----------------
avt77 wrote:
> coby wrote:
> > Note that this patch breaks //'ms-inline-asm.c'// on //'clang/test/Sema'//
> I'm no sure I understand you here. As result of the patch we have the following:
>
> void t3() {
> -- __asm { mov eax, [eax] UndeclaredId } // expected-error {{unknown token in expression}} expected-error {{use of undeclared label 'UndeclaredId'}}
> + __asm { mov eax, [eax] UndeclaredId } // expected-error {{invalid address operation}} expected-error {{use of undeclared label 'UndeclaredId'}}
>
> // FIXME: Only emit one diagnostic here.
> // expected-error at +3 {{use of undeclared label 'A'}}
> // expected-error at +2 {{unexpected type name 'A': expected expression}}
> -- // expected-error at +1 {{unknown token in expression}}
> + // expected-error at +1 {{invalid address operation}}
> __asm { mov eax, [eax] A }
> }
>
> As you see "unknown token" message was replaced by "invalid address operation". Does it mean "break" for this test?
Don't know the reason but "bullet" above means "minus".
https://reviews.llvm.org/D35621
More information about the llvm-commits
mailing list