* load jmp_buf_size from system unit

This commit is contained in:
peter 2005-01-20 16:38:45 +00:00
parent 7395e7e546
commit 04c97cc129
13 changed files with 82 additions and 67 deletions

View File

@ -63,11 +63,6 @@ Const
{ target cpu string (used by compiler options) } { target cpu string (used by compiler options) }
target_cpu_string = 'alpha'; target_cpu_string = 'alpha';
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file
}
jmp_buf_size = 24;
Implementation Implementation

View File

@ -55,12 +55,6 @@ Const
mmreg_size = 16; mmreg_size = 16;
{ target cpu string (used by compiler options) } { target cpu string (used by compiler options) }
target_cpu_string = 'arm'; target_cpu_string = 'arm';
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file
}
{ for linux: }
jmp_buf_size = 220; { according to sizeof(jmp_buf) on my Zaurus (FK) }
{ calling conventions supported by the code generator } { calling conventions supported by the code generator }
supported_calling_conventions : tproccalloptions = [ supported_calling_conventions : tproccalloptions = [
@ -97,7 +91,10 @@ Implementation
end. end.
{ {
$Log$ $Log$
Revision 1.10 2004-07-04 15:22:34 florian Revision 1.11 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.10 2004/07/04 15:22:34 florian
* fixed float spilling to use sfm/lfm instead of stf/ldf * fixed float spilling to use sfm/lfm instead of stf/ldf
Revision 1.9 2004/06/20 08:55:31 florian Revision 1.9 2004/06/20 08:55:31 florian

View File

@ -1527,9 +1527,6 @@ implementation
a_call_name(list,'FPC_DECREF'); a_call_name(list,'FPC_DECREF');
dealloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default)); dealloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
end; end;
{ Temp locations need always to be reset to 0 }
if tg.istemp(ref) then
a_load_const_ref(list,OS_ADDR,0,ref);
cgpara2.done; cgpara2.done;
cgpara1.done; cgpara1.done;
end; end;
@ -2048,7 +2045,10 @@ finalization
end. end.
{ {
$Log$ $Log$
Revision 1.188 2005-01-18 22:19:20 peter Revision 1.189 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.188 2005/01/18 22:19:20 peter
* multiple location support for i386 a_param_ref * multiple location support for i386 a_param_ref
* remove a_param_copy_ref for i386 * remove a_param_copy_ref for i386

View File

@ -236,7 +236,8 @@ interface
{ Memory sizes } { Memory sizes }
heapsize, heapsize,
stacksize : longint; stacksize,
jmp_buf_size : longint;
{$Ifdef EXTDEBUG} {$Ifdef EXTDEBUG}
{ parameter switches } { parameter switches }
@ -2170,6 +2171,8 @@ end;
{ memory sizes, will be overriden by parameter or default for target { memory sizes, will be overriden by parameter or default for target
in options or init_parser } in options or init_parser }
stacksize:=0; stacksize:=0;
{ not initialized yet }
jmp_buf_size:=-1;
apptype:=app_cui; apptype:=app_cui;
end; end;
@ -2177,7 +2180,10 @@ end;
end. end.
{ {
$Log$ $Log$
Revision 1.160 2005-01-09 20:24:43 olle Revision 1.161 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.160 2005/01/09 20:24:43 olle
* rework of macro subsystem * rework of macro subsystem
+ exportable macros for mode macpas + exportable macros for mode macpas

View File

@ -167,16 +167,13 @@
} }
std_param_align = 4; std_param_align = 4;
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file
}
jmp_buf_size = 24;
{ {
$Log$ $Log$
Revision 1.16 2004-12-12 10:50:34 florian Revision 1.17 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.16 2004/12/12 10:50:34 florian
* fixed operand size calculation for sse operands * fixed operand size calculation for sse operands
+ all nasm assembler targets to help page output added + all nasm assembler targets to help page output added

View File

@ -311,11 +311,6 @@ unit cpubase;
} }
std_param_align = 4; { for 32-bit version only } std_param_align = 4; { for 32-bit version only }
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file
}
jmp_buf_size = 28;
{***************************************************************************** {*****************************************************************************
CPU Dependent Constants CPU Dependent Constants
@ -467,7 +462,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.34 2005-01-08 04:10:36 karoly Revision 1.35 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.34 2005/01/08 04:10:36 karoly
* made m68k to compile again * made m68k to compile again
Revision 1.33 2004/11/09 22:32:59 peter Revision 1.33 2004/11/09 22:32:59 peter

View File

@ -315,9 +315,16 @@ implementation
*****************************************************************************} *****************************************************************************}
procedure get_exception_temps(list:taasmoutput;var t:texceptiontemps); procedure get_exception_temps(list:taasmoutput;var t:texceptiontemps);
var
sym : ttypesym;
begin begin
if jmp_buf_size=-1 then
begin
searchsystype('JMP_BUF',sym);
jmp_buf_size:=sym.restype.def.size;
end;
tg.GetTemp(list,EXCEPT_BUF_SIZE,tt_persistent,t.envbuf); tg.GetTemp(list,EXCEPT_BUF_SIZE,tt_persistent,t.envbuf);
tg.GetTemp(list,JMP_BUF_SIZE,tt_persistent,t.jmpbuf); tg.GetTemp(list,jmp_buf_size,tt_persistent,t.jmpbuf);
tg.GetTemp(list,sizeof(aint),tt_persistent,t.reasonbuf); tg.GetTemp(list,sizeof(aint),tt_persistent,t.reasonbuf);
end; end;
@ -2357,7 +2364,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.255 2005-01-19 20:04:46 florian Revision 1.256 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.255 2005/01/19 20:04:46 florian
* init./final code isn't created for pure assembler procedures anymore * init./final code isn't created for pure assembler procedures anymore
Revision 1.254 2005/01/18 22:19:20 peter Revision 1.254 2005/01/18 22:19:20 peter

View File

@ -149,6 +149,7 @@ implementation
orgname : stringid; orgname : stringid;
tt : ttype; tt : ttype;
sym : tsym; sym : tsym;
dummysymoptions : tsymoptions;
storetokenpos,filepos : tfileposinfo; storetokenpos,filepos : tfileposinfo;
old_block_type : tblock_type; old_block_type : tblock_type;
skipequal : boolean; skipequal : boolean;
@ -166,9 +167,14 @@ implementation
begin begin
consume(_EQUAL); consume(_EQUAL);
sym:=readconstant(orgname,filepos); sym:=readconstant(orgname,filepos);
{ Support hint directives }
dummysymoptions:=[];
try_consume_hintdirective(dummysymoptions);
if assigned(sym) then if assigned(sym) then
symtablestack.insert(sym); begin
try_consume_hintdirective(sym.symoptions); sym.symoptions:=sym.symoptions+dummysymoptions;
symtablestack.insert(sym);
end;
consume(_SEMICOLON); consume(_SEMICOLON);
end; end;
@ -595,9 +601,11 @@ implementation
var var
orgname : stringid; orgname : stringid;
p : tnode; p : tnode;
dummysymoptions : tsymoptions;
storetokenpos,filepos : tfileposinfo; storetokenpos,filepos : tfileposinfo;
old_block_type : tblock_type; old_block_type : tblock_type;
sp : pchar; sp : pchar;
sym : tsym;
begin begin
consume(_RESOURCESTRING); consume(_RESOURCESTRING);
if not(symtablestack.symtabletype in [staticsymtable,globalsymtable]) then if not(symtablestack.symtabletype in [staticsymtable,globalsymtable]) then
@ -615,6 +623,7 @@ implementation
p:=comp_expr(true); p:=comp_expr(true);
storetokenpos:=akttokenpos; storetokenpos:=akttokenpos;
akttokenpos:=filepos; akttokenpos:=filepos;
sym:=nil;
case p.nodetype of case p.nodetype of
ordconstn: ordconstn:
begin begin
@ -623,7 +632,7 @@ implementation
getmem(sp,2); getmem(sp,2);
sp[0]:=chr(tordconstnode(p).value); sp[0]:=chr(tordconstnode(p).value);
sp[1]:=#0; sp[1]:=#0;
symtablestack.insert(tconstsym.create_string(orgname,constresourcestring,sp,1)); sym:=tconstsym.create_string(orgname,constresourcestring,sp,1);
end end
else else
Message(parser_e_illegal_expression); Message(parser_e_illegal_expression);
@ -633,12 +642,20 @@ implementation
begin begin
getmem(sp,len+1); getmem(sp,len+1);
move(value_str^,sp^,len+1); move(value_str^,sp^,len+1);
symtablestack.insert(tconstsym.create_string(orgname,constresourcestring,sp,len)); sym:=tconstsym.create_string(orgname,constresourcestring,sp,len);
end; end;
else else
Message(parser_e_illegal_expression); Message(parser_e_illegal_expression);
end; end;
akttokenpos:=storetokenpos; akttokenpos:=storetokenpos;
{ Support hint directives }
dummysymoptions:=[];
try_consume_hintdirective(dummysymoptions);
if assigned(sym) then
begin
sym.symoptions:=sym.symoptions+dummysymoptions;
symtablestack.insert(sym);
end;
consume(_SEMICOLON); consume(_SEMICOLON);
p.free; p.free;
end; end;
@ -651,7 +668,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.92 2004-11-16 20:32:40 peter Revision 1.93 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.92 2004/11/16 20:32:40 peter
* fixes for win32 mangledname * fixes for win32 mangledname
Revision 1.91 2004/11/15 23:35:31 peter Revision 1.91 2004/11/15 23:35:31 peter

View File

@ -356,12 +356,6 @@ uses
} }
std_param_align = 4; { for 32-bit version only } std_param_align = 4; { for 32-bit version only }
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file
}
{ for linux: }
jmp_buf_size = 232;
{***************************************************************************** {*****************************************************************************
CPU Dependent Constants CPU Dependent Constants
@ -550,7 +544,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.94 2005-01-10 21:48:45 jonas Revision 1.95 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.94 2005/01/10 21:48:45 jonas
- removed deprecated constants - removed deprecated constants
Revision 1.93 2004/12/28 02:25:43 olle Revision 1.93 2004/12/28 02:25:43 olle

View File

@ -320,11 +320,6 @@ uses
} }
std_param_align = 4; { for 32-bit version only } std_param_align = 4; { for 32-bit version only }
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file }
JMP_BUF_SIZE = 12+16;
{***************************************************************************** {*****************************************************************************
CPU Dependent Constants CPU Dependent Constants
@ -454,7 +449,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.75 2004-10-31 21:45:04 peter Revision 1.76 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.75 2004/10/31 21:45:04 peter
* generic tlocation * generic tlocation
* move tlocation to cgutils * move tlocation to cgutils

View File

@ -667,7 +667,7 @@ implementation
if assigned(current_module) and if assigned(current_module) and
(symtabletype=globalsymtable) then (symtabletype=globalsymtable) then
begin begin
if tglobalsymtable(self).moduleid>current_module.unitmapsize then if tglobalsymtable(self).moduleid>=current_module.unitmapsize then
internalerror(200501152); internalerror(200501152);
inc(current_module.unitmap[tglobalsymtable(self).moduleid].refs); inc(current_module.unitmap[tglobalsymtable(self).moduleid].refs);
end; end;
@ -2463,7 +2463,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.169 2005-01-19 22:19:41 peter Revision 1.170 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.169 2005/01/19 22:19:41 peter
* unit mapping rewrite * unit mapping rewrite
* new derefmap added * new derefmap added

View File

@ -51,19 +51,16 @@ Const
mmreg_size = 8; mmreg_size = 8;
{ target cpu string (used by compiler options) } { target cpu string (used by compiler options) }
target_cpu_string = 'vis'; target_cpu_string = 'vis';
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file
}
{$warning setjmp buf_size unknown!}
jmp_buf_size = 0;
Implementation Implementation
end. end.
{ {
$Log$ $Log$
Revision 1.3 2004-06-20 08:55:32 florian Revision 1.4 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.3 2004/06/20 08:55:32 florian
* logs truncated * logs truncated
Revision 1.2 2004/06/16 20:07:11 florian Revision 1.2 2004/06/16 20:07:11 florian

View File

@ -56,12 +56,6 @@ Const
mmreg_size = 16; mmreg_size = 16;
{ target cpu string (used by compiler options) } { target cpu string (used by compiler options) }
target_cpu_string = 'x86_64'; target_cpu_string = 'x86_64';
{ size of the buffer used for setjump/longjmp
the size of this buffer is deduced from the
jmp_buf structure in setjumph.inc file
}
jmp_buf_size = 64;
{ calling conventions supported by the code generator } { calling conventions supported by the code generator }
supported_calling_conventions : tproccalloptions = [ supported_calling_conventions : tproccalloptions = [
@ -91,7 +85,10 @@ Implementation
end. end.
{ {
$Log$ $Log$
Revision 1.14 2004-06-20 08:55:32 florian Revision 1.15 2005-01-20 16:38:45 peter
* load jmp_buf_size from system unit
Revision 1.14 2004/06/20 08:55:32 florian
* logs truncated * logs truncated
Revision 1.13 2004/06/16 20:07:11 florian Revision 1.13 2004/06/16 20:07:11 florian