Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions src/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1869,26 +1869,26 @@ bool CodeGen::genCreateAddrMode(GenTreePtr addr,
The following indirections are valid address modes on x86/x64:

[ icon] * not handled here
[reg ] * not handled here
[reg ]
[reg + icon]
[reg2 + reg1 ]
[reg2 + reg1 + icon]
[reg2 + 2 * reg1 ]
[reg2 + 4 * reg1 ]
[reg2 + 8 * reg1 ]
[ 2 * reg1 + icon]
[ 4 * reg1 + icon]
[ 8 * reg1 + icon]
[reg2 + 2 * reg1 + icon]
[reg2 + 4 * reg1 + icon]
[reg2 + 8 * reg1 + icon]
[reg1 + reg2 ]
[reg1 + reg2 + icon]
[reg1 + 2 * reg2 ]
[reg1 + 4 * reg2 ]
[reg1 + 8 * reg2 ]
[ 2 * reg2 + icon]
[ 4 * reg2 + icon]
[ 8 * reg2 + icon]
[reg1 + 2 * reg2 + icon]
[reg1 + 4 * reg2 + icon]
[reg1 + 8 * reg2 + icon]

The following indirections are valid address modes on arm64:

[reg]
[reg + icon]
[reg2 + reg1]
[reg2 + reg1 * natural-scale]
[reg1 + reg2]
[reg1 + reg2 * natural-scale]

*/

Expand Down Expand Up @@ -2448,6 +2448,11 @@ bool CodeGen::genCreateAddrMode(GenTreePtr addr,

noway_assert(FitsIn<INT32>(cns));

if (rv1 == nullptr && rv2 == nullptr)
{
return false;
}

/* Success - return the various components to the caller */

*revPtr = rev;
Expand Down
1 change: 1 addition & 0 deletions src/jit/gentree.h
Original file line number Diff line number Diff line change
Expand Up @@ -4166,6 +4166,7 @@ struct GenTreeAddrMode : public GenTreeOp
GenTreeAddrMode(var_types type, GenTreePtr base, GenTreePtr index, unsigned scale, unsigned offset)
: GenTreeOp(GT_LEA, type, base, index)
{
assert(base != nullptr || index != nullptr);
gtScale = scale;
gtOffset = offset;
}
Expand Down