mirror of https://github.com/proxmox/mirror_qemu
target-cris: Reindent cpu_cris_init()
Judging by TCG variable initialization it used 8-char tabs; use 4 spaces instead. Also remove trailing whitespace. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>master
parent
eded12679d
commit
dd10ce6d8a
|
@ -3506,73 +3506,74 @@ static uint32_t vr_by_name(const char *name)
|
||||||
CPUCRISState *cpu_cris_init (const char *cpu_model)
|
CPUCRISState *cpu_cris_init (const char *cpu_model)
|
||||||
{
|
{
|
||||||
CRISCPU *cpu;
|
CRISCPU *cpu;
|
||||||
CPUCRISState *env;
|
CPUCRISState *env;
|
||||||
static int tcg_initialized = 0;
|
static int tcg_initialized = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
cpu = CRIS_CPU(object_new(TYPE_CRIS_CPU));
|
cpu = CRIS_CPU(object_new(TYPE_CRIS_CPU));
|
||||||
env = &cpu->env;
|
env = &cpu->env;
|
||||||
|
|
||||||
env->pregs[PR_VR] = vr_by_name(cpu_model);
|
env->pregs[PR_VR] = vr_by_name(cpu_model);
|
||||||
|
|
||||||
cpu_reset(CPU(cpu));
|
cpu_reset(CPU(cpu));
|
||||||
qemu_init_vcpu(env);
|
qemu_init_vcpu(env);
|
||||||
|
|
||||||
if (tcg_initialized)
|
if (tcg_initialized) {
|
||||||
return env;
|
return env;
|
||||||
|
}
|
||||||
|
|
||||||
tcg_initialized = 1;
|
tcg_initialized = 1;
|
||||||
|
|
||||||
#define GEN_HELPER 2
|
#define GEN_HELPER 2
|
||||||
#include "helper.h"
|
#include "helper.h"
|
||||||
|
|
||||||
if (env->pregs[PR_VR] < 32) {
|
if (env->pregs[PR_VR] < 32) {
|
||||||
cpu_crisv10_init(env);
|
cpu_crisv10_init(env);
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
|
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
|
||||||
cc_x = tcg_global_mem_new(TCG_AREG0,
|
cc_x = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, cc_x), "cc_x");
|
offsetof(CPUCRISState, cc_x), "cc_x");
|
||||||
cc_src = tcg_global_mem_new(TCG_AREG0,
|
cc_src = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, cc_src), "cc_src");
|
offsetof(CPUCRISState, cc_src), "cc_src");
|
||||||
cc_dest = tcg_global_mem_new(TCG_AREG0,
|
cc_dest = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, cc_dest),
|
offsetof(CPUCRISState, cc_dest),
|
||||||
"cc_dest");
|
"cc_dest");
|
||||||
cc_result = tcg_global_mem_new(TCG_AREG0,
|
cc_result = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, cc_result),
|
offsetof(CPUCRISState, cc_result),
|
||||||
"cc_result");
|
"cc_result");
|
||||||
cc_op = tcg_global_mem_new(TCG_AREG0,
|
cc_op = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, cc_op), "cc_op");
|
offsetof(CPUCRISState, cc_op), "cc_op");
|
||||||
cc_size = tcg_global_mem_new(TCG_AREG0,
|
cc_size = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, cc_size),
|
offsetof(CPUCRISState, cc_size),
|
||||||
"cc_size");
|
"cc_size");
|
||||||
cc_mask = tcg_global_mem_new(TCG_AREG0,
|
cc_mask = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, cc_mask),
|
offsetof(CPUCRISState, cc_mask),
|
||||||
"cc_mask");
|
"cc_mask");
|
||||||
|
|
||||||
env_pc = tcg_global_mem_new(TCG_AREG0,
|
env_pc = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, pc),
|
offsetof(CPUCRISState, pc),
|
||||||
"pc");
|
"pc");
|
||||||
env_btarget = tcg_global_mem_new(TCG_AREG0,
|
env_btarget = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, btarget),
|
offsetof(CPUCRISState, btarget),
|
||||||
"btarget");
|
"btarget");
|
||||||
env_btaken = tcg_global_mem_new(TCG_AREG0,
|
env_btaken = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, btaken),
|
offsetof(CPUCRISState, btaken),
|
||||||
"btaken");
|
"btaken");
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
cpu_R[i] = tcg_global_mem_new(TCG_AREG0,
|
cpu_R[i] = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, regs[i]),
|
offsetof(CPUCRISState, regs[i]),
|
||||||
regnames[i]);
|
regnames[i]);
|
||||||
}
|
}
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
cpu_PR[i] = tcg_global_mem_new(TCG_AREG0,
|
cpu_PR[i] = tcg_global_mem_new(TCG_AREG0,
|
||||||
offsetof(CPUCRISState, pregs[i]),
|
offsetof(CPUCRISState, pregs[i]),
|
||||||
pregnames[i]);
|
pregnames[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_state_reset(CPUCRISState *env)
|
void cpu_state_reset(CPUCRISState *env)
|
||||||
|
|
Loading…
Reference in New Issue