Added MIPS support and projects for all samples.

This commit is contained in:
xorstream
2017-01-23 01:05:08 +11:00
parent 1756ae770b
commit 72a497bc14
55 changed files with 3295 additions and 772 deletions

View File

@@ -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;

View File

@@ -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);