mirror of
https://github.com/ish-app/ish.git
synced 2026-01-25 14:06:40 +00:00
24 lines
546 B
C
24 lines
546 B
C
#include <time.h>
|
|
#include "emu/cpu.h"
|
|
#include "emu/cpuid.h"
|
|
|
|
void helper_cpuid(dword_t *a, dword_t *b, dword_t *c, dword_t *d) {
|
|
do_cpuid(a, b, c, d);
|
|
}
|
|
|
|
void helper_rdtsc(struct cpu_state *cpu) {
|
|
struct timespec now;
|
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
|
uint64_t tsc = now.tv_sec * 1000000000l + now.tv_nsec;
|
|
cpu->eax = tsc & 0xffffffff;
|
|
cpu->edx = tsc >> 32;
|
|
}
|
|
|
|
void helper_expand_flags(struct cpu_state *cpu) {
|
|
expand_flags(cpu);
|
|
}
|
|
|
|
void helper_collapse_flags(struct cpu_state *cpu) {
|
|
collapse_flags(cpu);
|
|
}
|