#15658: System freeze after 3-rd icon when booting
-----------------------------+----------------------------
Reporter: X512 | Owner: nobody
Type: bug | Status: closed
Priority: normal | Milestone: Unscheduled
Component: System/Kernel | Version: R1/Development
Resolution: fixed | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: x86
-----------------------------+----------------------------
Comment (by jessicah):
If you want better optimized code, shouldn't you yank `rdtsc` inside the
cpu.cpp file as a static inline assembly function? A bit of function
overhead for essentially a single instruction as-is?
I see the only other place it's called from is bios_ia32/debug.cpp, but do
we need that level of granularity in debug? Can replace with
`system_time()`.
E.g.
{{{
static inline __attribute__((always_inline)) uint64_t tdtsc() {
uint64_t msr;
asm volatile("rdtsc\n\t"
"shl $32, %%rdx\n\t"
"or %%rdx, %0"
: "=a" (msr)
:
: "rdx");
return msr;
}
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/15658#comment:10>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.