Skip to content

Commit

Permalink
Bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
drmortalwombat committed Dec 23, 2022
1 parent 9daf4fa commit 5696691
Show file tree
Hide file tree
Showing 6 changed files with 308 additions and 50 deletions.
35 changes: 22 additions & 13 deletions oscar64/InterCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5413,20 +5413,30 @@ bool InterCodeBasicBlock::BuildGlobalIntegerRangeSets(bool initial, const Growin

assert(mLocalValueRange.Size() == mExitRequiredTemps.Size());

bool firstEntry = true;

for (int j = 0; j < mEntryBlocks.Size(); j++)
{
InterCodeBasicBlock* from = mEntryBlocks[j];
GrowingIntegerValueRangeArray& range(this == from->mTrueJump ? from->mTrueValueRange : from->mFalseValueRange);
if (j == 0)
mLocalValueRange = range;
else

if (range.Size())
{
for (int i = 0; i < mLocalValueRange.Size(); i++)
mLocalValueRange[i].Merge(range[i], mLoopHead, initial);
if (firstEntry)
{
firstEntry = false;
mLocalValueRange = range;
}
else
{
for (int i = 0; i < mLocalValueRange.Size(); i++)
mLocalValueRange[i].Merge(range[i], mLoopHead, initial);
}
}
assert(mLocalValueRange.Size() == mExitRequiredTemps.Size());
}

assert(mLocalValueRange.Size() == mExitRequiredTemps.Size());

for (int i = 0; i < mLocalValueRange.Size(); i++)
if (!mLocalValueRange[i].Same(mEntryValueRange[i]))
changed = true;
Expand Down Expand Up @@ -5715,15 +5725,14 @@ void InterCodeBasicBlock::UpdateLocalIntegerRangeSets(const GrowingVariableArray
vr.mMinState = IntegerValueRange::S_UNBOUND;
}

#if 0
#if 1
if (ins->mDst.mType == IT_INT8)
{
if (vr.mMinValue < 0)
vr.mMaxValue = 255;
if (vr.mMaxValue > 127)
vr.mMinValue = -128;
vr.LimitMax(255);
vr.LimitMin(-128);
if (vr.mMinState == IntegerValueRange::S_BOUND && vr.mMinValue < -255 || vr.mMaxState == IntegerValueRange::S_BOUND && vr.mMaxValue > 255)
{
vr.LimitMax(255);
vr.LimitMin(-128);
}
}
#endif
break;
Expand Down
Loading

0 comments on commit 5696691

Please sign in to comment.