diff options
author | Laurent Vivier <laurent@vivier.eu> | 2017-06-28 22:42:36 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2017-06-29 20:26:01 +0200 |
commit | 9d403660d91229922c2786e81c23cc9dd8e644f1 (patch) | |
tree | 3f990f3d848ae00f9269e9c011dd18b1fc083647 /target/m68k/translate.c | |
parent | dd337bf86214e2436833d9442c995df95b136190 (diff) |
target/m68k: add fmovecr
fmovecr moves a floating point constant from the
FPU ROM to a floating point register.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170628204241.32106-3-laurent@vivier.eu>
Diffstat (limited to 'target/m68k/translate.c')
-rw-r--r-- | target/m68k/translate.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 5f4bedc037..5b93d3ff60 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -4518,10 +4518,21 @@ DISAS_INSN(fpu) ext = read_im16(env, s); opmode = ext & 0x7f; switch ((ext >> 13) & 7) { - case 0: case 2: + case 0: break; case 1: goto undef; + case 2: + if (insn == 0xf200 && (ext & 0xfc00) == 0x5c00) { + /* fmovecr */ + TCGv rom_offset = tcg_const_i32(opmode); + cpu_dest = gen_fp_ptr(REG(ext, 7)); + gen_helper_fconst(cpu_env, cpu_dest, rom_offset); + tcg_temp_free_ptr(cpu_dest); + tcg_temp_free(rom_offset); + return; + } + break; case 3: /* fmove out */ cpu_src = gen_fp_ptr(REG(ext, 7)); opsize = ext_opsize(ext, 10); |