* use System for the systemunit instead of target dependent

This commit is contained in:
peter 2000-10-15 09:08:58 +00:00
parent 4bd9325ae6
commit 12818742d3
3 changed files with 18 additions and 30 deletions

View File

@ -201,17 +201,15 @@ implementation
procedure loadstream; procedure loadstream;
const const
io:array[boolean] of string[7]=('_OUTPUT','_INPUT'); io:array[boolean] of string[6]=('OUTPUT','INPUT');
var var
r : preference; r : preference;
begin begin
new(r); new(r);
reset_reference(r^); reset_reference(r^);
r^.symbol:=newasmsymbol( r^.symbol:=newasmsymbol(
'U_'+upper(target_info.system_unit)+io[doread]); 'U_SYSTEM_'+io[doread]);
{$ifndef noAllocEdi}
getexplicitregister32(R_EDI); getexplicitregister32(R_EDI);
{$endif noAllocEdi}
emit_ref_reg(A_LEA,S_L,r,R_EDI) emit_ref_reg(A_LEA,S_L,r,R_EDI)
end; end;
@ -1549,7 +1547,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.1 2000-10-14 10:14:49 peter Revision 1.2 2000-10-15 09:08:58 peter
* use System for the systemunit instead of target dependent
Revision 1.1 2000/10/14 10:14:49 peter
* moehrendorf oct 2000 rewrite * moehrendorf oct 2000 rewrite
} }

View File

@ -634,7 +634,7 @@ implementation
exit; exit;
end; end;
{ insert the system unit, it is allways the first } { insert the system unit, it is allways the first }
hp:=loadunit(upper(target_info.system_unit),true); hp:=loadunit('SYSTEM',true);
systemunit:=hp^.globalsymtable; systemunit:=hp^.globalsymtable;
{ it's always the first unit } { it's always the first unit }
systemunit^.next:=nil; systemunit^.next:=nil;
@ -985,7 +985,7 @@ implementation
pu : pused_unit; pu : pused_unit;
{$endif GDB} {$endif GDB}
store_crc,store_interface_crc : longint; store_crc,store_interface_crc : longint;
s1,s2 : ^string; {Saves stack space} s2 : ^string; {Saves stack space}
force_init_final : boolean; force_init_final : boolean;
begin begin
@ -1005,14 +1005,12 @@ implementation
current_module^.modulename:=stringdup(pattern); current_module^.modulename:=stringdup(pattern);
current_module^.realmodulename:=stringdup(orgpattern); current_module^.realmodulename:=stringdup(orgpattern);
{ check for system unit } { check for system unit }
new(s1);
new(s2); new(s2);
s1^:=upper(target_info.system_unit);
s2^:=upper(SplitName(main_file^.name^)); s2^:=upper(SplitName(main_file^.name^));
if (cs_compilesystem in aktmoduleswitches) then if (cs_compilesystem in aktmoduleswitches) then
begin begin
if ((length(current_module^.modulename^)>8) or if ((length(current_module^.modulename^)>8) or
(current_module^.modulename^<>s1^) or (current_module^.modulename^<>'SYSTEM') or
(current_module^.modulename^<>s2^)) then (current_module^.modulename^<>s2^)) then
Message1(unit_e_illegal_unit_name,current_module^.realmodulename^); Message1(unit_e_illegal_unit_name,current_module^.realmodulename^);
end end
@ -1023,11 +1021,10 @@ implementation
((length(current_module^.modulename^)>8) and ((length(current_module^.modulename^)>8) and
(copy(current_module^.modulename^,1,8)=s2^))) then (copy(current_module^.modulename^,1,8)=s2^))) then
Message1(unit_e_illegal_unit_name,current_module^.realmodulename^); Message1(unit_e_illegal_unit_name,current_module^.realmodulename^);
if (current_module^.modulename^=s1^) then if (current_module^.modulename^='SYSTEM') then
Message(unit_w_switch_us_missed); Message(unit_w_switch_us_missed);
end; end;
dispose(s2); dispose(s2);
dispose(s1);
end; end;
consume(_ID); consume(_ID);
@ -1708,7 +1705,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.14 2000-10-15 07:47:51 peter Revision 1.15 2000-10-15 09:08:58 peter
* use System for the systemunit instead of target dependent
Revision 1.14 2000/10/15 07:47:51 peter
* unit names and procedure names are stored mixed case * unit names and procedure names are stored mixed case
Revision 1.13 2000/10/04 14:51:08 pierre Revision 1.13 2000/10/04 14:51:08 pierre

View File

