📄 armdefs.h
字号:
#else#define ARMul_ABORTWORD 0xefffffff /* SWI -1 */#define ARMul_PREFETCHABORT(address) if (state->AbortAddr == 1) \ state->AbortAddr = (address & ~3L)#endif#define ARMul_DATAABORT(address) state->abortSig = HIGH ; \ state->Aborted = ARMul_DataAbortV ;#define ARMul_CLEARABORT state->abortSig = LOW/***************************************************************************\* Definitons of things in the memory interface *\***************************************************************************/extern unsigned ARMul_MemoryInit (ARMul_State * state, unsigned int initmemsize);extern void ARMul_MemoryExit (ARMul_State * state);extern ARMword ARMul_LoadInstrS (ARMul_State * state, ARMword address, ARMword isize);extern ARMword ARMul_LoadInstrN (ARMul_State * state, ARMword address, ARMword isize);extern ARMword ARMul_ReLoadInstr (ARMul_State * state, ARMword address, ARMword isize);extern ARMword ARMul_LoadWordS (ARMul_State * state, ARMword address);extern ARMword ARMul_LoadWordN (ARMul_State * state, ARMword address);extern ARMword ARMul_LoadHalfWord (ARMul_State * state, ARMword address);extern ARMword ARMul_LoadByte (ARMul_State * state, ARMword address);extern void ARMul_StoreWordS (ARMul_State * state, ARMword address, ARMword data);extern void ARMul_StoreWordN (ARMul_State * state, ARMword address, ARMword data);extern void ARMul_StoreHalfWord (ARMul_State * state, ARMword address, ARMword data);extern void ARMul_StoreByte (ARMul_State * state, ARMword address, ARMword data);extern ARMword ARMul_SwapWord (ARMul_State * state, ARMword address, ARMword data);extern ARMword ARMul_SwapByte (ARMul_State * state, ARMword address, ARMword data);extern void ARMul_Icycles (ARMul_State * state, unsigned number, ARMword address);extern void ARMul_Ccycles (ARMul_State * state, unsigned number, ARMword address);extern ARMword ARMul_ReadWord (ARMul_State * state, ARMword address);extern ARMword ARMul_ReadByte (ARMul_State * state, ARMword address);extern void ARMul_WriteWord (ARMul_State * state, ARMword address, ARMword data);extern void ARMul_WriteByte (ARMul_State * state, ARMword address, ARMword data);extern ARMword ARMul_MemAccess (ARMul_State * state, ARMword, ARMword, ARMword, ARMword, ARMword, ARMword, ARMword, ARMword, ARMword, ARMword);/***************************************************************************\* Definitons of things in the co-processor interface *\***************************************************************************/#define ARMul_FIRST 0#define ARMul_TRANSFER 1#define ARMul_BUSY 2#define ARMul_DATA 3#define ARMul_INTERRUPT 4#define ARMul_DONE 0#define ARMul_CANT 1#define ARMul_INC 3#define ARMul_CP13_R0_FIQ 0x1#define ARMul_CP13_R0_IRQ 0x2#define ARMul_CP13_R8_PMUS 0x1#define ARMul_CP14_R0_ENABLE 0x0001#define ARMul_CP14_R0_CLKRST 0x0004#define ARMul_CP14_R0_CCD 0x0008#define ARMul_CP14_R0_INTEN0 0x0010#define ARMul_CP14_R0_INTEN1 0x0020#define ARMul_CP14_R0_INTEN2 0x0040#define ARMul_CP14_R0_FLAG0 0x0100#define ARMul_CP14_R0_FLAG1 0x0200#define ARMul_CP14_R0_FLAG2 0x0400#define ARMul_CP14_R10_MOE_IB 0x0004#define ARMul_CP14_R10_MOE_DB 0x0008#define ARMul_CP14_R10_MOE_BT 0x000c#define ARMul_CP15_R1_ENDIAN 0x0080#define ARMul_CP15_R1_ALIGN 0x0002#define ARMul_CP15_R5_X 0x0400#define ARMul_CP15_R5_ST_ALIGN 0x0001#define ARMul_CP15_R5_IMPRE 0x0406#define ARMul_CP15_R5_MMU_EXCPT 0x0400#define ARMul_CP15_DBCON_M 0x0100#define ARMul_CP15_DBCON_E1 0x000c#define ARMul_CP15_DBCON_E0 0x0003extern unsigned ARMul_CoProInit (ARMul_State * state);extern void ARMul_CoProExit (ARMul_State * state);extern void ARMul_CoProAttach (ARMul_State * state, unsigned number, ARMul_CPInits * init, ARMul_CPExits * exit, ARMul_LDCs * ldc, ARMul_STCs * stc, ARMul_MRCs * mrc, ARMul_MCRs * mcr, ARMul_CDPs * cdp, ARMul_CPReads * read, ARMul_CPWrites * write);extern void ARMul_CoProDetach (ARMul_State * state, unsigned number);/***************************************************************************\* Definitons of things in the host environment *\***************************************************************************/extern unsigned ARMul_OSInit (ARMul_State * state);extern void ARMul_OSExit (ARMul_State * state);extern unsigned ARMul_OSHandleSWI (ARMul_State * state, ARMword number);extern ARMword ARMul_OSLastErrorP (ARMul_State * state);extern ARMword ARMul_Debug (ARMul_State * state, ARMword pc, ARMword instr);extern unsigned ARMul_OSException (ARMul_State * state, ARMword vector, ARMword pc);extern int rdi_log;/***************************************************************************\* Host-dependent stuff *\***************************************************************************/#ifdef macintoshpascal void SpinCursor (short increment); /* copied from CursorCtl.h */# define HOURGLASS SpinCursor( 1 )# define HOURGLASS_RATE 1023 /* 2^n - 1 */#endif//teawater add for arm2x86 2005.02.14-------------------------------------------/*ywc 2005-03-31*//*#include "arm2x86.h"#include "arm2x86_dp.h"#include "arm2x86_movl.h"#include "arm2x86_psr.h"#include "arm2x86_shift.h"#include "arm2x86_mem.h"#include "arm2x86_mul.h"#include "arm2x86_test.h"#include "arm2x86_other.h"#include "list.h"#include "tb.h"*/#define EQ 0#define NE 1#define CS 2#define CC 3#define MI 4#define PL 5#define VS 6#define VC 7#define HI 8#define LS 9#define GE 10#define LT 11#define GT 12#define LE 13#define AL 14#define NV 15#ifndef NFLAG#define NFLAG state->NFlag#endif //NFLAG#ifndef ZFLAG#define ZFLAG state->ZFlag#endif //ZFLAG#ifndef CFLAG#define CFLAG state->CFlag#endif //CFLAG#ifndef VFLAG#define VFLAG state->VFlag#endif //VFLAG#ifndef IFLAG#define IFLAG (state->IFFlags >> 1)#endif //IFLAG#ifndef FFLAG#define FFLAG (state->IFFlags & 1)#endif //FFLAG#ifndef IFFLAGS#define IFFLAGS state->IFFlags#endif //VFLAG#define FLAG_MASK 0xf0000000#define NBIT_SHIFT 31#define ZBIT_SHIFT 30#define CBIT_SHIFT 29#define VBIT_SHIFT 28//teawater change for local tb branch directly jump 2005.10.18------------------#include "dbct/list.h"#include "dbct/arm2x86.h"#include "dbct/arm2x86_dp.h"#include "dbct/arm2x86_movl.h"#include "dbct/arm2x86_psr.h"#include "dbct/arm2x86_shift.h"#include "dbct/arm2x86_mem.h"#include "dbct/arm2x86_mul.h"#include "dbct/arm2x86_test.h"#include "dbct/arm2x86_other.h"#include "dbct/arm2x86_coproc.h"#include "dbct/tb.h"//AJ2D--------------------------------------------------------------------------//AJ2D--------------------------------------------------------------------------#define SKYEYE_OUTREGS(fd) { fprintf ((fd), "R %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,C %x,S %x,%x,%x,%x,%x,%x,%x,M %x,B %x,E %x,I %x,P %x,T %x,L %x,D %x,",\ state->Reg[0],state->Reg[1],state->Reg[2],state->Reg[3], \ state->Reg[4],state->Reg[5],state->Reg[6],state->Reg[7], \ state->Reg[8],state->Reg[9],state->Reg[10],state->Reg[11], \ state->Reg[12],state->Reg[13],state->Reg[14],state->Reg[15], \ state->Cpsr, state->Spsr[0], state->Spsr[1], state->Spsr[2],\ state->Spsr[3],state->Spsr[4], state->Spsr[5], state->Spsr[6],\ state->Mode,state->Bank,state->ErrorCode,state->instr,state->pc,\ state->temp,state->loaded,state->decoded);}#define SKYEYE_OUTMOREREGS(fd) { fprintf ((fd),"\RUs %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,\RF %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,\RI %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,\RS %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,\RA %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,\RUn %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x\n",\ state->RegBank[0][0],state->RegBank[0][1],state->RegBank[0][2],state->RegBank[0][3], \ state->RegBank[0][4],state->RegBank[0][5],state->RegBank[0][6],state->RegBank[0][7], \ state->RegBank[0][8],state->RegBank[0][9],state->RegBank[0][10],state->RegBank[0][11], \ state->RegBank[0][12],state->RegBank[0][13],state->RegBank[0][14],state->RegBank[0][15], \ state->RegBank[1][0],state->RegBank[1][1],state->RegBank[1][2],state->RegBank[1][3], \ state->RegBank[1][4],state->RegBank[1][5],state->RegBank[1][6],state->RegBank[1][7], \ state->RegBank[1][8],state->RegBank[1][9],state->RegBank[1][10],state->RegBank[1][11], \ state->RegBank[1][12],state->RegBank[1][13],state->RegBank[1][14],state->RegBank[1][15], \ state->RegBank[2][0],state->RegBank[2][1],state->RegBank[2][2],state->RegBank[2][3], \ state->RegBank[2][4],state->RegBank[2][5],state->RegBank[2][6],state->RegBank[2][7], \ state->RegBank[2][8],state->RegBank[2][9],state->RegBank[2][10],state->RegBank[2][11], \ state->RegBank[2][12],state->RegBank[2][13],state->RegBank[2][14],state->RegBank[2][15], \ state->RegBank[3][0],state->RegBank[3][1],state->RegBank[3][2],state->RegBank[3][3], \ state->RegBank[3][4],state->RegBank[3][5],state->RegBank[3][6],state->RegBank[3][7], \ state->RegBank[3][8],state->RegBank[3][9],state->RegBank[3][10],state->RegBank[3][11], \ state->RegBank[3][12],state->RegBank[3][13],state->RegBank[3][14],state->RegBank[3][15], \ state->RegBank[4][0],state->RegBank[4][1],state->RegBank[4][2],state->RegBank[4][3], \ state->RegBank[4][4],state->RegBank[4][5],state->RegBank[4][6],state->RegBank[4][7], \ state->RegBank[4][8],state->RegBank[4][9],state->RegBank[4][10],state->RegBank[4][11], \ state->RegBank[4][12],state->RegBank[4][13],state->RegBank[4][14],state->RegBank[4][15], \ state->RegBank[5][0],state->RegBank[5][1],state->RegBank[5][2],state->RegBank[5][3], \ state->RegBank[5][4],state->RegBank[5][5],state->RegBank[5][6],state->RegBank[5][7], \ state->RegBank[5][8],state->RegBank[5][9],state->RegBank[5][10],state->RegBank[5][11], \ state->RegBank[5][12],state->RegBank[5][13],state->RegBank[5][14],state->RegBank[5][15] \ );}#define SA1110 0x6901b110#define SA1100 0x4401a100#define PXA250 0x69052100#define PXA270 0x69054110//#define PXA250 0x69052903// 0x69052903; //PXA250 B1 from intel 278522-001.pdfextern void ARMul_UndefInstr (ARMul_State *, ARMword);extern void ARMul_FixCPSR (ARMul_State *, ARMword, ARMword);extern void ARMul_FixSPSR (ARMul_State *, ARMword, ARMword);extern void ARMul_ConsolePrint (ARMul_State *, const char *, ...);extern void ARMul_SelectProcessor (ARMul_State *, unsigned);#endif /* _ARMDEFS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -