diff --git a/src/coreclr/jit/target.h b/src/coreclr/jit/target.h index 932c4ca41cabb9..8c615cc3bc1708 100644 --- a/src/coreclr/jit/target.h +++ b/src/coreclr/jit/target.h @@ -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) { diff --git a/src/coreclr/jit/unwind.cpp b/src/coreclr/jit/unwind.cpp index 97f05939013906..a51a52ab21d640 100644 --- a/src/coreclr/jit/unwind.cpp +++ b/src/coreclr/jit/unwind.cpp @@ -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); } }