@ -196,7 +196,6 @@ interface
cpu : ttargetcpu; cpu : ttargetcpu;
short_name : string[8]; short_name : string[8];
unit_env : string[12]; unit_env : string[12];
system_unit : string[8];
smartext, smartext,
unitext, unitext,
unitlibext, unitlibext,
@ -1041,7 +1040,6 @@ implementation
cpu : i386; cpu : i386;
short_name : 'GO32V1'; short_name : 'GO32V1';
unit_env : 'GO32V1UNITS'; unit_env : 'GO32V1UNITS';
system_unit : 'SYSTEM';
smartext : '.sl'; smartext : '.sl';
unitext : '.pp1'; unitext : '.pp1';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1065,7 +1063,6 @@ implementation
cpu : i386; cpu : i386;
short_name : 'GO32V2'; short_name : 'GO32V2';
unit_env : 'GO32V2UNITS'; unit_env : 'GO32V2UNITS';
system_unit : 'SYSTEM';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppu'; unitext : '.ppu';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1089,7 +1086,6 @@ implementation
cpu : i386; cpu : i386;
short_name : 'LINUX'; short_name : 'LINUX';
unit_env : 'LINUXUNITS'; unit_env : 'LINUXUNITS';
system_unit : 'syslinux';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppu'; unitext : '.ppu';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1113,7 +1109,6 @@ implementation
cpu : i386; cpu : i386;
short_name : 'FREEBSD'; short_name : 'FREEBSD';
unit_env : 'BSDUNITS'; unit_env : 'BSDUNITS';
system_unit : 'sysbsd';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppu'; unitext : '.ppu';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1137,7 +1132,6 @@ implementation
cpu : i386; cpu : i386;
short_name : 'OS2'; short_name : 'OS2';
unit_env : 'OS2UNITS'; unit_env : 'OS2UNITS';
system_unit : 'SYSOS2';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppo'; unitext : '.ppo';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1161,7 +1155,6 @@ implementation
cpu : i386; cpu : i386;
short_name : 'WIN32'; short_name : 'WIN32';
unit_env : 'WIN32UNITS'; unit_env : 'WIN32UNITS';
system_unit : 'SYSWIN32';
smartext : '.slw'; smartext : '.slw';
unitext : '.ppw'; unitext : '.ppw';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1185,7 +1178,6 @@ implementation
cpu : i386; cpu : i386;
short_name : 'NETWARE'; short_name : 'NETWARE';
unit_env : 'NETWAREUNITS'; unit_env : 'NETWAREUNITS';
system_unit : 'sysnetwa';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppn'; unitext : '.ppn';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1211,7 +1203,6 @@ implementation
cpu : m68k; cpu : m68k;
short_name : 'AMIGA'; short_name : 'AMIGA';
unit_env : ''; unit_env : '';
system_unit : 'sysamiga';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppa'; unitext : '.ppa';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1235,7 +1226,6 @@ implementation
cpu : m68k; cpu : m68k;
short_name : 'ATARI'; short_name : 'ATARI';
unit_env : ''; unit_env : '';
system_unit : 'SYSATARI';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppt'; unitext : '.ppt';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1259,7 +1249,6 @@ implementation
cpu : m68k; cpu : m68k;
short_name : 'MACOS'; short_name : 'MACOS';
unit_env : ''; unit_env : '';
system_unit : 'sysmac';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppt'; unitext : '.ppt';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1283,7 +1272,6 @@ implementation
cpu : m68k; cpu : m68k;
short_name : 'LINUX'; short_name : 'LINUX';
unit_env : 'LINUXUNITS'; unit_env : 'LINUXUNITS';
system_unit : 'syslinux';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppu'; unitext : '.ppu';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1307,7 +1295,6 @@ implementation
cpu : m68k; cpu : m68k;
short_name : 'PALMOS'; short_name : 'PALMOS';
unit_env : 'PALMUNITS'; unit_env : 'PALMUNITS';
system_unit : 'syspalm';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppu'; unitext : '.ppu';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1333,7 +1320,6 @@ implementation
cpu : alpha; cpu : alpha;
short_name : 'LINUX'; short_name : 'LINUX';
unit_env : 'LINUXUNITS'; unit_env : 'LINUXUNITS';
system_unit : 'syslinux';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppu'; unitext : '.ppu';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1359,7 +1345,6 @@ implementation
cpu : powerpc; cpu : powerpc;
short_name : 'LINUX'; short_name : 'LINUX';
unit_env : ''; unit_env : '';
system_unit : 'syslinux';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppu'; unitext : '.ppu';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1383,7 +1368,6 @@ implementation
cpu : powerpc; cpu : powerpc;
short_name : 'MACOS'; short_name : 'MACOS';
unit_env : ''; unit_env : '';
system_unit : 'sysmac';
smartext : '.sl'; smartext : '.sl';
unitext : '.ppt'; unitext : '.ppt';
unitlibext : '.ppl'; unitlibext : '.ppl';
@ -1725,7 +1709,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.10 2000-09-24 21:12:41 hajny Revision 1.11 2000-10-15 09:08:58 peter
* use System for the systemunit instead of target dependent
Revision 1.10 2000/09/24 21:12:41 hajny
* OS/2 stack alignment corrected + default stack increased * OS/2 stack alignment corrected + default stack increased
Revision 1.9 2000/09/24 15:06:30 peter Revision 1.9 2000/09/24 15:06:30 peter