> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 15:47:25 up  6:01,  1 user,  load average: 0.61, 0.62, 0.47
This commit is contained in:
tracer-ics2023
2024-09-12 15:47:25 +08:00
committed by zzy
parent 2261e196ab
commit eec4e65286

View File

@ -4,11 +4,12 @@
void __am_timer_init() {
}
#define put_us(num) for (;num; num /= 10) putch('0' + num % 10)
#define put_us(num) for (;num; num /= 10) putch('0' + (num % 10))
void __am_timer_uptime(AM_TIMER_UPTIME_T *uptime) {
uptime->us = ((uint64_t)inl(RTC_ADDR)) & (((uint64_t)inl(RTC_ADDR + 4)) << 32);
put_us(uptime->us);
uint64_t res = uptime->us;
put_us(res);
putch('\n');
}