PageRenderTime 17ms CodeModel.GetById 8ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/mips/math-emu/dsemul.h

https://bitbucket.org/evzijst/gittest
C Header | 23 lines | 14 code | 5 blank | 4 comment | 0 complexity | 3a6f96157d27851f01a3dbeb6ea6d582 MD5 | raw file
 1typedef long gpreg_t;
 2typedef void *vaddr_t;
 3
 4#define REG_TO_VA (vaddr_t)
 5#define VA_TO_REG (gpreg_t)
 6
 7int mips_dsemul(struct pt_regs *regs, mips_instruction ir, gpreg_t cpc);
 8int do_dsemulret(struct pt_regs *xcp);
 9
10/* Instruction which will always cause an address error */
11#define AdELOAD 0x8c000001	/* lw $0,1($0) */
12/* Instruction which will plainly cause a CP1 exception when FPU is disabled */
13#define CP1UNDEF 0x44400001    /* cfc1 $0,$0 undef  */
14
15/* Instruction inserted following the badinst to further tag the sequence */
16#define BD_COOKIE 0x0000bd36 /* tne $0,$0 with baggage */
17
18/* Setup which instruction to use for trampoline */
19#ifdef STANDALONE_EMULATOR
20#define BADINST CP1UNDEF
21#else
22#define BADINST AdELOAD
23#endif