Помогите, пожалуйста, переписать в функцию в 64-х разрядную версию:
function GetCPUTick :Int64;
asm
RDTSC
end;
Модератор: Модераторы
function GetCPUTick: Int64; register;
asm
rdtsc
end;
Under Windows platforms, Microsoft strongly discourages using the TSC for high-resolution timing for exactly these reasons, providing instead the Windows APIs QueryPerformanceCounter and QueryPerformanceFrequency. Even when using these functions, Microsoft recommends the code to be locked to a single CPU. Under Linux, similar functionality is provided by reading the value of CLOCK_MONOTONIC clock using POSIX clock_gettime function.
Mr.Smart писал(а):в чём естественно проблемы
function GetCPUTick :TInt64;
asm
RDTSC
movslq %eax,%rax
movslq %edx,%rdx
shl $0x20,%rdx
add %rdx,%rax
end;
Max Rusov писал(а):Странно, что assembler по синтаксису не совместим с Delphi, хотя у меня стоят соответствующие опции. Понятно, что пока нет 64-х разрядного Delphi о совместимости говорить некорректно, но все таки...
Вернуться в Free Pascal Compiler
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 4