aboutsummaryrefslogtreecommitdiffstats
path: root/src/ymh15/mips_cpu_ymh15.hpp
blob: 5c6ea909324ef332a18b9cc3d57a6de347e87659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef MIPS_CPU_YMH15_H
#define MIPS_CPU_YMH15_H

#include "../../include/mips.h"

#define OPCODE 0
#define REG_S 1
#define REG_T 2
#define REG_D 3
#define SHIFT 4
#define FUNC 5
#define IMM 6
#define MEM 7

mips_error read_instruction(mips_cpu_h state);
mips_error exec_instruction(mips_cpu_h state, uint32_t inst);
mips_error exec_R(mips_cpu_h state, uint32_t var[8]);
mips_error exec_J(mips_cpu_h state, uint32_t var[8]);
mips_error exec_I(mips_cpu_h state, uint32_t var[8]);
mips_error add_sub(mips_cpu_h state, uint32_t var[8], int32_t add_sub);

uint8_t get_msb(uint32_t word);

#endif // MIPS_CPU_YMH15_H