⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 armia_iacxl10_2004_3_16.h

📁 自己编写的ARM处理器的指令集仿真
💻 H
字号:
#ifndef ARMIA_H#define ARMIA_H#include "common_IAcxl10_2004_3_16.h"#include <stdio.h>#include "os_IAcxl10_2004_3_16.h"#include <unistd.h>#include "memarg_IAcxl10_2004_3_16.h"typedef void (*MEMFUN)(UNL,UNL*,bool,int,bool*);//memory function pointer;typedef void (*IRQFUN)(bool*);//中断产生函数指针;typedef void (*FIQFUN)(bool*);//快中断产生函数指针;typedef void (*COPROFUN)(bool*,bool*,UNL*);//协处理器接口;struct ARMISS_stru{     UNL                       r_gen[16];     UNL                       r_fiq[7];     UNL                       r_svc[2];     UNL                       r_abt[2];     UNL                       r_irq[2];     UNL                       r_und[2];//对应于ARM中的寄存器组;     memarg_stru               memptr;     int                       size,des_reg;        bool                      update_flags,irq_pt,fiq_pt,copro_pt;	 bool                      pc_changed;            CPSR_stru                 SPSR[5];     CPSR_stru                 CPSR;      instruct_reg_stru         instruct_reg;     shifter_stru              shifter;     common_dec_stru           common_dec;     ARM_type0_stru            ARM_type0;     ARM_type1_stru            ARM_type1;     ARM_type2_stru            ARM_type2;     ARM_type3_stru            ARM_type3;     ARM_type4_stru            ARM_type4;     ARM_type5_stru            ARM_type5;     ARM_type6_stru            ARM_type6;     ARM_type7_stru            ARM_type7;     long                      ins[2];//arm decode structure;     Thu_type1_stru            Thu_type1;     Thu_type2_stru            Thu_type2;     Thu_type3_stru            Thu_type3;     Thu_type4_stru            Thu_type4;     Thu_type5_stru            Thu_type5;     Thu_type6_stru            Thu_type6;     Thu_type7_stru            Thu_type7;     Thu_type8_stru            Thu_type8;     Thu_common_stru           Thu_common;     char*                     commandline;     bool                      Emulate;     int                       Endcond;                   void      set_decoder_stru(UNL );     void      barrel_shifter_imm(int , int, long);     void      barrel_shifter_reg(int , long, long);     void      barrel_shifter_rotate_imm(int,long);     UNL&      getreg(int i);     UNL       getregd(int i);     int       getid();     void      Addressing_mod1(int);     UNL       Addressing_mod2(int);     UNL       Addressing_mod3();     addr_stru Addressing_mod4();     addr_stru Addressing_mod5();     UNL       addr_mod2_shift(int mod,int mount,UNL oper);     bool      executable();     void      prefetch_abt_handle();     void      undef_abt_handle();     void      data_abt_handle();     void      irq_ext_handle();     void      fiq_ext_handle();     UNL   Read_Word(UNL addr);     UNL   Read_Byte(UNL addr);     void  SWIWrite(UNL,UNL,UNL);     void  Write_Word(UNL addr,UNL data);     void  SWIOpen(UNL name,UNL flags);     void  Write_Byte(UNL addr,UNL data);     void  SWIRead(UNL,UNL,UNL);     void  WriteCommandLineTo( UNL );     void  Thu_set_decode_stru(UNL instr);     UNL   rotate_shift(UNL oper,int mount);             ARMISS_stru();                                            UNL           oper,data;        bool          nrw,abort,nirq,nfiq,nreset,ncpa,ncpb;        MEMFUN        pmemfun;        IRQFUN        pirq;        FIQFUN        pfiq;        COPROFUN      pcopro;        int           mas,num;        bool          prefetch_abt,data_abt,undef_abt;        bool          fiq_ext,irq_ext;                        int   i;                void  reset();        void  mem_reg(MEMFUN,memarg_stru);//访存回调的注册函数;        void  irq_reg(IRQFUN);//中断产生的回调注册函数;        void  fiq_reg(FIQFUN);//快中断产生的回调注册函数;        void  copro_reg(COPROFUN);//协处理器的回调注册函数;        void  init();        void  fetch();        void  decode();        int   ARM_t0_decode();        int   ARM_t1_decode();        int   ARM_t2_decode();        int   ARM_t3_decode();        void  ARM_t4_decode();        void  ARM_t5_decode();        void  ARM_t6_decode();        void  ARM_t7_decode();        void  miscell_instr_decode();        void  data_pro_imm_shift_decode();        void  data_pro_reg_shift_decode();        void  data_pro_imm_decode();        void  mul_ext_decode();        void  run();  void step();        int   check_except();                    UNL  AND();        UNL  EOR();        UNL  SUB();        UNL  RSB();        UNL  ADD();        UNL  ADC();        UNL  SBC();        UNL  RSC();        void TST();        void TEQ();        void CMP();        void CMN();        UNL  ORR();        UNL  MOV();        UNL  BIC();        UNL  MVN();        CPSR_stru  MRS();        void       MSR();        long       CLZ();        void       BX();        void       BL();                     void       LDR(int);        void       STR(int);        void       LDRB(int);        void       STRB(int);        void       LDRH();        void       LDRSB();        void       LDRSH();        void       STRH();        void       LDRT(int);        void       STRT(int);        void       LDRBT(int);        void       STRBT(int);        void       LDM1();        void       LDM2();        void       LDM3();        void       STM1();        void       STM2();        void       MLA();        void       MUL();        void       SMLAL();        void       SMULL();        void       UMLAL();        void       UMULL();        void       SWPB();        void       SWP();        int        SWI();        void       LDC();        void       STC();        void       CDP();        void       MCR();        void       MRC();         };#endif             

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -