From 617c7cc377017a58ca64a1e9155d1b765564ccd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Wed, 21 Apr 2021 19:46:59 +0200 Subject: [PATCH] [HALX86] Use addressing relative to RIP --- hal/halx86/apic/tsccal.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hal/halx86/apic/tsccal.S b/hal/halx86/apic/tsccal.S index 66bde94896b..7fc28ce7393 100644 --- a/hal/halx86/apic/tsccal.S +++ b/hal/halx86/apic/tsccal.S @@ -69,7 +69,7 @@ FUNC TscCalibrationISR rdtsc /* Read the current phase */ - movzx rcx, byte ptr [TscCalibrationPhase] + movzx rcx, byte ptr [rip+TscCalibrationPhase] /* Check if we're already done */ cmp cl, NUM_SAMPLES @@ -77,12 +77,12 @@ FUNC TscCalibrationISR /* Store the current value */ shl rcx, 3 - lea rbx, [TscCalibrationArray] + lea rbx, [rip+TscCalibrationArray] mov dword ptr [rbx + rcx], eax mov dword ptr [rbx + rcx + 4], edx /* Advance phase */ - inc byte ptr [TscCalibrationPhase] + inc byte ptr [rip+TscCalibrationPhase] CalibrationISR_Exit: /* Read CMOS register C */