From 66d7beb7feb995e3cc9bf8186b120c0641c573b6 Mon Sep 17 00:00:00 2001 From: nickysn Date: Sun, 30 Mar 2014 12:00:20 +0000 Subject: [PATCH] * i8086 far data memory model fix for except_buf_size git-svn-id: trunk@27371 - --- compiler/ncgutil.pas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index ae3e688216..e0689a512b 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -382,11 +382,15 @@ implementation *****************************************************************************} procedure get_exception_temps(list:TAsmList;var t:texceptiontemps); - const - EXCEPT_BUF_SIZE = 3*sizeof(pint); + var + except_buf_size: longint; begin + { todo: is there a way to retrieve the except_buf_size from the size of + the TExceptAddr record from the system unit (like we do for jmp_buf_size), + without moving TExceptAddr to the interface part? } + except_buf_size:=voidpointertype.size*2+sizeof(pint); get_jumpbuf_size; - tg.GetTemp(list,EXCEPT_BUF_SIZE,sizeof(pint),tt_persistent,t.envbuf); + tg.GetTemp(list,except_buf_size,sizeof(pint),tt_persistent,t.envbuf); tg.GetTemp(list,jmp_buf_size,jmp_buf_align,tt_persistent,t.jmpbuf); tg.GetTemp(list,sizeof(pint),sizeof(pint),tt_persistent,t.reasonbuf); end;