mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
rename RegisterMask to BoundedRegisterMask
This commit is contained in:
parent
1110d3ff50
commit
f187361889
@ -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)
|
||||
{
|
||||
}
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user