> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  1 12:35:11 UTC 2024 x86_64 GNU/Linux
 14:34:22  up   1:40,  2 users,  load average: 0.73, 0.75, 0.96
This commit is contained in:
tracer-ysyx 2024-03-20 14:34:22 +08:00 committed by xinyangli
parent a2b9777ea4
commit de4c8730af
6 changed files with 46 additions and 692 deletions

View file

@ -1,3 +0,0 @@
#ifndef __DIFFTEST_DEF_H__
#define __DIFFTEST_DEF_H__
#endif

15
nemu/include/func.h Normal file
View file

@ -0,0 +1,15 @@
#ifndef __FUNC_DEF_H__
#define __FUNC_DEF_H__
#include <common.h>
#ifdef CONFIG_FTRACE
typedef struct {
vaddr_t start;
vaddr_t len;
char * name;
} func_t;
func_t *func_table;
#endif
#endif

View file

@ -92,6 +92,8 @@
#define PG_ALIGN __attribute((aligned(4096)))
#define FAILED_GOTO(tag, exp) do {if((exp)) goto tag;} while(0)
#if !defined(likely)
#define likely(cond) __builtin_expect(cond, 1)
#define unlikely(cond) __builtin_expect(cond, 0)