mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 06:25:12 +00:00
target/arm: Implement FMOV (immediate) for fp16
All the hard work is already done by vfp_expand_imm, we just need to make sure we pick up the correct size. Backports commit 6ba28ddb9be37bdb67e3e38007a53ccbdcd010df from qemu
This commit is contained in:
parent
cd76e7aaaa
commit
f8e1f71df9
|
@ -5779,11 +5779,25 @@ static void disas_fp_imm(DisasContext *s, uint32_t insn)
|
|||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
int rd = extract32(insn, 0, 5);
|
||||
int imm8 = extract32(insn, 13, 8);
|
||||
int is_double = extract32(insn, 22, 2);
|
||||
int type = extract32(insn, 22, 2);
|
||||
uint64_t imm;
|
||||
TCGv_i64 tcg_res;
|
||||
TCGMemOp sz;
|
||||
|
||||
if (is_double > 1) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
sz = MO_32;
|
||||
break;
|
||||
case 1:
|
||||
sz = MO_64;
|
||||
break;
|
||||
case 3:
|
||||
sz = MO_16;
|
||||
if (arm_dc_feature(s, ARM_FEATURE_V8_FP16)) {
|
||||
break;
|
||||
}
|
||||
/* fallthru */
|
||||
default:
|
||||
unallocated_encoding(s);
|
||||
return;
|
||||
}
|
||||
|
@ -5792,7 +5806,7 @@ static void disas_fp_imm(DisasContext *s, uint32_t insn)
|
|||
return;
|
||||
}
|
||||
|
||||
imm = vfp_expand_imm(MO_32 + is_double, imm8);
|
||||
imm = vfp_expand_imm(sz, imm8);
|
||||
|
||||
tcg_res = tcg_const_i64(tcg_ctx, imm);
|
||||
write_fp_dreg(s, rd, tcg_res);
|
||||
|
|
Loading…
Reference in a new issue