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);
|
||||
while nextStringListItem(usedUnits, unitName) do
|
||||
emitInclude(unitName + UnitSuffix2);
|
||||
|
||||
(* _END label needs to be word-aligned because
|
||||
it is used as the start of the heap *)
|
||||
emitIns('.ALIGN');
|
||||
emitLabelRaw('_END');
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -2056,6 +2056,9 @@ begin
|
|||
operandValue := 0;
|
||||
emitBlock(count, operandValue);
|
||||
end
|
||||
else
|
||||
if lastToken.tokenText6 = '.ALIGN' then
|
||||
alignOutput(wordSize)
|
||||
else
|
||||
errorExit2('Unrecognized directive', lastToken.tokenText);
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue