mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-07 16:47:38 +01:00
* save rdi on win64
git-svn-id: trunk@5783 -
This commit is contained in:
parent
e5249a8b56
commit
2c17dbcda2
@ -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;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user