|
@@ -17,7 +17,7 @@
|
|
|
|
|
|
|
|
|
{$define FPC_UNIT_HAS_STRPAS}
|
|
|
-function strpas(p : pchar) : string;
|
|
|
+function strpas(p : pchar) : string; assembler;
|
|
|
{$i strpas.inc}
|
|
|
|
|
|
{$define FPC_UNIT_HAS_STRPCOPY}
|
|
@@ -25,31 +25,34 @@ function strpcopy(d : pchar;const s : string) : pchar;assembler;
|
|
|
var
|
|
|
saveesi,saveedi : longint;
|
|
|
asm
|
|
|
- movl %edi,saveedi
|
|
|
- movl %esi,saveesi
|
|
|
+ movl %edi,saveedi
|
|
|
+ movl %esi,saveesi
|
|
|
cld
|
|
|
-{$ifdef REGCALL}
|
|
|
+{$ifdef REGCALL}
|
|
|
movl %eax,%edi // load destination address
|
|
|
movl %edx,%esi // Load Source adress
|
|
|
-{$else}
|
|
|
+{$else}
|
|
|
movl s,%esi // Load Source adress
|
|
|
movl d,%edi // load destination address
|
|
|
-{$endif}
|
|
|
+{$endif}
|
|
|
movzbl (%esi),%ecx // load length in ECX
|
|
|
incl %esi
|
|
|
rep
|
|
|
movsb
|
|
|
movb $0,(%edi)
|
|
|
-{$ifndef REGCALL}
|
|
|
+{$ifndef REGCALL}
|
|
|
movl d,%eax // return value to EAX
|
|
|
-{$endif}
|
|
|
- movl saveedi,%edi
|
|
|
- movl saveesi,%esi
|
|
|
+{$endif}
|
|
|
+ movl saveedi,%edi
|
|
|
+ movl saveesi,%esi
|
|
|
end;
|
|
|
|
|
|
{
|
|
|
$Log$
|
|
|
- Revision 1.10 2003-11-11 21:08:17 peter
|
|
|
+ Revision 1.11 2003-11-19 16:58:44 peter
|
|
|
+ * make strpas assembler function
|
|
|
+
|
|
|
+ Revision 1.10 2003/11/11 21:08:17 peter
|
|
|
* REGCALL define added
|
|
|
|
|
|
Revision 1.9 2003/09/08 18:21:37 peter
|