From 6ae738a988f655ff601550d34fc189b790a351fb Mon Sep 17 00:00:00 2001 From: NicJA Date: Wed, 19 Aug 2015 14:11:20 +0000 Subject: [PATCH] fix the RDTSC() inline so that it works correctly with c99 git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@51018 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/i386-pc/kernel/kernel_cpu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/i386-pc/kernel/kernel_cpu.c b/arch/i386-pc/kernel/kernel_cpu.c index ebf4a49c62..ea06eb5a7e 100644 --- a/arch/i386-pc/kernel/kernel_cpu.c +++ b/arch/i386-pc/kernel/kernel_cpu.c @@ -24,13 +24,12 @@ #define D(x) -inline volatile long long RDTSC() { - register long long TSC asm("eax"); - asm volatile (".byte 15, 49" : : : "eax", "edx"); - return TSC; +static inline unsigned long long RDTSC() { + unsigned long long _tsc; + asm volatile (".byte 0x0f, 0x31" : "=A" (_tsc)); + return _tsc; } - void cpu_Dispatch(struct ExceptionContext *regs) { struct Task *task; -- 2.11.4.GIT