Fix glibc 2.27 for hppa-linux-user
-----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJauSRTAAoJEGTfOOivfiFfr9gH/2r7EveGRMXHEZbg6zt+kTQm U0XlQ5zIiLMXQOcBhFWOug0cEz+5oLBuinUnMsHqyaNtgR+A1B5sYSDdpDLdLePq T8e3q4R5/h5hjmBRZptvuW6M1FDY9k2CMot5pnwOP9NT/nBJCvf3Qd/dDHorw/+L fWaOOGZHfWRPyggBBJxQzs2Hi9areuIIM5Pk0c2MdgYh2Mf+kWWIAyn3FLYWoIiQ ergm2017da0iD9Jwht1ETy9Pn2V1lZNZgs7phUWI1c7+6rTLhin6RFAjPoOwqGRx 4hk3m3kVkIO7o+lXeiRAPD72ZsnuNsRlkS/fAqtBDgp9mcKN9z30WBsXpSTYPzE= =zaPZ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180327' into staging Fix glibc 2.27 for hppa-linux-user # gpg: Signature made Mon 26 Mar 2018 17:48:19 BST # gpg: using RSA key 64DF38E8AF7E215F # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-hppa-20180327: target/hppa: Include priv level in user-only iaoq Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
78a0f82bf7
@ -305,8 +305,8 @@ static inline void cpu_get_tb_cpu_state(CPUHPPAState *env, target_ulong *pc,
|
||||
incomplete virtual address. This also means that we must separate
|
||||
out current cpu priviledge from the low bits of IAOQ_F. */
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
*pc = env->iaoq_f;
|
||||
*cs_base = env->iaoq_b;
|
||||
*pc = env->iaoq_f & -4;
|
||||
*cs_base = env->iaoq_b & -4;
|
||||
#else
|
||||
/* ??? E, T, H, L, B, P bits need to be here, when implemented. */
|
||||
flags |= env->psw & (PSW_W | PSW_C | PSW_D);
|
||||
|
@ -1909,9 +1909,6 @@ static DisasJumpType do_ibranch(DisasContext *ctx, TCGv_reg dest,
|
||||
*/
|
||||
static TCGv_reg do_ibranch_priv(DisasContext *ctx, TCGv_reg offset)
|
||||
{
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
return offset;
|
||||
#else
|
||||
TCGv_reg dest;
|
||||
switch (ctx->privilege) {
|
||||
case 0:
|
||||
@ -1931,7 +1928,6 @@ static TCGv_reg do_ibranch_priv(DisasContext *ctx, TCGv_reg offset)
|
||||
break;
|
||||
}
|
||||
return dest;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
@ -1967,7 +1963,7 @@ static DisasJumpType do_page_zero(DisasContext *ctx)
|
||||
goto do_sigill;
|
||||
}
|
||||
|
||||
switch (ctx->iaoq_f) {
|
||||
switch (ctx->iaoq_f & -4) {
|
||||
case 0x00: /* Null pointer call */
|
||||
gen_excp_1(EXCP_IMP);
|
||||
return DISAS_NORETURN;
|
||||
@ -1978,7 +1974,7 @@ static DisasJumpType do_page_zero(DisasContext *ctx)
|
||||
|
||||
case 0xe0: /* SET_THREAD_POINTER */
|
||||
tcg_gen_st_reg(cpu_gr[26], cpu_env, offsetof(CPUHPPAState, cr[27]));
|
||||
tcg_gen_mov_reg(cpu_iaoq_f, cpu_gr[31]);
|
||||
tcg_gen_ori_reg(cpu_iaoq_f, cpu_gr[31], 3);
|
||||
tcg_gen_addi_reg(cpu_iaoq_b, cpu_iaoq_f, 4);
|
||||
return DISAS_IAQ_N_UPDATED;
|
||||
|
||||
@ -4697,8 +4693,8 @@ static int hppa_tr_init_disas_context(DisasContextBase *dcbase,
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
ctx->privilege = MMU_USER_IDX;
|
||||
ctx->mmu_idx = MMU_USER_IDX;
|
||||
ctx->iaoq_f = ctx->base.pc_first;
|
||||
ctx->iaoq_b = ctx->base.tb->cs_base;
|
||||
ctx->iaoq_f = ctx->base.pc_first | MMU_USER_IDX;
|
||||
ctx->iaoq_b = ctx->base.tb->cs_base | MMU_USER_IDX;
|
||||
#else
|
||||
ctx->privilege = (ctx->tb_flags >> TB_FLAG_PRIV_SHIFT) & 3;
|
||||
ctx->mmu_idx = (ctx->tb_flags & PSW_D ? ctx->privilege : MMU_PHYS_IDX);
|
||||
|
Loading…
Reference in New Issue
Block a user