|
@@ -402,132 +402,7 @@ end;
|
|
|
Low-level calling of methods.
|
|
|
---------------------------------------------------------------------}
|
|
|
|
|
|
-{$ASMMODE ATT}
|
|
|
-
|
|
|
-Function CallIntegerFunc(s: Pointer; Address: Pointer; Index, IValue: LongInt): Int64; assembler;
|
|
|
- asm
|
|
|
- movl S,%esi
|
|
|
- movl Address,%edi
|
|
|
- // ? Indexed Function
|
|
|
- movl Index,%eax
|
|
|
- testl %eax,%eax
|
|
|
- je .LINoPush
|
|
|
- movl IValue,%eax
|
|
|
- pushl %eax
|
|
|
- .LINoPush:
|
|
|
- push %esi
|
|
|
- call %edi
|
|
|
- // now the result is in EDX:EAX
|
|
|
- end;
|
|
|
-
|
|
|
-Function CallIntegerProc(s : Pointer;Address : Pointer;Value : Integer; INdex,IValue : Longint) : Integer;assembler;
|
|
|
- asm
|
|
|
- movl S,%esi
|
|
|
- movl Address,%edi
|
|
|
- // Push value to set
|
|
|
- movl Value,%eax
|
|
|
- pushl %eax
|
|
|
- // ? Indexed Procedure
|
|
|
- movl Index,%eax
|
|
|
- testl %eax,%eax
|
|
|
- je .LIPNoPush
|
|
|
- movl IValue,%eax
|
|
|
- pushl %eax
|
|
|
- .LIPNoPush:
|
|
|
- pushl %esi
|
|
|
- call %edi
|
|
|
- end;
|
|
|
-
|
|
|
-Function CallExtendedFunc(s : Pointer;Address : Pointer; INdex,IValue : Longint) : Extended;assembler;
|
|
|
- asm
|
|
|
- movl S,%esi
|
|
|
- movl Address,%edi
|
|
|
- // ? Indexed Function
|
|
|
- movl Index,%eax
|
|
|
- testl %eax,%eax
|
|
|
- je .LINoPush
|
|
|
- movl IValue,%eax
|
|
|
- pushl %eax
|
|
|
- .LINoPush:
|
|
|
- push %esi
|
|
|
- call %edi
|
|
|
- //
|
|
|
- end;
|
|
|
-
|
|
|
-Function CallExtendedProc(s : Pointer;Address : Pointer;Value : Extended; INdex,IVAlue : Longint) : Integer;assembler;
|
|
|
- asm
|
|
|
- movl S,%esi
|
|
|
- movl Address,%edi
|
|
|
- // Push value to set
|
|
|
- leal Value,%eax
|
|
|
- pushl (%eax)
|
|
|
- pushl 4(%eax)
|
|
|
- pushl 8(%eax)
|
|
|
- // ? Indexed Procedure
|
|
|
- movl Index,%eax
|
|
|
- testl %eax,%eax
|
|
|
- je .LIPNoPush
|
|
|
- movl IValue,%eax
|
|
|
- pushl %eax
|
|
|
- .LIPNoPush:
|
|
|
- push %esi
|
|
|
- call %edi
|
|
|
- end;
|
|
|
-
|
|
|
-Function CallBooleanFunc(s : Pointer;Address : Pointer; Index,IValue : Longint) : Boolean;assembler;
|
|
|
- asm
|
|
|
- movl S,%esi
|
|
|
- movl Address,%edi
|
|
|
- // ? Indexed Function
|
|
|
- movl Index,%eax
|
|
|
- testl %eax,%eax
|
|
|
- je .LBNoPush
|
|
|
- movl IValue,%eax
|
|
|
- pushl %eax
|
|
|
- .LBNoPush:
|
|
|
- push %esi
|
|
|
- call %edi
|
|
|
- end;
|
|
|
-
|
|
|
-// Assembler Functions can't have short stringreturn values.
|
|
|
-// So we make a Procedure with var parameter.
|
|
|
-// That's not true (FK)
|
|
|
-
|
|
|
-Procedure CallSStringFunc(s : Pointer;Address : Pointer; INdex,IValue : Longint;
|
|
|
- Var Res: Shortstring);assembler;
|
|
|
- asm
|
|
|
- movl S,%esi
|
|
|
- movl Address,%edi
|
|
|
- // ? Indexed Function
|
|
|
- movl Index,%eax
|
|
|
- testl %eax,%eax
|
|
|
- jnz .LSSNoPush
|
|
|
- movl IValue,%eax
|
|
|
- pushl %eax
|
|
|
- // the result is stored in an invisible parameter
|
|
|
- pushl Res
|
|
|
- .LSSNoPush:
|
|
|
- push %esi
|
|
|
- call %edi
|
|
|
- end;
|
|
|
-
|
|
|
-Procedure CallSStringProc(s : Pointer;Address : Pointer;Const Value : ShortString; INdex,IVAlue : Longint);assembler;
|
|
|
- asm
|
|
|
- movl S,%esi
|
|
|
- movl Address,%edi
|
|
|
- // Push value to set
|
|
|
- movl Value,%eax
|
|
|
- pushl %eax
|
|
|
- // ? Indexed Procedure
|
|
|
- movl Index,%eax
|
|
|
- testl %eax,%eax
|
|
|
- je .LSSPNoPush
|
|
|
- movl IValue,%eax
|
|
|
- pushl %eax
|
|
|
- .LSSPNoPush:
|
|
|
- pushl %esi
|
|
|
- call %edi
|
|
|
- end;
|
|
|
+{$I typinfo.inc}
|
|
|
|
|
|
{ ---------------------------------------------------------------------
|
|
|
Basic Type information functions.
|
|
@@ -1034,14 +909,10 @@ begin
|
|
|
Value:=PDouble(Pointer(Instance)+Longint(PropInfo^.GetProc))^;
|
|
|
ftExtended:
|
|
|
Value:=PExtended(Pointer(Instance)+Longint(PropInfo^.GetProc))^;
|
|
|
+{$ifndef m68k}
|
|
|
ftcomp:
|
|
|
Value:=PComp(Pointer(Instance)+Longint(PropInfo^.GetProc))^;
|
|
|
- { Uncommenting this code results in a internal error!!
|
|
|
- ftFixed16:
|
|
|
- Value:=PFixed16(Pointer(Instance)+Longint(PropInfo^.GetProc))^;
|
|
|
- ftfixed32:
|
|
|
- Value:=PFixed32(Pointer(Instance)+Longint(PropInfo^.GetProc))^;
|
|
|
- }
|
|
|
+{$endif m68k}
|
|
|
end;
|
|
|
ptstatic:
|
|
|
Value:=CallExtendedFunc(Instance,PropInfo^.GetProc,Index,IValue);
|
|
@@ -1067,14 +938,10 @@ begin
|
|
|
PDouble(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
|
|
ftExtended:
|
|
|
PExtended(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
|
|
+{$ifndef m68k}
|
|
|
ftcomp:
|
|
|
PComp(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Comp(Value);
|
|
|
- { Uncommenting this code results in a internal error!!
|
|
|
- ftFixed16:
|
|
|
- PFixed16(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
|
|
- ftfixed32:
|
|
|
- PFixed32(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
|
|
- }
|
|
|
+{$endif m68k}
|
|
|
end;
|
|
|
ptstatic:
|
|
|
CallExtendedProc(Instance,PropInfo^.SetProc,Value,Index,IValue);
|
|
@@ -1282,7 +1149,10 @@ end;
|
|
|
end.
|
|
|
{
|
|
|
$Log$
|
|
|
- Revision 1.11 2001-07-29 13:50:44 peter
|
|
|
+ Revision 1.12 2001-08-04 11:03:42 peter
|
|
|
+ * moved i386 specific code to include file
|
|
|
+
|
|
|
+ Revision 1.11 2001/07/29 13:50:44 peter
|
|
|
* merged updates from v10
|
|
|
|
|
|
Revision 1.9 2001/07/06 14:56:06 peter
|