From: Laurent Vivier Date: Sat, 27 Dec 2025 21:02:50 +0000 (+0100) Subject: m68k: link.l is only available with 68020+ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8f7fdd1228269387d1821df2b43ce5df0412423;p=thirdparty%2Fqemu.git m68k: link.l is only available with 68020+ Base 68000 only supports word size. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: William Hooper Message-ID: <20251227210250.411882-1-laurent@vivier.eu> --- diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index f1b673119d..b55e604b11 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -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); } /* diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index d9db6a486a..7911ab9de3 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -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) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index eb1ba15074..78efa3e597 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -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);