summaryrefslogtreecommitdiff
path: root/compiler/ncgutil.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ncgutil.pas')
-rw-r--r--compiler/ncgutil.pas10
1 files 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;