-----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJahBFOAAoJEPMMOL0/L748gSkP+QF9YJ3jYPClL2W33jovoMrd yg4sKGNa+XxOxniBJC6xxBx4HmlqevmqpUcQiN6u3vGt2D7vsj86z0uFqvCrUhqg pf5Xk0JjUbPP0bWXmkSiOM4yLQQRP18n8h7049pcTXV+h4Mtqy4itUZqBcIXb1vg 1mLR2Np44QAHmUrBqd/FGSD/mVDj3+S26MPtVaMLL3hDxjd4rFMnC2Ee3O6qENNF Df3BfpsSr3OtNv1z8xd8owbDGawoZ8Xb+9hCTMekcUF5y0ehErUbx9Bd71SAw49o dk312TAXMv65fwwYdkXOyJpQjWX/fKlo7Svod40F5fd14n/en/uxEXgJaTM86MzO v64794fRCk1cQRsKHMyAYTErQgNJmaVbSgyEst/P8YG5nNhlajKDXPcPKLa/B2ni T54d3wVb/Dri0LN35HfCu3UxwrnLuhWFjjuN00e5oQq7qIEGLzTiUD8MtGUCJGnh YuKs2BYbaiOh1rpnNAAoZoBcJCnKBj4MqPWFODo9zARBHebTFCOQy+2bVWLILpRl aWdZDIUZ1DqceQcVO6yezwFoLNVbhGVsrXP8DNwI9ZTj6M/hTP6KW1DHNwwihTMG 0b56aeeip/OzNjLyktXaGdMPYmjy8gIp1EOrd/Yk/hZV4A6SsT5djPtzh1RJCxVY wafEs6EGpMVZkJ4VBd9+ =6l3k -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging # gpg: Signature made Wed 14 Feb 2018 10:37:02 GMT # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier/tags/m68k-for-2.12-pull-request: m68k: implement movep instruction Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
9f9c53368b
@ -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
|
||||
|
||||
|
@ -492,6 +492,7 @@ enum m68k_features {
|
||||
M68K_FEATURE_RTD,
|
||||
M68K_FEATURE_CHK2,
|
||||
M68K_FEATURE_M68040, /* instructions specific to MC68040 */
|
||||
M68K_FEATURE_MOVEP,
|
||||
};
|
||||
|
||||
static inline int m68k_feature(CPUM68KState *env, int feature)
|
||||
|
@ -2078,6 +2078,51 @@ DISAS_INSN(movem)
|
||||
tcg_temp_free(addr);
|
||||
}
|
||||
|
||||
DISAS_INSN(movep)
|
||||
{
|
||||
uint8_t i;
|
||||
int16_t displ;
|
||||
TCGv reg;
|
||||
TCGv addr;
|
||||
TCGv abuf;
|
||||
TCGv dbuf;
|
||||
|
||||
displ = read_im16(env, s);
|
||||
|
||||
addr = AREG(insn, 0);
|
||||
reg = DREG(insn, 9);
|
||||
|
||||
abuf = tcg_temp_new();
|
||||
tcg_gen_addi_i32(abuf, addr, displ);
|
||||
dbuf = tcg_temp_new();
|
||||
|
||||
if (insn & 0x40) {
|
||||
i = 4;
|
||||
} else {
|
||||
i = 2;
|
||||
}
|
||||
|
||||
if (insn & 0x80) {
|
||||
for ( ; i > 0 ; i--) {
|
||||
tcg_gen_shri_i32(dbuf, reg, (i - 1) * 8);
|
||||
tcg_gen_qemu_st8(dbuf, abuf, IS_USER(s));
|
||||
if (i > 1) {
|
||||
tcg_gen_addi_i32(abuf, abuf, 2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for ( ; i > 0 ; i--) {
|
||||
tcg_gen_qemu_ld8u(dbuf, abuf, IS_USER(s));
|
||||
tcg_gen_deposit_i32(reg, reg, dbuf, (i - 1) * 8, 8);
|
||||
if (i > 1) {
|
||||
tcg_gen_addi_i32(abuf, abuf, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
tcg_temp_free(abuf);
|
||||
tcg_temp_free(dbuf);
|
||||
}
|
||||
|
||||
DISAS_INSN(bitop_im)
|
||||
{
|
||||
int opsize;
|
||||
@ -5678,6 +5723,7 @@ void register_m68k_insns (CPUM68KState *env)
|
||||
BASE(bitop_reg, 0140, f1c0);
|
||||
BASE(bitop_reg, 0180, f1c0);
|
||||
BASE(bitop_reg, 01c0, f1c0);
|
||||
INSN(movep, 0108, f138, MOVEP);
|
||||
INSN(arith_im, 0280, fff8, CF_ISA_A);
|
||||
INSN(arith_im, 0200, ff00, M68000);
|
||||
INSN(undef, 02c0, ffc0, M68000);
|
||||
|
Loading…
Reference in New Issue
Block a user