[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 24/38] target/hppa: Implement LDWA
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 24/38] target/hppa: Implement LDWA |
Date: |
Thu, 28 Dec 2017 22:31:31 -0800 |
Signed-off-by: Richard Henderson <address@hidden>
---
target/hppa/translate.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 2c3c582913..ef953cd1d5 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -2945,12 +2945,50 @@ static DisasJumpType trans_stby(DisasContext *ctx,
uint32_t insn,
return nullify_end(ctx, DISAS_NEXT);
}
+#ifndef CONFIG_USER_ONLY
+static DisasJumpType trans_ldwa_idx_i(DisasContext *ctx, uint32_t insn,
+ const DisasInsn *di)
+{
+ int hold_mmu_idx = ctx->mmu_idx;
+ DisasJumpType ret;
+
+ CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR);
+
+ /* ??? needs fixing for hppa64 -- ldda does not follow the same
+ format wrt the sub-opcode in bits 6:9. */
+ ctx->mmu_idx = MMU_PHYS_IDX;
+ ret = trans_ld_idx_i(ctx, insn, di);
+ ctx->mmu_idx = hold_mmu_idx;
+ return ret;
+}
+
+static DisasJumpType trans_ldwa_idx_x(DisasContext *ctx, uint32_t insn,
+ const DisasInsn *di)
+{
+ int hold_mmu_idx = ctx->mmu_idx;
+ DisasJumpType ret;
+
+ CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR);
+
+ /* ??? needs fixing for hppa64 -- ldda does not follow the same
+ format wrt the sub-opcode in bits 6:9. */
+ ctx->mmu_idx = MMU_PHYS_IDX;
+ ret = trans_ld_idx_x(ctx, insn, di);
+ ctx->mmu_idx = hold_mmu_idx;
+ return ret;
+}
+#endif
+
static const DisasInsn table_index_mem[] = {
{ 0x0c001000u, 0xfc001300, trans_ld_idx_i }, /* LD[BHWD], im */
{ 0x0c000000u, 0xfc001300, trans_ld_idx_x }, /* LD[BHWD], rx */
{ 0x0c001200u, 0xfc001300, trans_st_idx_i }, /* ST[BHWD] */
{ 0x0c0001c0u, 0xfc0003c0, trans_ldcw },
{ 0x0c001300u, 0xfc0013c0, trans_stby },
+#ifndef CONFIG_USER_ONLY
+ { 0x0c001180u, 0xfc00d3c0, trans_ldwa_idx_i }, /* LDWA, im */
+ { 0x0c000180u, 0xfc00d3c0, trans_ldwa_idx_x }, /* LDWA, rx */
+#endif
};
static DisasJumpType trans_ldil(DisasContext *ctx, uint32_t insn)
--
2.14.3
- [Qemu-devel] [PATCH 07/38] target/hppa: Implement the system mask instructions, (continued)
- [Qemu-devel] [PATCH 07/38] target/hppa: Implement the system mask instructions, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 11/38] target/hppa: Implement rfi, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 12/38] target/hppa: Fill in hppa_cpu_do_interrupt/hppa_cpu_exec_interrupt, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 13/38] target/hppa: Implement unaligned access trap, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 15/38] target/hppa: Do not set cs_base to iaoq_b, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 18/38] target/hppa: Implement tlb_fill, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 05/38] target/hppa: Split address size from register size, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 16/38] target/hppa: Avoid privilege level decrease during branches, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 14/38] target/hppa: Use space registers in data operations, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 23/38] target/hppa: Implement P*TLB and P*TLBE insns, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 24/38] target/hppa: Implement LDWA,
Richard Henderson <=
- [Qemu-devel] [PATCH 17/38] target/hppa: Implement IASQ, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 19/38] target/hppa: Implement external interrupts, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 22/38] target/hppa: Implement I*TLBA and I*TLBP insns, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 20/38] target/hppa: Implement the interval timer, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 21/38] target/hppa: Log unimplemented instructions, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 25/38] target/hppa: Implement LPA, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 28/38] target/hppa: Implement a halt instruction, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 27/38] target/hppa: Implement SYNCDMA insn, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 26/38] target/hppa: Implement LCI, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 31/38] target/hppa: Add system registers to gdbstub, Richard Henderson, 2017/12/29