[PATCH] D73227: [ms] [llvm-ml] Use default RIP-relative addressing for x64 MASM.

Eric Astor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 11:42:49 PST 2020


epastor added a comment.

In D73227#1891917 <https://reviews.llvm.org/D73227#1891917>, @mstorsjo wrote:

> In D73227#1891896 <https://reviews.llvm.org/D73227#1891896>, @epastor wrote:
>
> > In D73227#1891874 <https://reviews.llvm.org/D73227#1891874>, @thakis wrote:
> >
> > > What's the plan for 64-bit inline asm?
> >
> >
> > It should probably be the same, admittedly. To clarify: isParsingInlineAsm will only be true when parsing inline MS-style assembly? If so, I'll rename it to isParsingInlineMSAsm in this patch, and let the handling trigger off of both.
>
>
> Are there any cases where MS style assembly can be injected inline on x86_64? As far as I know, MSVC didn't support any inline assembly at all on platforms other than i386.
>
> If that's the case, I think the sane thing would be to keep handling inline asm like it always has been, as gcc style inline assembly. There could, concievably, be projects that contains gcc style inline assembly within `#ifdef __clang__` (as this probably worked so far).


It's true, MSVC doesn't support inline assembly at all on non-i386 platforms.

However, LLVM currently does support MS-style inline assembly on x86-64, if you use the MS-style asm blocks... it just doesn't quite work as expected. (We've seen a few bug reports to this effect, including http://llvm.org/PR44272 - several of which have said the option of MS-style inline assembly on x86-64 is a big bonus.) Handling that here would move it closer to fully working.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73227/new/

https://reviews.llvm.org/D73227





More information about the llvm-commits mailing list