4 void register_machines(void)
6 qemu_register_machine(&bareetraxfs_machine
);
7 qemu_register_machine(&axisdev88_machine
);
10 void cpu_save(QEMUFile
*f
, void *opaque
)
12 CPUCRISState
*env
= opaque
;
17 for (i
= 0; i
< 16; i
++)
18 qemu_put_be32(f
, env
->regs
[i
]);
19 for (i
= 0; i
< 16; i
++)
20 qemu_put_be32(f
, env
->pregs
[i
]);
22 qemu_put_be32(f
, env
->pc
);
23 qemu_put_be32(f
, env
->ksp
);
25 qemu_put_be32(f
, env
->dslot
);
26 qemu_put_be32(f
, env
->btaken
);
27 qemu_put_be32(f
, env
->btarget
);
29 qemu_put_be32(f
, env
->cc_op
);
30 qemu_put_be32(f
, env
->cc_mask
);
31 qemu_put_be32(f
, env
->cc_dest
);
32 qemu_put_be32(f
, env
->cc_src
);
33 qemu_put_be32(f
, env
->cc_result
);
34 qemu_put_be32(f
, env
->cc_size
);
35 qemu_put_be32(f
, env
->cc_x
);
37 for (s
= 0; s
< 4; i
++) {
38 for (i
= 0; i
< 16; i
++)
39 qemu_put_be32(f
, env
->sregs
[s
][i
]);
42 qemu_put_be32(f
, env
->mmu_rand_lfsr
);
43 for (mmu
= 0; mmu
< 2; mmu
++) {
44 for (s
= 0; s
< 4; i
++) {
45 for (i
= 0; i
< 16; i
++) {
46 qemu_put_be32(f
, env
->tlbsets
[mmu
][s
][i
].lo
);
47 qemu_put_be32(f
, env
->tlbsets
[mmu
][s
][i
].hi
);
53 int cpu_load(QEMUFile
*f
, void *opaque
, int version_id
)
55 CPUCRISState
*env
= opaque
;
60 for (i
= 0; i
< 16; i
++)
61 env
->regs
[i
] = qemu_get_be32(f
);
62 for (i
= 0; i
< 16; i
++)
63 env
->pregs
[i
] = qemu_get_be32(f
);
65 env
->pc
= qemu_get_be32(f
);
66 env
->ksp
= qemu_get_be32(f
);
68 env
->dslot
= qemu_get_be32(f
);
69 env
->btaken
= qemu_get_be32(f
);
70 env
->btarget
= qemu_get_be32(f
);
72 env
->cc_op
= qemu_get_be32(f
);
73 env
->cc_mask
= qemu_get_be32(f
);
74 env
->cc_dest
= qemu_get_be32(f
);
75 env
->cc_src
= qemu_get_be32(f
);
76 env
->cc_result
= qemu_get_be32(f
);
77 env
->cc_size
= qemu_get_be32(f
);
78 env
->cc_x
= qemu_get_be32(f
);
80 for (s
= 0; s
< 4; i
++) {
81 for (i
= 0; i
< 16; i
++)
82 env
->sregs
[s
][i
] = qemu_get_be32(f
);
85 env
->mmu_rand_lfsr
= qemu_get_be32(f
);
86 for (mmu
= 0; mmu
< 2; mmu
++) {
87 for (s
= 0; s
< 4; i
++) {
88 for (i
= 0; i
< 16; i
++) {
89 env
->tlbsets
[mmu
][s
][i
].lo
= qemu_get_be32(f
);
90 env
->tlbsets
[mmu
][s
][i
].hi
= qemu_get_be32(f
);