[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/38] target/hppa: Implement unaligned access trap
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 13/38] target/hppa: Implement unaligned access trap |
Date: |
Thu, 28 Dec 2017 22:31:20 -0800 |
Signed-off-by: Richard Henderson <address@hidden>
---
target/hppa/cpu.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index ca619578dd..6b2d22118d 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -48,6 +48,21 @@ static void hppa_cpu_disas_set_info(CPUState *cs,
disassemble_info *info)
info->print_insn = print_insn_hppa;
}
+static void hppa_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
+ MMUAccessType access_type,
+ int mmu_idx, uintptr_t retaddr)
+{
+ HPPACPU *cpu = HPPA_CPU(cs);
+ CPUHPPAState *env = &cpu->env;
+
+ cs->exception_index = EXCP_UNALIGN;
+ /* ??? Needs tweaking for hppa64. */
+ env->cr[CR_IOR] = addr;
+ env->cr[CR_ISR] = addr >> 32;
+
+ cpu_loop_exit_restore(cs, retaddr);
+}
+
static void hppa_cpu_realizefn(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
@@ -139,7 +154,7 @@ static void hppa_cpu_class_init(ObjectClass *oc, void *data)
#else
cc->get_phys_page_debug = hppa_cpu_get_phys_page_debug;
#endif
-
+ cc->do_unaligned_access = hppa_cpu_do_unaligned_access;
cc->disas_set_info = hppa_cpu_disas_set_info;
cc->tcg_initialize = hppa_translate_init;
--
2.14.3
- [Qemu-devel] [PATCH 02/38] target/hppa: Define the rest of the PSW, (continued)
- [Qemu-devel] [PATCH 02/38] target/hppa: Define the rest of the PSW, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 03/38] target/hppa: Disable gateway page emulation for system mode, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 04/38] target/hppa: Define hardware exception types, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 08/38] target/hppa: Add space registers, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 06/38] target/hppa: Implement mmu_idx from IA privilege level, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 10/38] target/hppa: Adjust insn mask for mfctl, w, Richard Henderson, 2017/12/29
- [Qemu-devel] [PATCH 09/38] target/hppa: Add control registers, Richard Henderson, 2017/12/29
- [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 <=
- [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, 2017/12/29
- [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