[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] add a simple 24mhz clock for the versatile
From: |
andrzej zaborowski |
Subject: |
Re: [Qemu-devel] [PATCH] add a simple 24mhz clock for the versatile |
Date: |
Sat, 31 Mar 2007 01:39:20 +0200 |
On 31/03/07, Wessel, Jason <address@hidden> wrote:
uint64_t now = qemu_get_clock(vm_clock);
return (uint32_t)((now*3)/125);
The optimizer should fix this up with no floating point ops.
Adding to the bikeshed discussion (www.bikeshed.com) this is still not
correct as vm_clock is to be used with ticks_per_sec.
return muldiv64(qemu_get_clock(vm_clock), 24000000, ticks_per_sec);
Regards,
Andrzej