[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] m68k: implement movep instruction
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH v2] m68k: implement movep instruction |
Date: |
Tue, 6 Feb 2018 12:22:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
Le 06/02/2018 à 12:19, Pavel Dovgalyuk a écrit :
> This patch implements movep instruction. It moves data between a data register
> and alternate bytes within the address space starting at the location
> specified and incrementing by two.
>
> It was designed for the original 68000 and used in firmwares for
> interfacing the 8-bit peripherals through the 16-bit data bus.
> Without this patch opcode for this instruction is recognized as some bitop.
>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> Signed-off-by: Mihail Abakumov <address@hidden>
>
> --
>
> v2: - disabled movep for Coldfire
> - fixed gen_store/load usage
> ---
> target/m68k/cpu.c | 3 +++
> target/m68k/cpu.h | 1 +
> target/m68k/translate.c | 53
> +++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 57 insertions(+)
>
> diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
> index 98919b3..2b38b9b 100644
> --- a/target/m68k/cpu.c
> +++ b/target/m68k/cpu.c
> @@ -113,6 +113,7 @@ static void m68000_cpu_initfn(Object *obj)
> m68k_set_feature(env, M68K_FEATURE_M68000);
> m68k_set_feature(env, M68K_FEATURE_USP);
> m68k_set_feature(env, M68K_FEATURE_WORD_INDEX);
> + m68k_set_feature(env, M68K_FEATURE_MOVEP);
> }
>
> static void m68020_cpu_initfn(Object *obj)
> @@ -135,6 +136,7 @@ static void m68020_cpu_initfn(Object *obj)
> m68k_set_feature(env, M68K_FEATURE_BKPT);
> m68k_set_feature(env, M68K_FEATURE_RTD);
> m68k_set_feature(env, M68K_FEATURE_CHK2);
> + m68k_set_feature(env, M68K_FEATURE_MOVEP);
> }
> #define m68030_cpu_initfn m68020_cpu_initfn
>
> @@ -145,6 +147,7 @@ static void m68040_cpu_initfn(Object *obj)
>
> m68020_cpu_initfn(obj);
> m68k_set_feature(env, M68K_FEATURE_M68040);
> + m68k_set_feature(env, M68K_FEATURE_MOVEP);
You don't need to add it here as it comes with m68020_cpu_initfn().
Thanks,
Laurent