rename RegisterMask to BoundedRegisterMask

This commit is contained in:
Joshua Warner 2014-12-04 15:18:54 -07:00
parent 1110d3ff50
commit f187361889
3 changed files with 10 additions and 10 deletions

View File

@ -16,7 +16,7 @@
namespace avian {
namespace codegen {
class RegisterMask {
class BoundedRegisterMask {
public:
uint32_t mask;
uint8_t start;
@ -25,7 +25,7 @@ class RegisterMask {
static unsigned maskStart(uint32_t mask);
static unsigned maskLimit(uint32_t mask);
inline RegisterMask(uint32_t mask)
inline BoundedRegisterMask(uint32_t mask)
: mask(mask), start(maskStart(mask)), limit(maskLimit(mask))
{
}
@ -33,9 +33,9 @@ class RegisterMask {
class RegisterFile {
public:
RegisterMask allRegisters;
RegisterMask generalRegisters;
RegisterMask floatRegisters;
BoundedRegisterMask allRegisters;
BoundedRegisterMask generalRegisters;
BoundedRegisterMask floatRegisters;
inline RegisterFile(uint32_t generalRegisterMask, uint32_t floatRegisterMask)
: allRegisters(generalRegisterMask | floatRegisterMask),
@ -48,9 +48,9 @@ class RegisterFile {
class RegisterIterator {
public:
int index;
const RegisterMask& mask;
const BoundedRegisterMask& mask;
inline RegisterIterator(const RegisterMask& mask)
inline RegisterIterator(const BoundedRegisterMask& mask)
: index(mask.start), mask(mask)
{
}

View File

@ -13,7 +13,7 @@
namespace avian {
namespace codegen {
unsigned RegisterMask::maskStart(uint32_t mask)
unsigned BoundedRegisterMask::maskStart(uint32_t mask)
{
for (int i = 0; i <= 31; ++i) {
if (mask & (1 << i))
@ -22,7 +22,7 @@ unsigned RegisterMask::maskStart(uint32_t mask)
return 32;
}
unsigned RegisterMask::maskLimit(uint32_t mask)
unsigned BoundedRegisterMask::maskLimit(uint32_t mask)
{
for (int i = 31; i >= 0; --i) {
if (mask & (1 << i))

View File

@ -19,7 +19,7 @@ using namespace vm;
TEST(RegisterIterator)
{
RegisterMask regs(0x55);
BoundedRegisterMask regs(0x55);
assertEqual<unsigned>(0, regs.start);
assertEqual<unsigned>(7, regs.limit);