Skip to content

Commit

Permalink
Make regions repeatable in temp data.
Browse files Browse the repository at this point in the history
If we use .fill inside, they won't allow allocation.
  • Loading branch information
unknownbrackets committed Jul 21, 2020
1 parent b5d7192 commit d721e8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Commands/CDirectiveArea.cpp
Expand Up @@ -139,14 +139,17 @@ void CDirectiveArea::writeTempData(TempData& tempData) const
const wchar_t *directiveType = shared ? L"region" : L"area";
if (positionExpression.isLoaded())
tempData.writeLine(position, tfm::format(L".org 0x%08llX", position));
tempData.writeLine(position,tfm::format(L".%S 0x%08X",directiveType,areaSize));
if (shared && fillExpression.isLoaded())
tempData.writeLine(position,tfm::format(L".%S 0x%08X,0x%02x",directiveType,areaSize,fillValue));
else
tempData.writeLine(position,tfm::format(L".%S 0x%08X",directiveType,areaSize));
if (content)
{
content->applyFileInfo();
content->writeTempData(tempData);
}

if (fillExpression.isLoaded())
if (fillExpression.isLoaded() && !shared)
{
int64_t fileID = g_fileManager->getOpenFileID();
int64_t subAreaUsage = Allocations::getSubAreaUsage(fileID, position);
Expand Down

0 comments on commit d721e8a

Please sign in to comment.