[PATCH] D37461: [X86][AsmParser] re-introduce 'offset' operator

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 14:22:00 PST 2019


craig.topper added a comment.

Is this enough to keep using CreateImm and fix the push issue

  @@ -3163,7 +3202,7 @@ bool X86AsmParser::MatchAndEmitIntelInstruction(SMLoc IDLoc, unsigned &Opcode,
         // If it's not a constant fall through and let remainder take care of it.
         const auto *CE = dyn_cast<MCConstantExpr>(X86Op->getImm());
         unsigned Size = getPointerWidth();
  -      if (CE &&
  +      if (!CE ||
             (isIntN(Size, CE->getValue()) || isUIntN(Size, CE->getValue()))) {
           SmallString<16> Tmp;
           Tmp += Base;

This extends the hack we have to use pointer sized push to also do it when the immediate can't be resolved to a constant.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D37461





More information about the llvm-commits mailing list