* save rdi on win64

git-svn-id: trunk@5783 -
This commit is contained in:
florian 2007-01-02 00:32:19 +00:00
parent e5249a8b56
commit 2c17dbcda2

View File

@ -15,9 +15,14 @@
{
Implemented using the code from glibc: libc/sysdeps/x86_64/strlen.S Version 1.2
}
{$ifdef win64}
var
rdi : qword;
{$endif win64}
asm
{ win64 has different calling conventions }
{$ifdef win64}
movq %rdi,rdi
movq %rcx, %rdi { Duplicate source pointer. }
{$else win64}
movq %rdi, %rcx { Duplicate source pointer. }
@ -132,6 +137,9 @@ asm
incq %rax { increment pointer }
.LFPC_STRLEN_2:
subq %rdi, %rax { compute difference to string start }
{$ifdef win64}
movq rdi,%rdi
{$endif win64}
end;