translate.c (a0ea4becca28c1c14de5c3b8bff8343ab184070c) | translate.c (3c13b0ffe76057e93e007bedbad3cc556146e3ed) |
---|---|
1/* 2 * HPPA emulation cpu translation for qemu. 3 * 4 * Copyright (c) 2016 Richard Henderson <rth@twiddle.net> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 2040 unchanged lines hidden (view full) --- 2049 break; 2050 2051 case 0xe0: /* SET_THREAD_POINTER */ 2052 { 2053 DisasIAQE next = { .base = tcg_temp_new_i64() }; 2054 2055 tcg_gen_st_i64(cpu_gr[26], tcg_env, 2056 offsetof(CPUHPPAState, cr[27])); | 1/* 2 * HPPA emulation cpu translation for qemu. 3 * 4 * Copyright (c) 2016 Richard Henderson <rth@twiddle.net> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 2040 unchanged lines hidden (view full) --- 2049 break; 2050 2051 case 0xe0: /* SET_THREAD_POINTER */ 2052 { 2053 DisasIAQE next = { .base = tcg_temp_new_i64() }; 2054 2055 tcg_gen_st_i64(cpu_gr[26], tcg_env, 2056 offsetof(CPUHPPAState, cr[27])); |
2057 tcg_gen_ori_i64(next.base, cpu_gr[31], 3); | 2057 tcg_gen_ori_i64(next.base, cpu_gr[31], PRIV_USER); |
2058 install_iaq_entries(ctx, &next, NULL); 2059 ctx->base.is_jmp = DISAS_IAQ_N_UPDATED; 2060 } 2061 break; 2062 2063 case 0x100: /* SYSCALL */ 2064 gen_excp_1(EXCP_SYSCALL); 2065 ctx->base.is_jmp = DISAS_NORETURN; --- 2512 unchanged lines hidden (view full) --- 4578 DisasContext *ctx = container_of(dcbase, DisasContext, base); 4579 int bound; 4580 4581 ctx->cs = cs; 4582 ctx->tb_flags = ctx->base.tb->flags; 4583 ctx->is_pa20 = hppa_is_pa20(cpu_env(cs)); 4584 4585#ifdef CONFIG_USER_ONLY | 2058 install_iaq_entries(ctx, &next, NULL); 2059 ctx->base.is_jmp = DISAS_IAQ_N_UPDATED; 2060 } 2061 break; 2062 2063 case 0x100: /* SYSCALL */ 2064 gen_excp_1(EXCP_SYSCALL); 2065 ctx->base.is_jmp = DISAS_NORETURN; --- 2512 unchanged lines hidden (view full) --- 4578 DisasContext *ctx = container_of(dcbase, DisasContext, base); 4579 int bound; 4580 4581 ctx->cs = cs; 4582 ctx->tb_flags = ctx->base.tb->flags; 4583 ctx->is_pa20 = hppa_is_pa20(cpu_env(cs)); 4584 4585#ifdef CONFIG_USER_ONLY |
4586 ctx->privilege = MMU_IDX_TO_PRIV(MMU_USER_IDX); | 4586 ctx->privilege = PRIV_USER; |
4587 ctx->mmu_idx = MMU_USER_IDX; 4588 ctx->iaoq_first = ctx->base.pc_first | ctx->privilege; 4589 ctx->iaq_b.disp = ctx->base.tb->cs_base - ctx->base.pc_first; 4590 ctx->unalign = (ctx->tb_flags & TB_FLAG_UNALIGN ? MO_UNALN : MO_ALIGN); 4591#else 4592 ctx->privilege = (ctx->tb_flags >> TB_FLAG_PRIV_SHIFT) & 3; 4593 ctx->mmu_idx = (ctx->tb_flags & PSW_D 4594 ? PRIV_P_TO_MMU_IDX(ctx->privilege, ctx->tb_flags & PSW_P) --- 224 unchanged lines hidden --- | 4587 ctx->mmu_idx = MMU_USER_IDX; 4588 ctx->iaoq_first = ctx->base.pc_first | ctx->privilege; 4589 ctx->iaq_b.disp = ctx->base.tb->cs_base - ctx->base.pc_first; 4590 ctx->unalign = (ctx->tb_flags & TB_FLAG_UNALIGN ? MO_UNALN : MO_ALIGN); 4591#else 4592 ctx->privilege = (ctx->tb_flags >> TB_FLAG_PRIV_SHIFT) & 3; 4593 ctx->mmu_idx = (ctx->tb_flags & PSW_D 4594 ? PRIV_P_TO_MMU_IDX(ctx->privilege, ctx->tb_flags & PSW_P) --- 224 unchanged lines hidden --- |