- don't create a heap segment for win16

git-svn-id: trunk@42658 -
This commit is contained in:
nickysn 2019-08-12 12:51:37 +00:00
parent 8015bfb5a0
commit 24e3d95fe0
2 changed files with 6 additions and 10 deletions

View File

@ -42,7 +42,7 @@ implementation
uses
sysutils,cutils,
globtype,globals,cpuinfo,
globtype,globals,cpuinfo,systems,
aasmbase,aasmdata,aasmtai,
symdef;
@ -52,7 +52,8 @@ implementation
inherited;
if current_settings.x86memorymodel<>mm_tiny then
InsertStackSegment;
InsertHeapSegment;
if target_info.system<>system_i8086_win16 then
InsertHeapSegment;
if current_settings.x86memorymodel in x86_near_data_models then
InsertStackPlusHeapSize;
end;

View File

@ -642,7 +642,6 @@ interface
private
FEarlySize: QWord;
FStackSize: QWord;
FLocalHeapSize: QWord;
FExeMetaSec: TNewExeMetaSection;
FMemBasePos: Word;
FDataPosSectors: Word;
@ -655,7 +654,6 @@ interface
function CanAddObjSection(objsec:TObjSection;ExeSectionLimit:QWord):boolean;
property EarlySize: QWord read FEarlySize write FEarlySize;
property StackSize: QWord read FStackSize write FStackSize;
property LocalHeapSize: QWord read FLocalHeapSize write FLocalHeapSize;
property ExeMetaSec: TNewExeMetaSection read FExeMetaSec write FExeMetaSec;
property MemBasePos: Word read FMemBasePos write FMemBasePos;
property DataPosSectors: Word read FDataPosSectors write FDataPosSectors;
@ -4184,7 +4182,7 @@ cleanup:
s: TSymStr;
Separator: SizeInt;
SegName, SegClass: string;
IsStack, IsHeap: Boolean;
IsStack: Boolean;
begin
{ allow mixing initialized and uninitialized data in the same section
=> set ignoreprops=true }
@ -4212,9 +4210,6 @@ cleanup:
IsStack:=True;
if IsStack then
StackSize:=StackSize+objsec.Size;
IsHeap:=SegClass='HEAP';
if IsHeap then
LocalHeapSize:=LocalHeapSize+objsec.Size;
EarlySize:=align_qword(EarlySize,SecAlign)+objsec.Size;
end;
@ -4323,8 +4318,8 @@ cleanup:
Header.InitialSP:=0;
Header.InitialSS:=Header.AutoDataSegmentNumber;
Header.InitialStackSize:=TNewExeSection(ExeSectionList[Header.AutoDataSegmentNumber-1]).StackSize;
Header.InitialLocalHeapSize:=TNewExeSection(ExeSectionList[Header.AutoDataSegmentNumber-1]).LocalHeapSize;
{todo: subtract the stack size and the local heap size from the size of the auto data segment }
Header.InitialLocalHeapSize:=heapsize;
{todo: subtract the stack size from the size of the auto data segment }
Header.SegmentTableStart:=NewExeHeaderSize;
Header.SegmentTableEntriesCount:=ExeSectionList.Count;