代码拉取完成,页面将自动刷新
#ifndef HELPER_H
#define HELPER_H
#include "sim.h"
#include <stdint.h>
#define EB(n, b) (((n) >> (b-1)) & 1)
#define UP(n, b) (((n) >> (b-1)) & 1)
#define B(n, b) (((n) >> (b)) & 1)
#define R(no) (regs[no])
#define IS_LOG(opcode) (opcode == AND || opcode == XOR || opcode == CAND || opcode == CXOR \
|| opcode == ORR || opcode == MOV || opcode == CLB || opcode == MVN)
#define NO_WRITE(opcode) (opcode == CAND || opcode == CXOR || opcode == CSUB || opcode == CADD)
#define MEM_INST(inst) (inst == LSR_OFF_INST || inst == LSI_OFF_INST || inst == LSHWR_OFF_INST || inst == LSHWI_OFF_INST)
#define PC (regs[31])
#define LR (regs[30])
#define SP (regs[29])
#define COPY_SBIT(r1, r2) \
(r1.S = r2.S); \
(r1.P = r2.P); \
(r1.U = r2.U); \
(r1.B = r2.B); \
(r1.W = r2.W); \
(r1.L = r2.L); \
(r1.H = r2.H);
void printdw(int dword);
uint32_t bits(int dword, int start, int end);
void fetch_stat();
void decode_stat();
void execute_stat();
void memory_stat();
void writeback_stat();
char *INST_NAME(inst_type_t i);
char *OPCODE_NAME(opcode_t o);
char *SHIFT_TYPE_NAME(shifttype_t s);
char *COND_NAME(cond_t c);
extern stat_reg_t cmsr;
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。