* fpc_PushExceptAddr's parameter Ft changed from LongInt to SmallInt on 16-bit CPUs for better efficiency

git-svn-id: branches/i8086@24036 -
This commit is contained in:
nickysn 2013-03-28 15:44:50 +00:00
parent 252903175c
commit 1e28790e99
3 changed files with 5 additions and 3 deletions

View File

@ -422,8 +422,10 @@ implementation
procedure new_exception(list:TAsmList;const t:texceptiontemps;exceptlabel:tasmlabel);
const
{$ifdef cpu16bitalu}
pushexceptaddr_frametype_cgsize = OS_S16;
setjmp_result_cgsize = OS_S16;
{$else cpu16bitalu}
pushexceptaddr_frametype_cgsize = OS_S32;
setjmp_result_cgsize = OS_S32;
{$endif cpu16bitalu}
var
@ -440,7 +442,7 @@ implementation
cg.a_loadaddr_ref_cgpara(list,t.envbuf,paraloc3);
cg.a_loadaddr_ref_cgpara(list,t.jmpbuf,paraloc2);
{ push type of exceptionframe }
cg.a_load_const_cgpara(list,OS_S32,1,paraloc1);
cg.a_load_const_cgpara(list,pushexceptaddr_frametype_cgsize,1,paraloc1);
paramanager.freecgpara(list,paraloc3);
paramanager.freecgpara(list,paraloc2);
paramanager.freecgpara(list,paraloc1);

View File

@ -559,7 +559,7 @@ procedure fpc_dispatch_by_id(Result: Pointer; const Dispatch: pointer;DispDesc:
{$ifdef FPC_HAS_FEATURE_EXCEPTIONS}
Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ; compilerproc;
Function fpc_PushExceptAddr (Ft: {$ifdef CPU16}SmallInt{$else}Longint{$endif};_buf,_newaddr : pointer): PJmp_buf ; compilerproc;
Function fpc_Raiseexception (Obj : TObject; AnAddr,AFrame : Pointer) : TObject; compilerproc;
Procedure fpc_PopAddrStack; compilerproc;
function fpc_PopObjectStack : TObject; compilerproc;

View File

@ -85,7 +85,7 @@ begin
end;
Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ;
Function fpc_PushExceptAddr (Ft: {$ifdef CPU16}SmallInt{$else}Longint{$endif};_buf,_newaddr : pointer): PJmp_buf ;
[Public, Alias : 'FPC_PUSHEXCEPTADDR'];compilerproc;
var
_ExceptAddrstack : ^PExceptAddr;