Skip to content

Commit

Permalink
Fix short lea coalescing with negative offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
drmortalwombat committed Nov 3, 2024
1 parent bb01d10 commit 51c38a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions oscar64/InterCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19220,8 +19220,10 @@ bool InterCodeBasicBlock::ShortLeaMerge(int& spareTemps)

if (found)
{
mInstructions.Insert(0, iins[0]->Clone());
iins[0]->mSrc[1].mIntConst = minint;
InterInstruction* lins = iins[0]->Clone();
lins->mSrc[0].mRange.Reset();
lins->mSrc[1].mIntConst = minint;
mInstructions.Insert(0, lins);

if (iins[0]->mSrc[0].mTemp < 0)
{
Expand Down Expand Up @@ -22913,7 +22915,7 @@ void InterCodeProcedure::Close(void)
{
GrowingTypeArray tstack(IT_NONE);

CheckFunc = !strcmp(mIdent->mString, "main");
CheckFunc = !strcmp(mIdent->mString, "game_walking");
CheckCase = false;

mEntryBlock = mBlocks[0];
Expand Down

0 comments on commit 51c38a4

Please sign in to comment.