diff mbox series

[1/4] target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL

Message ID 20240811060313.730410-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. 11, 2024, 6:03 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(+)
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);
 }