]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
m68k: link.l is only available with 68020+
authorLaurent Vivier <laurent@vivier.eu>
Sat, 27 Dec 2025 21:02:50 +0000 (22:02 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 12 Jan 2026 15:24:53 +0000 (16:24 +0100)
Base 68000 only supports word size.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: William Hooper <wsh@wshooper.org>
Message-ID: <20251227210250.411882-1-laurent@vivier.eu>

target/m68k/cpu.c
target/m68k/cpu.h
target/m68k/translate.c

index f1b673119d6b41d2cff3f3abfddced4a8aa905e8..b55e604b11d1651f00abdd2e7159de71060e0e07 100644 (file)
@@ -235,7 +235,7 @@ static void m68010_cpu_initfn(Object *obj)
 
 /*
  * Adds BFCHG, BFCLR, BFEXTS, BFEXTU, BFFFO, BFINS, BFSET, BFTST, CAS, CAS2,
- *      CHK2, CMP2, DIVSL, DIVUL, EXTB, PACK, TRAPcc, UNPK.
+ *      CHK2, CMP2, DIVSL, DIVUL, EXTB, LINKL, PACK, TRAPcc, UNPK.
  *
  * 68020/30 only:
  *      CALLM, cpBcc, cpDBcc, cpGEN, cpRESTORE, cpSAVE, cpScc, cpTRAPcc
@@ -260,6 +260,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_LINKL);
 }
 
 /*
index d9db6a486a802ab8c6e64751c5cfb05f6fd6ae26..7911ab9de30a73ec58c0f68a26fab2e4001edc78 100644 (file)
@@ -555,6 +555,8 @@ enum m68k_features {
     M68K_FEATURE_MOVEFROMSR_PRIV,
     /* Exception frame with format+vector (from 68010) */
     M68K_FEATURE_EXCEPTION_FORMAT_VEC,
+    /* LINK.L (680[2346]0, and CPU32) */
+    M68K_FEATURE_LINKL,
 };
 
 static inline bool m68k_feature(CPUM68KState *env, int feature)
index eb1ba150745e9db6e58e851343c13b91e691dcf8..78efa3e597c43fa076416da797483e16f9e7f15b 100644 (file)
@@ -5829,7 +5829,7 @@ void register_m68k_insns (CPUM68KState *env)
     BASE(move_to_sr, 46c0, ffc0);
 #endif
     INSN(nbcd,      4800, ffc0, M68K);
-    INSN(linkl,     4808, fff8, M68K);
+    INSN(linkl,     4808, fff8, LINKL);
     BASE(pea,       4840, ffc0);
     BASE(swap,      4840, fff8);
     INSN(bkpt,      4848, fff8, BKPT);