提交 e6942ebf 编写于 作者: Z Zihao Yu

change arch to isa

上级 d113a99d
NAME = nemu
ifneq ($(MAKECMDGOALS),clean) # ignore check for make clean
ARCH ?= x86
ARCHS = $(shell ls src/arch/)
$(info Building $(NAME) [$(ARCH)])
ISA ?= x86
ISAS = $(shell ls src/isa/)
$(info Building $(NAME) [$(ISA)])
ifeq ($(filter $(ARCHS), $(ARCH)), ) # ARCH must be valid
$(error Invalid ARCH. Supported: $(ARCHS))
ifeq ($(filter $(ISAS), $(ISA)), ) # ISA must be valid
$(error Invalid ISA. Supported: $(ISAS))
endif
endif
INC_DIR += ./include ./src/arch/$(ARCH)/include
INC_DIR += ./include ./src/isa/$(ISA)/include
BUILD_DIR ?= ./build
ifeq ($(SHARE), 1)
......@@ -19,8 +19,8 @@ SO_CFLAGS = -fPIC -D_SHARE=1
SO_LDLAGS = -shared -fPIC
endif
OBJ_DIR ?= $(BUILD_DIR)/obj-$(ARCH)$(SO)
BINARY ?= $(BUILD_DIR)/$(NAME)-$(ARCH)$(SO)
OBJ_DIR ?= $(BUILD_DIR)/obj-$(ISA)$(SO)
BINARY ?= $(BUILD_DIR)/$(NAME)-$(ISA)$(SO)
include Makefile.git
......@@ -30,12 +30,12 @@ include Makefile.git
CC = gcc
LD = gcc
INCLUDES = $(addprefix -I, $(INC_DIR))
CFLAGS += -O2 -MMD -Wall -Werror -ggdb3 $(INCLUDES) -D__ARCH__=$(ARCH) -fomit-frame-pointer
CFLAGS += -O2 -MMD -Wall -Werror -ggdb3 $(INCLUDES) -D__ISA__=$(ISA) -fomit-frame-pointer
CFLAGS += -DDIFF_TEST_QEMU
# Files to be compiled
SRCS = $(shell find src/ -name "*.c" | grep -v "arch")
SRCS += $(shell find src/arch/$(ARCH) -name "*.c")
SRCS = $(shell find src/ -name "*.c" | grep -v "isa")
SRCS += $(shell find src/isa/$(ISA) -name "*.c")
OBJS = $(SRCS:src/%.c=$(OBJ_DIR)/%.o)
# Compilation patterns
......@@ -54,7 +54,7 @@ $(OBJ_DIR)/%.o: src/%.c
app: $(BINARY)
override ARGS ?= -l $(BUILD_DIR)/nemu-log.txt
#override ARGS += -d $(NEMU_HOME)/$(BUILD_DIR)/$(NAME)-$(ARCH)-so
#override ARGS += -d $(NEMU_HOME)/$(BUILD_DIR)/$(NAME)-$(ISA)-so
override ARGS += -d $(NEMU_HOME)/tools/qemu-diff/build/qemu-so
# Command to execute NEMU
......
......@@ -22,7 +22,7 @@ typedef struct {
char str[OP_STR_SIZE];
} Operand;
#include "arch/decode.h"
#include "isa/decode.h"
typedef struct {
uint32_t opcode;
......@@ -31,7 +31,7 @@ typedef struct {
bool is_jmp;
vaddr_t jmp_pc;
Operand src, dest, src2;
struct CPUDecodeInfo arch;
struct ISADecodeInfo isa;
#ifdef DEBUG
char assembly[80];
char asm_buf[128];
......
......@@ -176,6 +176,6 @@ static inline void rtl_mux(rtlreg_t* dest, const rtlreg_t* cond, const rtlreg_t*
rtl_or(dest, &t0, &t1);
}
#include "arch/rtl.h"
#include "isa/rtl.h"
#endif
#ifndef __DIFF_TEST_H__
#define __DIFF_TEST_H__
#include "arch/diff-test.h"
#include "isa/diff-test.h"
void difftest_skip_ref(void);
void difftest_skip_dut(void);
......
......@@ -3,7 +3,7 @@
#include "common.h"
#include "memory/memory.h"
#include "arch/reg.h"
#include "isa/reg.h"
extern CPU_state cpu;
......
#include "cpu/rtl.h"
#include "cpu/exec.h"
#include "arch/intr.h"
#include "isa/intr.h"
CPU_state cpu;
......@@ -13,7 +13,7 @@ void decinfo_set_jmp(bool is_jmp) {
decinfo.is_jmp = is_jmp;
}
make_EHelper(arch);
make_EHelper(isa);
void exec_wrapper(bool print_flag) {
vaddr_t ori_pc = cpu.pc;
......@@ -24,7 +24,7 @@ void exec_wrapper(bool print_flag) {
#endif
decinfo.seq_pc = ori_pc;
exec_arch(&decinfo.seq_pc);
exec_isa(&decinfo.seq_pc);
#ifdef DEBUG
int instr_len = decinfo.seq_pc - ori_pc;
......@@ -40,7 +40,7 @@ void exec_wrapper(bool print_flag) {
#define IRQ_TIMER 32
void raise_intr(uint8_t, vaddr_t);
if (cpu.INTR && arch_istatus()) {
if (cpu.INTR && isa_istatus()) {
cpu.INTR = false;
raise_intr(IRQ_TIMER, cpu.pc);
update_pc();
......
......@@ -23,21 +23,21 @@ static inline make_DopHelper(r) {
}
make_DHelper(I) {
decode_op_r(id_src, decinfo.arch.instr.rs, true);
decode_op_i(id_src2, decinfo.arch.instr.simm, true);
decode_op_r(id_dest, decinfo.arch.instr.rt, false);
decode_op_r(id_src, decinfo.isa.instr.rs, true);
decode_op_i(id_src2, decinfo.isa.instr.simm, true);
decode_op_r(id_dest, decinfo.isa.instr.rt, false);
}
make_DHelper(IU) {
decode_op_r(id_src, decinfo.arch.instr.rs, true);
decode_op_i(id_src2, decinfo.arch.instr.imm, true);
decode_op_r(id_dest, decinfo.arch.instr.rt, false);
decode_op_r(id_src, decinfo.isa.instr.rs, true);
decode_op_i(id_src2, decinfo.isa.instr.imm, true);
decode_op_r(id_dest, decinfo.isa.instr.rt, false);
print_Dop(id_src2->str, OP_STR_SIZE, "0x%x", decinfo.arch.instr.imm);
print_Dop(id_src2->str, OP_STR_SIZE, "0x%x", decinfo.isa.instr.imm);
}
make_DHelper(J) {
vaddr_t jmp_target = (cpu.pc & 0xf0000000) | (decinfo.arch.instr.jmp_target << 2);
vaddr_t jmp_target = (cpu.pc & 0xf0000000) | (decinfo.isa.instr.jmp_target << 2);
decode_op_i(id_dest, jmp_target, true);
decinfo.jmp_pc = jmp_target;
......@@ -45,14 +45,14 @@ make_DHelper(J) {
}
make_DHelper(R) {
decode_op_r(id_src, decinfo.arch.instr.rs, true);
decode_op_r(id_src2, decinfo.arch.instr.rt, true);
decode_op_r(id_dest, decinfo.arch.instr.rd, false);
decode_op_r(id_src, decinfo.isa.instr.rs, true);
decode_op_r(id_src2, decinfo.isa.instr.rt, true);
decode_op_r(id_dest, decinfo.isa.instr.rd, false);
}
static inline make_DHelper(addr) {
decode_op_r(id_src, decinfo.arch.instr.rs, true);
decode_op_i(id_src2, decinfo.arch.instr.simm, true);
decode_op_r(id_src, decinfo.isa.instr.rs, true);
decode_op_i(id_src2, decinfo.isa.instr.simm, true);
print_Dop(id_src->str, OP_STR_SIZE, "%d(%s)", id_src2->val, reg_name(id_src->reg, 4));
......@@ -61,33 +61,33 @@ static inline make_DHelper(addr) {
make_DHelper(ld) {
decode_addr(eip);
decode_op_r(id_dest, decinfo.arch.instr.rt, false);
decode_op_r(id_dest, decinfo.isa.instr.rt, false);
}
make_DHelper(st) {
decode_addr(eip);
decode_op_r(id_dest, decinfo.arch.instr.rt, true);
decode_op_r(id_dest, decinfo.isa.instr.rt, true);
}
make_DHelper(B) {
int32_t offset = (decinfo.arch.instr.simm << 2);
int32_t offset = (decinfo.isa.instr.simm << 2);
decinfo.jmp_pc = cpu.pc + offset + 4;
decode_op_r(id_src, decinfo.arch.instr.rs, true);
decode_op_r(id_src2, decinfo.arch.instr.rt, true);
decode_op_r(id_src, decinfo.isa.instr.rs, true);
decode_op_r(id_src2, decinfo.isa.instr.rt, true);
decode_op_i(id_dest, decinfo.jmp_pc, true);
print_Dop(id_dest->str, OP_STR_SIZE, "0x%x", decinfo.jmp_pc);
}
make_DHelper(shift) {
decode_op_i(id_src, decinfo.arch.instr.sa, true);
decode_op_r(id_src2, decinfo.arch.instr.rt, true);
decode_op_r(id_dest, decinfo.arch.instr.rd, false);
decode_op_i(id_src, decinfo.isa.instr.sa, true);
decode_op_r(id_src2, decinfo.isa.instr.rt, true);
decode_op_r(id_dest, decinfo.isa.instr.rd, false);
}
make_DHelper(cmov) {
decode_op_r(id_src, decinfo.arch.instr.rs, true);
decode_op_r(id_src2, decinfo.arch.instr.rt, true);
decode_op_r(id_dest, decinfo.arch.instr.rd, true);
decode_op_r(id_src, decinfo.isa.instr.rs, true);
decode_op_r(id_src2, decinfo.isa.instr.rt, true);
decode_op_r(id_dest, decinfo.isa.instr.rd, true);
}
......@@ -13,7 +13,7 @@ static OpcodeEntry special_table [64] = {
};
static make_EHelper(special) {
idex(eip, &special_table[decinfo.arch.instr.func]);
idex(eip, &special_table[decinfo.isa.instr.func]);
}
static OpcodeEntry special2_table [64] = {
......@@ -28,7 +28,7 @@ static OpcodeEntry special2_table [64] = {
};
static make_EHelper(special2) {
idex(eip, &special2_table[decinfo.arch.instr.func]);
idex(eip, &special2_table[decinfo.isa.instr.func]);
}
static OpcodeEntry regimm_table [32] = {
......@@ -39,7 +39,7 @@ static OpcodeEntry regimm_table [32] = {
};
static make_EHelper(regimm) {
idex(eip, &regimm_table[decinfo.arch.instr.rt]);
idex(eip, &regimm_table[decinfo.isa.instr.rt]);
}
static OpcodeEntry opcode_table [64] = {
......@@ -53,8 +53,8 @@ static OpcodeEntry opcode_table [64] = {
/* b111 */ EMPTY, EMPTY, EMPTY, EMPTY, EX(nemu_trap), EMPTY, EMPTY, EMPTY,
};
make_EHelper(arch) {
decinfo.arch.instr.val = instr_fetch(eip, 4);
decinfo.width = opcode_table[decinfo.arch.instr.opcode].width;
idex(eip, &opcode_table[decinfo.arch.instr.opcode]);
make_EHelper(isa) {
decinfo.isa.instr.val = instr_fetch(eip, 4);
decinfo.width = opcode_table[decinfo.isa.instr.opcode].width;
idex(eip, &opcode_table[decinfo.isa.instr.opcode]);
}
......@@ -30,7 +30,7 @@ typedef union {
} Instr;
struct CPUDecodeInfo {
struct ISADecodeInfo {
Instr instr;
};
......
#include "reg.h"
static inline bool arch_istatus(void) {
static inline bool isa_istatus(void) {
return false;
}
......@@ -2,14 +2,14 @@
// this is not consistency with uint8_t
// but it is ok since we do not access the array directly
const uint32_t arch_default_img [] = {
const uint32_t isa_default_img [] = {
0xac000000, // sw zero,0(zero)
0x8c020000, // lw v0,0(zero)
0xf0000000, // nemu_trap
};
const long arch_default_img_size = sizeof(arch_default_img);
const long isa_default_img_size = sizeof(isa_default_img);
void init_arch(void) {
void init_isa(void) {
cpu.gpr[0]._32 = 0;
cpu.pc = PC_START;
}
#include "cpu/rtl.h"
//#include "arch/mmu.h"
//#include "isa/mmu.h"
void raise_intr(uint8_t NO, vaddr_t ret_addr) {
/* TODO: Trigger an interrupt/exception with ``NO''.
......
#include "nemu.h"
uint32_t arch_vaddr_read(vaddr_t addr, int len) {
uint32_t isa_vaddr_read(vaddr_t addr, int len) {
return paddr_read(addr, len);
}
void arch_vaddr_write(vaddr_t addr, uint32_t data, int len) {
void isa_vaddr_write(vaddr_t addr, uint32_t data, int len) {
paddr_write(addr, data, len);
}
......@@ -7,7 +7,7 @@ const char *regsl[] = {
"t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra"
};
void arch_reg_display() {
void isa_reg_display() {
int i;
for (i = 0; i < 32; i ++) {
printf("%s: 0x%08x ", regsl[i], cpu.gpr[i]._32);
......@@ -18,7 +18,7 @@ void arch_reg_display() {
printf("pc: 0x%08x\n", cpu.pc);
}
uint32_t arch_reg_str2val(const char *s, bool *success) {
uint32_t isa_reg_str2val(const char *s, bool *success) {
int i;
*success = true;
for (i = 0; i < 32; i ++) {
......
......@@ -81,7 +81,7 @@ void load_addr(vaddr_t *eip, ModR_M *m, Operand *rm) {
void read_ModR_M(vaddr_t *eip, Operand *rm, bool load_rm_val, Operand *reg, bool load_reg_val) {
ModR_M m;
m.val = instr_fetch(eip, 1);
decinfo.arch.ext_opcode = m.opcode;
decinfo.isa.ext_opcode = m.opcode;
if (reg != NULL) {
reg->type = OP_TYPE_REG;
reg->reg = m.reg;
......
......@@ -6,7 +6,7 @@ extern void (*ref_difftest_getregs)(void *c);
extern void (*ref_difftest_setregs)(const void *c);
extern void (*ref_difftest_exec)(uint64_t n);
void arch_difftest_attach(void) {
void isa_difftest_attach(void) {
// first copy the image
ref_difftest_memcpy_from_dut(PC_START, guest_to_host(PC_START), PMEM_SIZE - PC_START);
......
......@@ -60,18 +60,18 @@ make_EHelper(leave) {
}
make_EHelper(cltd) {
if (decinfo.arch.is_operand_size_16) {
if (decinfo.isa.is_operand_size_16) {
TODO();
}
else {
rtl_sari(&cpu.edx, &cpu.eax, 31);
}
print_asm(decinfo.arch.is_operand_size_16 ? "cwtl" : "cltd");
print_asm(decinfo.isa.is_operand_size_16 ? "cwtl" : "cltd");
}
make_EHelper(cwtl) {
if (decinfo.arch.is_operand_size_16) {
if (decinfo.isa.is_operand_size_16) {
TODO();
}
else {
......@@ -79,18 +79,18 @@ make_EHelper(cwtl) {
rtl_sext(&cpu.eax, &cpu.eax, 2);
}
print_asm(decinfo.arch.is_operand_size_16 ? "cbtw" : "cwtl");
print_asm(decinfo.isa.is_operand_size_16 ? "cbtw" : "cwtl");
}
make_EHelper(movsx) {
id_dest->width = decinfo.arch.is_operand_size_16 ? 2 : 4;
id_dest->width = decinfo.isa.is_operand_size_16 ? 2 : 4;
rtl_sext(&s0, &id_src->val, id_src->width);
operand_write(id_dest, &s0);
print_asm_template2(movsx);
}
make_EHelper(movzx) {
id_dest->width = decinfo.arch.is_operand_size_16 ? 2 : 4;
id_dest->width = decinfo.isa.is_operand_size_16 ? 2 : 4;
operand_write(id_dest, &id_src->val);
print_asm_template2(movzx);
}
......
......@@ -3,7 +3,7 @@
static inline void set_width(int width) {
if (width == 0) {
width = decinfo.arch.is_operand_size_16 ? 2 : 4;
width = decinfo.isa.is_operand_size_16 ? 2 : 4;
}
decinfo.src.width = decinfo.dest.width = decinfo.src2.width = width;
}
......@@ -16,7 +16,7 @@ static make_EHelper(2byte_esc);
/* 0x04 */ item4, item5, item6, item7 \
}; \
static make_EHelper(name) { \
idex(eip, &concat(opcode_table_, name)[decinfo.arch.ext_opcode]); \
idex(eip, &concat(opcode_table_, name)[decinfo.isa.ext_opcode]); \
}
/* 0x80, 0x81, 0x83 */
......@@ -192,7 +192,7 @@ static make_EHelper(2byte_esc) {
idex(eip, &opcode_table[opcode]);
}
make_EHelper(arch) {
make_EHelper(isa) {
uint32_t opcode = instr_fetch(eip, 1);
decinfo.opcode = opcode;
set_width(opcode_table[opcode].width);
......
#include "cpu/exec.h"
make_EHelper(arch);
make_EHelper(isa);
make_EHelper(operand_size) {
decinfo.arch.is_operand_size_16 = true;
exec_arch(eip);
decinfo.arch.is_operand_size_16 = false;
decinfo.isa.is_operand_size_16 = true;
exec_isa(eip);
decinfo.isa.is_operand_size_16 = false;
}
......@@ -4,7 +4,7 @@
#include "common.h"
#include "cpu/decode.h"
struct CPUDecodeInfo {
struct ISADecodeInfo {
bool is_operand_size_16;
uint8_t ext_opcode;
};
......
#include "reg.h"
static inline bool arch_istatus(void) {
static inline bool isa_istatus(void) {
return cpu.IF;
}
......@@ -2,7 +2,7 @@
#define __X86_REG_H__
#include "common.h"
#include "arch/mmu.h"
#include "isa/mmu.h"
#define PC_START 0x100000
......
#include "nemu.h"
const uint8_t arch_default_img [] = {
const uint8_t isa_default_img [] = {
0xb8, 0x34, 0x12, 0x00, 0x00, // 100000: movl $0x1234,%eax
0xb9, 0x27, 0x00, 0x10, 0x00, // 100005: movl $0x100027,%ecx
0x89, 0x01, // 10000a: movl %eax,(%ecx)
......@@ -11,7 +11,7 @@ const uint8_t arch_default_img [] = {
0xb8, 0x00, 0x00, 0x00, 0x00, // 100021: movl $0x0,%eax
0xd6, // 100026: nemu_trap
};
const long arch_default_img_size = sizeof(arch_default_img);
const long isa_default_img_size = sizeof(isa_default_img);
static void restart() {
/* Set the initial instruction pointer. */
......@@ -20,7 +20,7 @@ static void restart() {
cpu.cr0.val = 0x60000011;
}
void init_arch(void) {
void init_isa(void) {
/* Test the implementation of the `CPU_state' structure. */
void reg_test(void);
reg_test();
......
#include "cpu/rtl.h"
#include "arch/mmu.h"
#include "isa/mmu.h"
void raise_intr(uint8_t NO, vaddr_t ret_addr) {
/* TODO: Trigger an interrupt/exception with ``NO''.
......
#include "nemu.h"
#include "arch/mmu.h"
#include "isa/mmu.h"
typedef union {
struct {
......@@ -44,7 +44,7 @@ static inline paddr_t page_translate(vaddr_t addr, bool is_write) {
return page_walk(addr, is_write) | (addr & PAGE_MASK);
}
uint32_t arch_vaddr_read(vaddr_t addr, int len) {
uint32_t isa_vaddr_read(vaddr_t addr, int len) {
uint32_t data;
if (cpu.cr0.paging) {
paddr_t paddr = page_translate(addr, false);
......@@ -67,7 +67,7 @@ uint32_t arch_vaddr_read(vaddr_t addr, int len) {
return data;
}
void arch_vaddr_write(vaddr_t addr, uint32_t data, int len) {
void isa_vaddr_write(vaddr_t addr, uint32_t data, int len) {
if (cpu.cr0.paging) {
paddr_t paddr = page_translate(addr, true);
uint32_t remain_byte = PAGE_SIZE - (addr & PAGE_MASK);
......
......@@ -40,7 +40,7 @@ void reg_test() {
assert(eip_sample == cpu.eip);
}
void arch_reg_display() {
void isa_reg_display() {
int i;
for (i = 0; i < 8; i ++) {
printf("%s: 0x%08x\n", regsl[i], cpu.gpr[i]._32);
......@@ -48,7 +48,7 @@ void arch_reg_display() {
printf("eip: 0x%08x\n", cpu.eip);
}
uint32_t arch_reg_str2val(const char *s, bool *success) {
uint32_t isa_reg_str2val(const char *s, bool *success) {
int i;
*success = true;
for (i = 0; i < 8; i ++) {
......
......@@ -29,13 +29,13 @@ void paddr_write(paddr_t addr, uint32_t data, int len) {
memcpy(guest_to_host(addr), &data, len);
}
uint32_t arch_vaddr_read(vaddr_t addr, int len);
void arch_vaddr_write(vaddr_t addr, uint32_t data, int len);
uint32_t isa_vaddr_read(vaddr_t addr, int len);
void isa_vaddr_write(vaddr_t addr, uint32_t data, int len);
uint32_t vaddr_read(vaddr_t addr, int len) {
return arch_vaddr_read(addr, len);
return isa_vaddr_read(addr, len);
}
void vaddr_write(vaddr_t addr, uint32_t data, int len) {
arch_vaddr_write(addr, data, len);
isa_vaddr_write(addr, data, len);
}
......@@ -173,7 +173,7 @@ static int find_dominated_op(int s, int e, bool *success) {
return dominated_op;
}
uint32_t arch_reg_str2val(const char*, bool *);
uint32_t isa_reg_str2val(const char*, bool *);
static uint32_t eval(int s, int e, bool *success) {
if (s > e) {
......@@ -185,7 +185,7 @@ static uint32_t eval(int s, int e, bool *success) {
// single token
uint32_t val;
switch (tokens[s].type) {
case TK_REG: val = arch_reg_str2val(tokens[s].str + 1, success); // +1 to skip '$'
case TK_REG: val = isa_reg_str2val(tokens[s].str + 1, success); // +1 to skip '$'
if (!*success) { return 0; }
break;
......
......@@ -8,7 +8,7 @@
#include <readline/history.h>
void cpu_exec(uint64_t);
void arch_reg_display();
void isa_reg_display();
/* We use the `readline' library to provide more flexibility to read from stdin. */
char* rl_gets() {
......@@ -58,7 +58,7 @@ static int cmd_info(char *args) {
}
else {
if (strcmp(arg, "r") == 0) {
arch_reg_display();
isa_reg_display();
}
else if (strcmp(arg, "w") == 0) {
list_watchpoint();
......
......@@ -18,8 +18,8 @@ void difftest_skip_ref() { is_skip_ref = true; }
void difftest_skip_dut() { is_skip_dut = true; }
//void difftest_skip_eflags(uint32_t mask) { eflags_skip_mask = mask; }
bool arch_difftest_check_reg(CPU_state *ref_r, vaddr_t pc);
void arch_difftest_attach(void);
bool isa_difftest_check_reg(CPU_state *ref_r, vaddr_t pc);
void isa_difftest_attach(void);
void init_difftest(char *ref_so_file, long img_size) {
#ifndef DIFF_TEST
......@@ -111,5 +111,5 @@ void difftest_attach() {
is_skip_ref = false;
is_skip_dut = false;
arch_difftest_attach();
isa_difftest_attach();
}
......@@ -2,7 +2,7 @@
#include "monitor/monitor.h"
#include <unistd.h>
void init_arch();
void init_isa();
void init_regex();
void init_wp_pool();
void init_device();
......@@ -33,7 +33,7 @@ static inline void welcome() {
#endif
Log("Build time: %s, %s", __TIME__, __DATE__);
printf("Welcome to NEMU for \33[1;41m\33[1;33m%s\33[0m!\n", str(__ARCH__));
printf("Welcome to NEMU for \33[1;41m\33[1;33m%s\33[0m!\n", str(__ISA__));
printf("For help, type \"help\"\n");
}
......@@ -41,10 +41,10 @@ static inline long load_img() {
long size;
if (img_file == NULL) {
Log("No image is given. Use the default build-in image.");
extern uint8_t arch_default_img[];
extern long arch_default_img_size;
size = arch_default_img_size;
memcpy(guest_to_host(PC_START), arch_default_img, size);
extern uint8_t isa_default_img[];
extern long isa_default_img_size;
size = isa_default_img_size;
memcpy(guest_to_host(PC_START), isa_default_img, size);
}
else {
int ret;
......@@ -95,8 +95,8 @@ int init_monitor(int argc, char *argv[]) {
/* Load the image to memory. */
long img_size = load_img();
/* Perform architecture dependent initialization. */
init_arch();
/* Perform ISA dependent initialization. */
init_isa();
/* Compile the regular expressions. */
init_regex();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册