Commit c5883be2 authored by Paul Brook's avatar Paul Brook
Browse files

ARM CP15 tls fix



Fix temporary handling in cp15 tls register load/store.
Signed-off-by: default avatarPaul Brook <paul@codesourcery.com>
parent 724c6893
......@@ -2469,19 +2469,17 @@ static int cp15_tls_load_store(CPUState *env, DisasContext *s, uint32_t insn, ui
return 0;
if (insn & ARM_CP_RW_BIT) {
tmp = new_tmp();
switch (op) {
case 2:
tcg_gen_ld_i32(tmp, cpu_env, offsetof(CPUARMState, cp15.c13_tls1));
tmp = load_cpu_field(cp15.c13_tls1);
break;
case 3:
tcg_gen_ld_i32(tmp, cpu_env, offsetof(CPUARMState, cp15.c13_tls2));
tmp = load_cpu_field(cp15.c13_tls2);
break;
case 4:
tcg_gen_ld_i32(tmp, cpu_env, offsetof(CPUARMState, cp15.c13_tls3));
tmp = load_cpu_field(cp15.c13_tls3);
break;
default:
dead_tmp(tmp);
return 0;
}
store_reg(s, rd, tmp);
......@@ -2490,18 +2488,18 @@ static int cp15_tls_load_store(CPUState *env, DisasContext *s, uint32_t insn, ui
tmp = load_reg(s, rd);
switch (op) {
case 2:
tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUARMState, cp15.c13_tls1));
store_cpu_field(tmp, cp15.c13_tls1);
break;
case 3:
tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUARMState, cp15.c13_tls2));
store_cpu_field(tmp, cp15.c13_tls2);
break;
case 4:
tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUARMState, cp15.c13_tls3));
store_cpu_field(tmp, cp15.c13_tls3);
break;
default:
dead_tmp(tmp);
return 0;
}
dead_tmp(tmp);
}
return 1;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment