[fpc-devel] RTTI interface & variant late binding issue (mORMot)
Steve Hildebrandt
Steve.Kassel at web.de
Wed Feb 25 22:05:16 CET 2015
Am 25.02.2015 um 21:12 schrieb Steve Hildebrandt:
>
> Am 25.02.2015 um 20:37 schrieb Alfred:
>> And I am willing to test on simple ARM (Pi[2], BBB).
>> If you provide me with code !
> It seemed simple enough see attached Patch.
> ParReg: r0-r3=0..3
Forgot to commit some parts of it sorry.
Also if reg < 255 and off > 0 it is the offset for the register.
For example reg=0 and off=4 means upper 32 bit of the mm register 0.
Since this is all experimetal and there is no convention to uphold for
the values ParaReg and ParaOff
I'm open to suggestions.
mfg Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20150225/ea15270e/attachment.html>
-------------- next part --------------
>From 71c5379096304cb42abe22c776e813b81d1a65fd Mon Sep 17 00:00:00 2001
From: Steve Hildebrandt <Steve.Kassel at web.de>
Date: Wed, 25 Feb 2015 21:10:03 +0100
Subject: [PATCH 6/6] Updated paramgr implementation for arm
---
compiler/arm/cpupara.pas | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/compiler/arm/cpupara.pas b/compiler/arm/cpupara.pas
index a917850..120808d 100644
--- a/compiler/arm/cpupara.pas
+++ b/compiler/arm/cpupara.pas
@@ -36,6 +36,7 @@ unit cpupara;
function get_volatile_registers_int(calloption : tproccalloption):tcpuregisterset;override;
function get_volatile_registers_fpu(calloption : tproccalloption):tcpuregisterset;override;
function get_volatile_registers_mm(calloption : tproccalloption):tcpuregisterset;override;
+ procedure get_para_regoff(proccalloption: tproccalloption; paraloc: pcgparalocation; out reg: Byte; out off: LongInt);override;
function push_addr_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;override;
function ret_in_param(def:tdef;pd:tabstractprocdef):boolean;override;
procedure getintparaloc(pd : tabstractprocdef; nr : longint; var cgpara : tcgpara);override;
@@ -79,6 +80,44 @@ unit cpupara;
result:=VOLATILE_MMREGISTERS;
end;
+ procedure tarmparamanager.get_para_regoff(proccalloption: tproccalloption; paraloc: pcgparalocation; out reg: Byte; out off: LongInt);
+ var
+ I : SizeInt;
+ begin
+ with paraloc^ do
+ case loc of
+ LOC_REGISTER:
+ begin
+ reg:=getsupreg(register)-RS_R0;
+ off:=0;
+ end;
+ LOC_FPUREGISTER:
+ begin
+ reg:=getsupreg(register)-RS_F0;
+ off:=0;
+ end;
+ LOC_MMREGISTER:
+ begin
+ reg:=getsupreg(register);
+ if reg < RS_S1 then
+ begin
+ reg-=RS_D0;
+ off:=0;
+ end
+ else
+ begin
+ reg-=RS_S1;
+ off:=4;
+ end;
+ end;
+ LOC_REFERENCE:
+ begin
+ reg:=255;
+ off:=reference.offset;
+ end;
+ end;
+ end;
+
procedure tarmparamanager.getintparaloc(pd : tabstractprocdef; nr : longint; var cgpara : tcgpara);
var
--
1.9.5.msysgit.0
More information about the fpc-devel
mailing list