Statistics
| Branch: | Revision:

root / target-mips / mips-defs.h @ a1b87fe0

History | View | Annotate | Download (2.1 kB)

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