mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-23 01:09:23 +02:00
+ some initial darwin/x86 stuff:
* align stack to 16 bytes * extended takes 16 bytes * <= 8 byte records are passed in registers git-svn-id: trunk@1224 -
This commit is contained in:
parent
6499d65c39
commit
f3384bab09
@ -111,6 +111,19 @@ unit cpupara;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
system_i386_darwin :
|
||||
begin
|
||||
case def.deftype of
|
||||
recorddef :
|
||||
begin
|
||||
if (def.size <= 8) then
|
||||
begin
|
||||
result := false;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
result:=inherited ret_in_param(def,calloption);
|
||||
end;
|
||||
|
@ -56,7 +56,10 @@ unit cpupi;
|
||||
begin
|
||||
{ align to 4 bytes at least
|
||||
otherwise all those subl $2,%esp are meaningless PM }
|
||||
result:=Align(tg.direction*tg.lasttemp,min(aktalignment.localalignmin,4));
|
||||
if (target_info.system <> target_i386_darwin) then
|
||||
result:=Align(tg.direction*tg.lasttemp,min(aktalignment.localalignmin,4))
|
||||
else
|
||||
result:=Align(tg.direction*tg.lasttemp,min(aktalignment.localalgnmin,16));
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1055,6 +1055,10 @@ implementation
|
||||
fieldalignment:=4
|
||||
else if (varalign>1) and (fieldalignment<2) then
|
||||
fieldalignment:=2;
|
||||
{ darwin/x86 aligns long doubles on 16 bytes }
|
||||
if (target_info.system = system_i386_darwin) and
|
||||
(fieldalignment = 12) then
|
||||
fieldalignment := 16;
|
||||
end;
|
||||
fieldalignment:=min(fieldalignment,aktalignment.maxCrecordalign);
|
||||
end;
|
||||
|
@ -120,7 +120,9 @@ interface
|
||||
system_i386_wince, { 40 }
|
||||
system_x86_6432_linux, { 41 }
|
||||
system_arm_gba, { 42 }
|
||||
system_powerpc64_linux { 43 }
|
||||
system_arm_gba, { 42 }
|
||||
system_powerpc64_linux, { 43 }
|
||||
system_i386_darwin { 44 }
|
||||
);
|
||||
|
||||
tasm = (as_none
|
||||
|
@ -470,6 +470,70 @@ unit i_bsd;
|
||||
abi : abi_powerpc_aix;
|
||||
);
|
||||
|
||||
|
||||
|
||||
system_i386_darwin_info : tsysteminfo =
|
||||
(
|
||||
system : system_i386_darwin;
|
||||
name : 'Darwin for i386';
|
||||
shortname : 'Darwin';
|
||||
flags : [];
|
||||
cpu : cpu_i386;
|
||||
unit_env : 'BSDUNITS';
|
||||
extradefines : 'UNIX;BSD;HASUNIX';
|
||||
exeext : '';
|
||||
defext : '.def';
|
||||
scriptext : '.sh';
|
||||
smartext : '.sl';
|
||||
unitext : '.ppu';
|
||||
unitlibext : '.ppl';
|
||||
asmext : '.s';
|
||||
objext : '.o';
|
||||
resext : '.res';
|
||||
resobjext : '.or';
|
||||
sharedlibext : '.dylib';
|
||||
staticlibext : '.a';
|
||||
staticlibprefix : 'libp';
|
||||
sharedlibprefix : 'lib';
|
||||
sharedClibext : '.dylib';
|
||||
staticClibext : '.a';
|
||||
staticClibprefix : 'lib';
|
||||
sharedClibprefix : 'lib';
|
||||
p_ext_support : true;
|
||||
Cprefix : '_';
|
||||
newline : #10;
|
||||
dirsep : '/';
|
||||
files_case_relevent : true;
|
||||
assem : as_darwin;
|
||||
assemextern : as_darwin;
|
||||
link : nil;
|
||||
linkextern : nil;
|
||||
ar : ar_gnu_ar;
|
||||
res : res_none;
|
||||
dbg : dbg_stabs;
|
||||
script : script_unix;
|
||||
endian : endian_big;
|
||||
alignment :
|
||||
(
|
||||
procalign : 16;
|
||||
loopalign : 4;
|
||||
jumpalign : 0;
|
||||
constalignmin : 0;
|
||||
constalignmax : 4;
|
||||
varalignmin : 0;
|
||||
varalignmax : 4;
|
||||
localalignmin : 0;
|
||||
localalignmax : 4;
|
||||
recordalignmin : 0;
|
||||
recordalignmax : 16;
|
||||
maxCrecordalign : 16
|
||||
);
|
||||
first_parm_offset : 8;
|
||||
stacksize : 262144;
|
||||
DllScanSupported:false;
|
||||
use_function_relative_addresses : true;
|
||||
);
|
||||
|
||||
implementation
|
||||
|
||||
initialization
|
||||
@ -483,6 +547,9 @@ initialization
|
||||
{$ifdef OpenBSD}
|
||||
set_source_info(system_i386_NetBSD_info);
|
||||
{$endif}
|
||||
{$ifdef Darwin}
|
||||
set_source_info(system_i386_Darwin_info);
|
||||
{$endif Darwin}
|
||||
{$endif cpu86}
|
||||
{$ifdef cpux86_64}
|
||||
{$ifdef FreeBSD}
|
||||
|
Loading…
Reference in New Issue
Block a user