> 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 20:34:36 up 6 days, 15:40, 1 user, load average: 0.62, 0.54, 0.59
This commit is contained in:
@ -34,6 +34,15 @@
|
||||
halt(1); \
|
||||
} })
|
||||
|
||||
#define panic_all_on(cond, s) \
|
||||
({ if (cond) { \
|
||||
putstr("AM Panic: "); putstr(s); \
|
||||
putstr(" @ " __FILE__ ":" TOSTRING(__LINE__) " \n in func: "); \
|
||||
putstr(__func__); \
|
||||
putstr(" \n"); \
|
||||
halt(1); \
|
||||
} })
|
||||
|
||||
#define panic(s) panic_on(1, s)
|
||||
|
||||
#endif
|
||||
|
@ -16,10 +16,6 @@ int num_to_ascii(uint64_t _num, int power, int size, char *buf) {
|
||||
}
|
||||
|
||||
for (i = 1; num; i ++) {
|
||||
if (power == 16 && i <= 2) {
|
||||
_buf[1] = '0';
|
||||
_buf[2] = 'x';
|
||||
}
|
||||
int remainer = num % power;
|
||||
if (remainer < 10) {
|
||||
_buf[i] = '0' + remainer;
|
||||
|
Reference in New Issue
Block a user