Skip to content

Commit

Permalink
fix native linux/arm failure (#102760)
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak authored May 29, 2024
1 parent 480d48c commit 9c9155d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 11 additions & 5 deletions src/coreclr/jit/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,24 +371,30 @@ static bool operator>(regMaskTP first, regMaskTP second)
return first.getLow() > second.getLow();
}

static regMaskTP operator<<(regMaskTP& first, const int b)
static regMaskTP operator<<(regMaskTP first, const int b)
{
regMaskTP result(first.getLow() << b);
return result;
}

static regMaskTP operator>>(regMaskTP& first, const int b)
static regMaskTP& operator<<=(regMaskTP& first, const int b)
{
first = first << b;
return first;
}
#endif

static regMaskTP operator>>(regMaskTP first, const int b)
{
regMaskTP result(first.getLow() >> b);
return result;
}

static regMaskTP& operator<<=(regMaskTP& first, const int b)
static regMaskTP& operator>>=(regMaskTP& first, const int b)
{
first = first << b;
first = first >> b;
return first;
}
#endif

static regMaskTP operator~(regMaskTP first)
{
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/jit/unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,12 @@ void Compiler::unwindPushPopMaskCFI(regMaskTP regMask, bool isFloat)
// because LLVM only know about D0-D31.
// As such pairs Sx,Sx+1 are referenced as D0-D15 registers in DWARF
// For that we process registers in pairs.
regBit >>= isFloat ? 2 : 1;
regNum = isFloat ? REG_PREV(REG_PREV(regNum)) : REG_PREV(regNum);
#else
regBit >>= 1;
regNum = REG_PREV(regNum);
#endif
regBit = genRegMask(regNum);
}
}

Expand Down

0 comments on commit 9c9155d

Please sign in to comment.