/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

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