Added MIPS support and projects for all samples.
This commit is contained in:
@@ -34,7 +34,7 @@ uint32_t cpu_mips_get_random (CPUMIPSState *env)
|
||||
uint32_t idx;
|
||||
/* Don't return same value twice, so get another value */
|
||||
do {
|
||||
lfsr = (lfsr >> 1) ^ (-(lfsr & 1u) & 0xd0000001u);
|
||||
lfsr = (lfsr >> 1) ^ ((0-(lfsr & 1u)) & 0xd0000001u);
|
||||
idx = lfsr % (env->tlb->nb_tlb - env->CP0_Wired) + env->CP0_Wired;
|
||||
} while (idx == prev_idx);
|
||||
prev_idx = idx;
|
||||
|
||||
@@ -44,10 +44,13 @@ static int mips_r4k_init(struct uc_struct *uc, MachineState *machine)
|
||||
void mips_machine_init(struct uc_struct *uc)
|
||||
{
|
||||
static QEMUMachine mips_machine = {
|
||||
.name = "mips",
|
||||
.init = mips_r4k_init,
|
||||
.is_default = 1,
|
||||
.arch = UC_ARCH_MIPS,
|
||||
NULL,
|
||||
"mips",
|
||||
mips_r4k_init,
|
||||
NULL,
|
||||
0,
|
||||
1,
|
||||
UC_ARCH_MIPS,
|
||||
};
|
||||
|
||||
qemu_register_machine(uc, &mips_machine, TYPE_MACHINE, NULL);
|
||||
|
||||
Reference in New Issue
Block a user