Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Commit

Permalink
add eiret feret
Browse files Browse the repository at this point in the history
  • Loading branch information
esm-tmori committed Jul 1, 2018
1 parent 7989545 commit 64fff1b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
Binary file modified bin/linux/athrill2
Binary file not shown.
Binary file modified trunk/src/bin/athrill2
Binary file not shown.
4 changes: 2 additions & 2 deletions trunk/src/cpu/target/v850e2m/cpu_exec/op_exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ extern OpExecType op_exec_table[OP_EXEC_TABLE_NUM];
#define op_exec_divqu_11 op_exec_divqu_11
#define op_exec_divu_11 op_exec_divu
#define op_exec_ei_10 op_exec_diei
#define op_exec_eiret_10 NULL /* TODO */
#define op_exec_feret_10 NULL /* TODO */
#define op_exec_eiret_10 op_exec_eiret_10
#define op_exec_feret_10 op_exec_feret_10
#define op_exec_fetrap_1 NULL /* TODO */
#define op_exec_halt_10 op_exec_halt
#define op_exec_hsh_12 op_exec_hsh_12
Expand Down
2 changes: 2 additions & 0 deletions trunk/src/cpu/target/v850e2m/cpu_exec/op_exec_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ extern int op_exec_prepare(TargetCoreType *cpu);
extern int op_exec_dispose(TargetCoreType *cpu);
extern int op_exec_caxi(TargetCoreType *cpu);

extern int op_exec_feret_10(TargetCoreType *cpu);
extern int op_exec_eiret_10(TargetCoreType *cpu);


/*
Expand Down
16 changes: 16 additions & 0 deletions trunk/src/cpu/target/v850e2m/cpu_exec/op_exec_spec.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,22 @@ int op_exec_reti(TargetCoreType *cpu)
}
return 0;
}

int op_exec_feret_10(TargetCoreType *cpu)
{
DBG_PRINT((DBG_EXEC_OP_BUF(), DBG_EXEC_OP_BUF_LEN(), "0x%x: FERET:0x%x\n", cpu->reg.pc, sys_get_cpu_base(&cpu->reg)->r[SYS_REG_FEPC]));
cpu->reg.pc = sys_get_cpu_base(&cpu->reg)->r[SYS_REG_FEPC];
sys_get_cpu_base(&cpu->reg)->r[SYS_REG_PSW] = sys_get_cpu_base(&cpu->reg)->r[SYS_REG_FEPSW];
return 0;
}
int op_exec_eiret_10(TargetCoreType *cpu)
{
DBG_PRINT((DBG_EXEC_OP_BUF(), DBG_EXEC_OP_BUF_LEN(), "0x%x: EIRET:0x%x\n", cpu->reg.pc, sys_get_cpu_base(&cpu->reg)->r[SYS_REG_EIPC]));
cpu->reg.pc = sys_get_cpu_base(&cpu->reg)->r[SYS_REG_EIPC];
sys_get_cpu_base(&cpu->reg)->r[SYS_REG_PSW] = sys_get_cpu_base(&cpu->reg)->r[SYS_REG_EIPSW];
return 0;
}

int op_exec_halt(TargetCoreType *cpu)
{
DBG_PRINT((DBG_EXEC_OP_BUF(), DBG_EXEC_OP_BUF_LEN(), "0x%x: HALT:0x%x\n", cpu->reg.pc, cpu->reg.pc + 4));
Expand Down

0 comments on commit 64fff1b

Please sign in to comment.