diff mbox series

[v2,1/4] target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL

Message ID 20240812004451.13711-2-richard.henderson@linaro.org (mailing list archive)
State New, archived
Headers show
Series target/m68k: Implement fmove.p | expand

Commit Message

Richard Henderson Aug. 12, 2024, 12:44 a.m. UTC
Set for 68020 and 68030, but does nothing so far.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/m68k/cpu.h | 2 ++
 target/m68k/cpu.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Philippe Mathieu-Daudé Aug. 12, 2024, 5:55 a.m. UTC | #1
On 12/8/24 02:44, Richard Henderson wrote:
> Set for 68020 and 68030, but does nothing so far.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/m68k/cpu.h | 2 ++
>   target/m68k/cpu.c | 2 ++
>   2 files changed, 4 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index b5bbeedb7a..7114324e4d 100644
--- a/target/m68k/cpu.h
+++ b/target/m68k/cpu.h
@@ -553,6 +553,8 @@  enum m68k_features {
     M68K_FEATURE_MOVEFROMSR_PRIV,
     /* Exception frame with format+vector (from 68010) */
     M68K_FEATURE_EXCEPTION_FORMAT_VEC,
+    /* FPU supports packed decimal real format */
+    M68K_FEATURE_FPU_PACKED_DECIMAL,
 };
 
 static inline bool m68k_feature(CPUM68KState *env, int feature)
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 1d49f4cb23..65058dd052 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -182,6 +182,7 @@  static void m68020_cpu_initfn(Object *obj)
     m68k_set_feature(env, M68K_FEATURE_MSP);
     m68k_set_feature(env, M68K_FEATURE_UNALIGNED_DATA);
     m68k_set_feature(env, M68K_FEATURE_TRAPCC);
+    m68k_set_feature(env, M68K_FEATURE_FPU_PACKED_DECIMAL);
 }
 
 /*
@@ -224,6 +225,7 @@  static void m68040_cpu_initfn(Object *obj)
 
     m68030_cpu_initfn(obj);
     m68k_unset_feature(env, M68K_FEATURE_M68030);
+    m68k_unset_feature(env, M68K_FEATURE_FPU_PACKED_DECIMAL);
     m68k_set_feature(env, M68K_FEATURE_M68040);
 }