Re: [PATCH] D12399: Microsoft compatibility – add support for “relaxation” of memory operands in inline assembly.
michael zuckerman via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 07:14:08 PST 2015
m_zuckerman added inline comments.
================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2670-2672
@@ +2669,5 @@
+ uint64_t ErrorInfoIgnore;
+ // We are doing relaxcation only for microsoft OS.
+ // This will work only with triple -x86-64-pc-windows-msvc
+ bool RelaxcationMode = STI.getTargetTriple().getOS() == STI.getTargetTriple().Win32;
+ unsigned M = MatchInstructionImpl(Operands, MInst, ErrorInfoIgnore,
----------------
rnk wrote:
> t.p.northover wrote:
> > majnemer wrote:
> > > Would it make more sense to predicate this on whether or not we are doing inline assembly instead of whether or not our OS is Windows?
> > I'm still keen to limit it to Windows somehow. I don't think people writing Intel inline assembly elsewhere will want wrong access size to be silently ignored: either of the contradictory specifiers could be the one intended.
> It seems like we really want this to be protected by -fms-compatibility. I wonder if we should thread that flag through to the assembler.
I agree with you about the -fms-compatability. Regarding your saying, “It seems like we really want this to be protected by -fms-compatibility. I wonder if we should thread that flag through to the assembler”, I’ve checked it, and lowering this flag to LLVM is currently not supported by clang. If you know of any way to do it correctly, please let me know. I believe we should first commit the general logic that supports these MS “relaxations” using the triple, and then, at the second stage we should discuss (with clang guys as well) how to connect the “fms-compatability” to this logic instead of the triple.
Unlike “fms-compatability”, the triple is available in the X86AsmParser, and nobody except for users that use intel syntax inlineasm under the Microsoft triple will be affected by this.
http://reviews.llvm.org/D12399
More information about the llvm-commits
mailing list