diff --git a/src/coreclr/jit/regMaskTPOps.cpp b/src/coreclr/jit/regMaskTPOps.cpp index 1f8910b274aec..b6122a048e252 100644 --- a/src/coreclr/jit/regMaskTPOps.cpp +++ b/src/coreclr/jit/regMaskTPOps.cpp @@ -263,3 +263,14 @@ void regMaskTP::operator^=(const regNumber reg) low ^= value; #endif } + +SingleTypeRegSet regMaskTP::operator[](int index) const +{ +#ifdef HAS_MORE_THAN_64_REGISTERS + assert(index <= 2); + RegSet32 value = _registers[index]; + return decodeForRegisterIndex(index, value); +#else + return low; +#endif +} diff --git a/src/coreclr/jit/target.h b/src/coreclr/jit/target.h index 7565ac0f6be5e..dd3ae01a652f0 100644 --- a/src/coreclr/jit/target.h +++ b/src/coreclr/jit/target.h @@ -419,6 +419,7 @@ struct regMaskTP void operator|=(const regNumber reg); void operator^=(const regNumber reg); + SingleTypeRegSet operator[](int index) const; }; static regMaskTP operator^(const regMaskTP& first, const regMaskTP& second)