Skip to content

Commit

Permalink
Fix issue #32466 (#32804)
Browse files Browse the repository at this point in the history
* Fix issue #32466

Fixes outerloop leg: R2R Windows_NT x86 Checked no_tiered_compilation @ Windows.10.Amd64.Open

* Updated the comment associated with this assert
  • Loading branch information
briansull committed Feb 26, 2020
1 parent 97b0b37 commit 4807684
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/coreclr/src/jit/emitxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2833,9 +2833,16 @@ void emitter::emitHandleMemOp(GenTreeIndir* indir, instrDesc* id, insFormat fmt,
// Absolute addresses marked as contained should fit within the base of addr mode.
assert(memBase->AsIntConCommon()->FitsInAddrBase(emitComp));

// Either not generating relocatable code, or addr must be an icon handle, or the
// constant is zero (which we won't generate a relocation for).
assert(!emitComp->opts.compReloc || memBase->IsIconHandle() || memBase->IsIntegralConst(0));
// If we reach here, either:
// - we are not generating relocatable code, (typically the non-AOT JIT case)
// - the base address is a handle represented by an integer constant,
// - the base address is a constant zero, or
// - the base address is a constant that fits into the memory instruction (this can happen on x86).
// This last case is captured in the FitsInAddrBase method which is used by Lowering to determine that it can
// be contained.
//
assert(!emitComp->opts.compReloc || memBase->IsIconHandle() || memBase->IsIntegralConst(0) ||
memBase->AsIntConCommon()->FitsInAddrBase(emitComp));

if (memBase->AsIntConCommon()->AddrNeedsReloc(emitComp))
{
Expand Down

0 comments on commit 4807684

Please sign in to comment.