> 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 10:10:28 up 3 days 21:16, 2 users, load average: 1.44, 1.06, 0.84
This commit is contained in:
parent
874f1d92f6
commit
f2c726e647
68 changed files with 561 additions and 38 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <utils.h>
|
||||
#include <macro.h>
|
||||
|
||||
IFDEF(CONFIG_ITRACE, void log_itrace_print());
|
||||
|
||||
|
|
1
nemu/result
Symbolic link
1
nemu/result
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/df4vrbp7ma2dnyqshms2fywnd73sa6jk-am-kernels-2024.02.18
|
|
@ -62,6 +62,7 @@ static void do_branch(Decode *s, bool condition, word_t offset) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FTRACE
|
||||
static void ftrace_jalr(Decode *s, int rd, vaddr_t dst) {
|
||||
uint32_t i = s->isa.inst.val;
|
||||
int rs1 = BITS(i, 19, 15);
|
||||
|
@ -71,6 +72,7 @@ static void ftrace_jalr(Decode *s, int rd, vaddr_t dst) {
|
|||
ftrace_call(s->pc, dst);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int decode_exec(Decode *s) {
|
||||
int rd = 0;
|
||||
|
|
|
@ -133,8 +133,12 @@ void init_monitor(int argc, char *argv[]) {
|
|||
|
||||
// printf("elf_file: %s\n", elf_file);
|
||||
if(elf_file != NULL) {
|
||||
#ifdef CONFIG_FTRACE
|
||||
void init_elf(const char *path);
|
||||
init_elf(elf_file);
|
||||
#else
|
||||
Warning("Elf file provided, but ftrace not turned on. Ignoring elf file.");
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ISA_loongarch32r
|
||||
|
|
|
@ -10,7 +10,6 @@ static vaddr_t ftrace_stack[CONFIG_FTRACE_STACK_SIZE] = {0};
|
|||
static vaddr_t ftrace_stack_len = 0;
|
||||
func_t *func_table = NULL;
|
||||
int func_table_len = 0, func_table_size = 8;
|
||||
#endif
|
||||
|
||||
static int cmp_func_t(const void *a, const void *b) {
|
||||
return ((func_t *)a)->start > ((func_t *)b)->start;
|
||||
|
@ -122,3 +121,4 @@ void ftrace_return(vaddr_t pc, vaddr_t addr) {
|
|||
Trace("%*s0x%x ret 0x%x <%s+0x%x>", ftrace_stack_len, "", pc, addr,
|
||||
f == NULL ? "???" : f->name, addr - f->start);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue