From 45cc85829a199dbf418ff706a2a53df3ffbd2700 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Thu, 4 Dec 2014 16:32:52 -0700 Subject: [PATCH] remove old 32-bit registerMask stuff --- include/avian/codegen/architecture.h | 11 +---------- src/codegen/compiler.cpp | 4 ++-- src/codegen/compiler/event.cpp | 26 ++++++++++---------------- src/codegen/compiler/site.h | 2 +- 4 files changed, 14 insertions(+), 29 deletions(-) diff --git a/include/avian/codegen/architecture.h b/include/avian/codegen/architecture.h index b43582cfe4..756a67012c 100644 --- a/include/avian/codegen/architecture.h +++ b/include/avian/codegen/architecture.h @@ -45,21 +45,12 @@ class OperandMask { { } - // TEMPORARY! - OperandMask(uint8_t typeMask, - RegisterMask registerMask) - : typeMask(typeMask), - lowRegisterMask(registerMask), - highRegisterMask(registerMask >> 32) - { - } - OperandMask() : typeMask(~0), lowRegisterMask(~static_cast(0)), highRegisterMask(~static_cast(0)) { } void setLowHighRegisterMasks(RegisterMask lowRegisterMask, RegisterMask highRegisterMask) { - this->lowRegisterMask = lowRegisterMask | (highRegisterMask << 32); + this->lowRegisterMask = lowRegisterMask; this->highRegisterMask = highRegisterMask; } }; diff --git a/src/codegen/compiler.cpp b/src/codegen/compiler.cpp index 1f5a23f0fe..d4f05b4f8e 100644 --- a/src/codegen/compiler.cpp +++ b/src/codegen/compiler.cpp @@ -342,7 +342,7 @@ Site* maybeMove(Context* c, OperandMask src; OperandMask tmp; c->arch->planMove( - size, src, tmp, OperandMask(dstMask.typeMask, dstMask.registerMask)); + size, src, tmp, OperandMask(dstMask.typeMask, dstMask.registerMask, 0)); SiteMask srcMask = SiteMask::lowPart(src); for (SiteIterator it(c, value, true, includeNextWord); it.hasMore();) { @@ -369,7 +369,7 @@ Site* maybeMove(Context* c, size, src, tmp, - OperandMask(1 << dstSite->type(c), dstSite->registerMask(c))); + OperandMask(1 << dstSite->type(c), dstSite->registerMask(c), 0)); SiteMask srcMask = SiteMask::lowPart(src); unsigned cost = 0xFFFFFFFF; diff --git a/src/codegen/compiler/event.cpp b/src/codegen/compiler/event.cpp index d49ec49a2f..e2312db18f 100644 --- a/src/codegen/compiler/event.cpp +++ b/src/codegen/compiler/event.cpp @@ -784,8 +784,8 @@ class MoveEvent : public Event { srcSelectSize, OperandMask( 1 << srcValue->source->type(c), - (static_cast(srcValue->nextWord->source->registerMask(c)) - << 32) | static_cast(srcValue->source->registerMask(c))), + srcValue->source->registerMask(c), + srcValue->nextWord->source->registerMask(c)), dstSize, dst); @@ -1127,17 +1127,13 @@ class CombineEvent : public Event { firstValue->type.size(c->targetInfo), OperandMask( 1 << firstValue->source->type(c), - (static_cast( - firstValue->nextWord->source->registerMask(c)) - << 32) - | static_cast(firstValue->source->registerMask(c))), + firstValue->source->registerMask(c), + firstValue->nextWord->source->registerMask(c)), secondValue->type.size(c->targetInfo), OperandMask( 1 << secondValue->source->type(c), - (static_cast( - secondValue->nextWord->source->registerMask(c)) - << 32) - | static_cast(secondValue->source->registerMask(c))), + secondValue->source->registerMask(c), + secondValue->nextWord->source->registerMask(c)), resultValue->type.size(c->targetInfo), cMask); @@ -1319,10 +1315,8 @@ class TranslateEvent : public Event { firstValue->type.size(c->targetInfo), OperandMask( 1 << firstValue->source->type(c), - (static_cast( - firstValue->nextWord->source->registerMask(c)) - << 32) - | static_cast(firstValue->source->registerMask(c))), + firstValue->source->registerMask(c), + firstValue->nextWord->source->registerMask(c)), resultValue->type.size(c->targetInfo), bMask); @@ -1718,9 +1712,9 @@ class BranchEvent : public Event { OperandMask dstMask; c->arch->planDestination(op, firstValue->type.size(c->targetInfo), - OperandMask(0, 0), + OperandMask(0, 0, 0), firstValue->type.size(c->targetInfo), - OperandMask(0, 0), + OperandMask(0, 0, 0), c->targetInfo.pointerSize, dstMask); diff --git a/src/codegen/compiler/site.h b/src/codegen/compiler/site.h index a01a4f35e0..6d549c116e 100644 --- a/src/codegen/compiler/site.h +++ b/src/codegen/compiler/site.h @@ -35,7 +35,7 @@ class SiteMask { } SiteMask(uint8_t typeMask, RegisterMask registerMask, int frameIndex) - : typeMask(typeMask), registerMask(/*TODO: REMOVE CAST!!! */(uint32_t)registerMask), frameIndex(frameIndex) + : typeMask(typeMask), registerMask(registerMask), frameIndex(frameIndex) { }