From d7f9265eba01b90f8273595312c2222bbef88304 Mon Sep 17 00:00:00 2001 From: nickysn Date: Sat, 14 Jun 2014 22:48:09 +0000 Subject: [PATCH] * limit the stack size set by the -Cs option to 65520 bytes on i8086 and other CPUs with a 16-bit address space git-svn-id: trunk@27960 - --- compiler/options.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/options.pas b/compiler/options.pas index 3f4458fc0d..8ee071dff9 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -1005,7 +1005,13 @@ begin 's' : begin val(copy(more,j+1,length(more)-j),stacksize,code); - if (code<>0) or (stacksize>=67107840) or (stacksize<1024) then + if (code<>0) +{$ifdef cpu16bitaddr} + or (stacksize>=65521) +{$else cpu16bitaddr} + or (stacksize>=67107840) +{$endif cpu16bitaddr} + or (stacksize<1024) then IllegalPara(opt); break; end;