mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 01:09:40 +01:00
* base compiler patches to improve C parameter passing compatibility on powerpc64/linux
git-svn-id: trunk@1983 -
This commit is contained in:
parent
f9722ad6a5
commit
b53ee04f98
@ -1282,8 +1282,14 @@ implementation
|
||||
href : treference;
|
||||
begin
|
||||
case paraloc.loc of
|
||||
LOC_REGISTER :
|
||||
cg.a_load_reg_ref(list,paraloc.size,paraloc.size,paraloc.register,ref);
|
||||
LOC_REGISTER :
|
||||
begin
|
||||
{$IFDEF CPUPOWERPC64}
|
||||
if (paraloc.shiftval <> 0) then
|
||||
cg.a_op_const_reg_reg(list, OP_SHL, OS_INT, paraloc.shiftval, paraloc.register, paraloc.register);
|
||||
{$ENDIF CPUPOWERPC64}
|
||||
cg.a_load_reg_ref(list,paraloc.size,paraloc.size,paraloc.register,ref);
|
||||
end;
|
||||
LOC_MMREGISTER :
|
||||
cg.a_loadmm_reg_ref(list,paraloc.size,paraloc.size,paraloc.register,ref,mms_movescalar);
|
||||
LOC_FPUREGISTER :
|
||||
|
||||
@ -46,7 +46,18 @@ unit parabase;
|
||||
LOC_MMREGISTER,
|
||||
LOC_CMMREGISTER,
|
||||
LOC_REGISTER,
|
||||
LOC_CREGISTER : (register : tregister);
|
||||
LOC_CREGISTER : (
|
||||
{ The number of bits the value in the register must be shifted to the left before
|
||||
it can be stored to memory in the function prolog.
|
||||
This is used for passing OS_NO memory blocks less than register size and of "odd"
|
||||
(3, 5, 6, 7) size on big endian machines, so that small memory blocks passed via
|
||||
registers are properly aligned.
|
||||
|
||||
E.g. the value $5544433 is passed in bits 40-63 of the register (others are zero),
|
||||
but they should actually be stored in the first bits of the stack location reserved
|
||||
for this value. So they have to be shifted left by this amount of bits before. }
|
||||
{$IFDEF CPUPOWERPC64}shiftval : byte;{$ENDIF CPUPOWERPC64}
|
||||
register : tregister);
|
||||
end;
|
||||
|
||||
TCGPara = object
|
||||
|
||||
Loading…
Reference in New Issue
Block a user