align _END label, add ALIGN directive to assembler
- fixes failing memory allocator when _END label is not aligned
This commit is contained in:
parent
0f72080c56
commit
87ec71bd6d
2 changed files with 6 additions and 1 deletions
|
|
@ -324,7 +324,9 @@ begin
|
||||||
rewindStringList(usedUnits);
|
rewindStringList(usedUnits);
|
||||||
while nextStringListItem(usedUnits, unitName) do
|
while nextStringListItem(usedUnits, unitName) do
|
||||||
emitInclude(unitName + UnitSuffix2);
|
emitInclude(unitName + UnitSuffix2);
|
||||||
|
(* _END label needs to be word-aligned because
|
||||||
|
it is used as the start of the heap *)
|
||||||
|
emitIns('.ALIGN');
|
||||||
emitLabelRaw('_END');
|
emitLabelRaw('_END');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2056,6 +2056,9 @@ begin
|
||||||
operandValue := 0;
|
operandValue := 0;
|
||||||
emitBlock(count, operandValue);
|
emitBlock(count, operandValue);
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
if lastToken.tokenText6 = '.ALIGN' then
|
||||||
|
alignOutput(wordSize)
|
||||||
else
|
else
|
||||||
errorExit2('Unrecognized directive', lastToken.tokenText);
|
errorExit2('Unrecognized directive', lastToken.tokenText);
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue