mips-defs.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #if !defined (__QEMU_MIPS_DEFS_H__)
  2. #define __QEMU_MIPS_DEFS_H__
  3. /* If we want to use host float regs... */
  4. //#define USE_HOST_FLOAT_REGS
  5. /* Real pages are variable size... */
  6. #define TARGET_PAGE_BITS 12
  7. #define MIPS_TLB_MAX 128
  8. #if defined(TARGET_MIPS64)
  9. #define TARGET_LONG_BITS 64
  10. #define TARGET_PHYS_ADDR_SPACE_BITS 36
  11. #define TARGET_VIRT_ADDR_SPACE_BITS 42
  12. #else
  13. #define TARGET_LONG_BITS 32
  14. #define TARGET_PHYS_ADDR_SPACE_BITS 36
  15. #define TARGET_VIRT_ADDR_SPACE_BITS 32
  16. #endif
  17. /* Masks used to mark instructions to indicate which ISA level they
  18. were introduced in. */
  19. #define ISA_MIPS1 0x00000001
  20. #define ISA_MIPS2 0x00000002
  21. #define ISA_MIPS3 0x00000004
  22. #define ISA_MIPS4 0x00000008
  23. #define ISA_MIPS5 0x00000010
  24. #define ISA_MIPS32 0x00000020
  25. #define ISA_MIPS32R2 0x00000040
  26. #define ISA_MIPS64 0x00000080
  27. #define ISA_MIPS64R2 0x00000100
  28. /* MIPS ASEs. */
  29. #define ASE_MIPS16 0x00001000
  30. #define ASE_MIPS3D 0x00002000
  31. #define ASE_MDMX 0x00004000
  32. #define ASE_DSP 0x00008000
  33. #define ASE_DSPR2 0x00010000
  34. #define ASE_MT 0x00020000
  35. #define ASE_SMARTMIPS 0x00040000
  36. #define ASE_MICROMIPS 0x00080000
  37. /* Chip specific instructions. */
  38. #define INSN_LOONGSON2E 0x20000000
  39. #define INSN_LOONGSON2F 0x40000000
  40. #define INSN_VR54XX 0x80000000
  41. /* MIPS CPU defines. */
  42. #define CPU_MIPS1 (ISA_MIPS1)
  43. #define CPU_MIPS2 (CPU_MIPS1 | ISA_MIPS2)
  44. #define CPU_MIPS3 (CPU_MIPS2 | ISA_MIPS3)
  45. #define CPU_MIPS4 (CPU_MIPS3 | ISA_MIPS4)
  46. #define CPU_VR54XX (CPU_MIPS4 | INSN_VR54XX)
  47. #define CPU_LOONGSON2E (CPU_MIPS3 | INSN_LOONGSON2E)
  48. #define CPU_LOONGSON2F (CPU_MIPS3 | INSN_LOONGSON2F)
  49. #define CPU_MIPS5 (CPU_MIPS4 | ISA_MIPS5)
  50. /* MIPS Technologies "Release 1" */
  51. #define CPU_MIPS32 (CPU_MIPS2 | ISA_MIPS32)
  52. #define CPU_MIPS64 (CPU_MIPS5 | CPU_MIPS32 | ISA_MIPS64)
  53. /* MIPS Technologies "Release 2" */
  54. #define CPU_MIPS32R2 (CPU_MIPS32 | ISA_MIPS32R2)
  55. #define CPU_MIPS64R2 (CPU_MIPS64 | CPU_MIPS32R2 | ISA_MIPS64R2)
  56. /* Strictly follow the architecture standard:
  57. - Disallow "special" instruction handling for PMON/SPIM.
  58. Note that we still maintain Count/Compare to match the host clock. */
  59. //#define MIPS_STRICT_STANDARD 1
  60. #endif /* !defined (__QEMU_MIPS_DEFS_H__) */