mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-19 12:58:26 +02:00
* enable LLVM support Linux/AArch64
o also put the regular function result before the partfpstruct parameter git-svn-id: branches/debug_eh@40577 -
This commit is contained in:
parent
b41cd1eb6a
commit
f26ac9026e
@ -513,7 +513,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
|
override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
|
||||||
ifdef LLVM
|
ifdef LLVM
|
||||||
ifeq ($(findstring $(PPC_TARGET),x86_64),)
|
ifeq ($(findstring $(PPC_TARGET),x86_64 aarch64),)
|
||||||
$(error The $(PPC_TARGET) architecture is not (yet) support by the FPC/LLVM code generator)
|
$(error The $(PPC_TARGET) architecture is not (yet) support by the FPC/LLVM code generator)
|
||||||
endif
|
endif
|
||||||
ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux),)
|
ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux),)
|
||||||
|
@ -261,7 +261,7 @@ override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
|
|||||||
|
|
||||||
#include LLVM define/directory if requested
|
#include LLVM define/directory if requested
|
||||||
ifdef LLVM
|
ifdef LLVM
|
||||||
ifeq ($(findstring $(PPC_TARGET),x86_64),)
|
ifeq ($(findstring $(PPC_TARGET),x86_64 aarch64),)
|
||||||
$(error The $(PPC_TARGET) architecture is not (yet) support by the FPC/LLVM code generator)
|
$(error The $(PPC_TARGET) architecture is not (yet) support by the FPC/LLVM code generator)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -56,6 +56,10 @@ Type
|
|||||||
|
|
||||||
|
|
||||||
Const
|
Const
|
||||||
|
fputypestrllvm : array[tfputype] of string[6] = ('',
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
{ Is there support for dealing with multiple microcontrollers available }
|
{ Is there support for dealing with multiple microcontrollers available }
|
||||||
{ for this platform? }
|
{ for this platform? }
|
||||||
ControllerSupport = false; (* Not yet at least ;-) *)
|
ControllerSupport = false; (* Not yet at least ;-) *)
|
||||||
|
@ -31,11 +31,14 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
ncgbas,ncgflw,ncgcal,ncgcnv,ncgld,ncgmem,ncgcon,ncgset,ncgobjc,
|
ncgbas,ncgflw,ncgcal,ncgcnv,ncgld,ncgmem,ncgcon,ncgset,ncgobjc,
|
||||||
ncpuadd,ncpumat,ncpumem,ncpuinl,ncpucnv,ncpuset,
|
|
||||||
{ this not really a node }
|
|
||||||
rgcpu,
|
|
||||||
{ symtable }
|
{ symtable }
|
||||||
symcpu,
|
symcpu,
|
||||||
aasmdef;
|
aasmdef,
|
||||||
|
{$ifndef llvm}
|
||||||
|
ncpuadd,ncpumat,ncpumem,ncpuinl,ncpucnv,ncpuset
|
||||||
|
{$else llvm}
|
||||||
|
llvmnode
|
||||||
|
{$endif llvm}
|
||||||
|
;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -1576,7 +1576,7 @@ implementation
|
|||||||
idtxt : 'LLVM-LLC';
|
idtxt : 'LLVM-LLC';
|
||||||
asmbin : 'llc';
|
asmbin : 'llc';
|
||||||
asmcmd: '$OPT -o $OBJ $ASM';
|
asmcmd: '$OPT -o $OBJ $ASM';
|
||||||
supported_targets : [system_x86_64_linux,system_x86_64_darwin];
|
supported_targets : [system_x86_64_linux,system_x86_64_darwin,system_aarch64_linux];
|
||||||
flags : [af_smartlink_sections];
|
flags : [af_smartlink_sections];
|
||||||
labelprefix : 'L';
|
labelprefix : 'L';
|
||||||
comment : '; ';
|
comment : '; ';
|
||||||
@ -1590,7 +1590,7 @@ implementation
|
|||||||
idtxt : 'LLVM-CLANG';
|
idtxt : 'LLVM-CLANG';
|
||||||
asmbin : 'clang';
|
asmbin : 'clang';
|
||||||
asmcmd: '$OPT -c -o $OBJ $ASM';
|
asmcmd: '$OPT -c -o $OBJ $ASM';
|
||||||
supported_targets : [system_x86_64_linux,system_x86_64_darwin];
|
supported_targets : [system_x86_64_linux,system_x86_64_darwin,system_aarch64_linux];
|
||||||
flags : [af_smartlink_sections];
|
flags : [af_smartlink_sections];
|
||||||
labelprefix : 'L';
|
labelprefix : 'L';
|
||||||
comment : '; ';
|
comment : '; ';
|
||||||
|
@ -122,16 +122,17 @@ const
|
|||||||
and will increase with 10 for each parameter. The high parameters
|
and will increase with 10 for each parameter. The high parameters
|
||||||
will be inserted with n+1 }
|
will be inserted with n+1 }
|
||||||
paranr_blockselfpara = 1;
|
paranr_blockselfpara = 1;
|
||||||
paranr_parentfp = 2;
|
|
||||||
paranr_parentfp_delphi_cc_leftright = 2;
|
paranr_parentfp_delphi_cc_leftright = 2;
|
||||||
{$if defined(aarch64) and defined(llvm)}
|
{$if defined(aarch64) and defined(llvm)}
|
||||||
{ for AArch64 on LLVM, the "sret" parameter
|
{ for AArch64 on LLVM, the "sret" parameter
|
||||||
must always be the first -> give it a higher number; can't do it for other
|
must always be the first -> give it a higher number; can't do it for other
|
||||||
platforms, because that would change the register assignment/parameter order
|
platforms, because that would change the register assignment/parameter order
|
||||||
and the current one is presumably Delphi-compatible }
|
and the current one is presumably Delphi-compatible }
|
||||||
paranr_result = 3;
|
paranr_result = 2;
|
||||||
|
paranr_parentfp = 3;
|
||||||
paranr_self = 4;
|
paranr_self = 4;
|
||||||
{$else}
|
{$else}
|
||||||
|
paranr_parentfp = 2;
|
||||||
paranr_self = 3;
|
paranr_self = 3;
|
||||||
paranr_result = 4;
|
paranr_result = 4;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
@ -880,7 +880,11 @@ unit i_linux;
|
|||||||
tf_files_case_sensitive,
|
tf_files_case_sensitive,
|
||||||
tf_requires_proper_alignment,
|
tf_requires_proper_alignment,
|
||||||
tf_smartlink_sections,tf_pic_uses_got,
|
tf_smartlink_sections,tf_pic_uses_got,
|
||||||
tf_has_winlike_resources];
|
tf_has_winlike_resources
|
||||||
|
{$ifdef llvm}
|
||||||
|
,tf_use_psabieh
|
||||||
|
{$endif llvm}
|
||||||
|
];
|
||||||
cpu : cpu_aarch64;
|
cpu : cpu_aarch64;
|
||||||
unit_env : 'LINUXUNITS';
|
unit_env : 'LINUXUNITS';
|
||||||
extradefines : 'UNIX;HASUNIX';
|
extradefines : 'UNIX;HASUNIX';
|
||||||
|
Loading…
Reference in New Issue
Block a user