diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2020-06-30 19:27:02 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2020-08-21 12:48:15 -0700 |
commit | cfa9f0518144c0ea30f51fd2f203a09dd0a40cd9 (patch) | |
tree | 4a29bea5fe5092cae79d9d90027a4d3fed6c05f9 /target/xtensa/helper.h | |
parent | de6b55cbda2a26fb8889c8a8b44c139d7e106dce (diff) |
target/xtensa: add DFPU registers and opcodes
DFPU may be configured with 32-bit or with 64-bit registers. Xtensa ISA
does not specify how single-precision values are stored in 64-bit
registers. Existing implementations store them in the low half of the
registers.
Add value extraction and write back to single-precision opcodes.
Add new double precision opcodes. Add 64-bit register file.
Add 64-bit values dumping to the xtensa_cpu_dump_state.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/helper.h')
-rw-r--r-- | target/xtensa/helper.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/target/xtensa/helper.h b/target/xtensa/helper.h index 02c00d8461..095f754671 100644 --- a/target/xtensa/helper.h +++ b/target/xtensa/helper.h @@ -54,10 +54,11 @@ DEF_HELPER_3(fpu2k_sub_s, f32, env, f32, f32) DEF_HELPER_3(fpu2k_mul_s, f32, env, f32, f32) DEF_HELPER_4(fpu2k_madd_s, f32, env, f32, f32, f32) DEF_HELPER_4(fpu2k_msub_s, f32, env, f32, f32, f32) -DEF_HELPER_FLAGS_3(ftoi_s, TCG_CALL_NO_RWG_SE, i32, f32, i32, i32) -DEF_HELPER_FLAGS_3(ftoui_s, TCG_CALL_NO_RWG_SE, i32, f32, i32, i32) +DEF_HELPER_4(ftoi_s, i32, env, f32, i32, i32) +DEF_HELPER_4(ftoui_s, i32, env, f32, i32, i32) DEF_HELPER_3(itof_s, f32, env, i32, i32) DEF_HELPER_3(uitof_s, f32, env, i32, i32) +DEF_HELPER_2(cvtd_s, f64, env, f32) DEF_HELPER_3(un_s, i32, env, f32, f32) DEF_HELPER_3(oeq_s, i32, env, f32, f32) @@ -67,5 +68,34 @@ DEF_HELPER_3(ult_s, i32, env, f32, f32) DEF_HELPER_3(ole_s, i32, env, f32, f32) DEF_HELPER_3(ule_s, i32, env, f32, f32) +DEF_HELPER_2(wur_fpu_fcr, void, env, i32) +DEF_HELPER_1(rur_fpu_fsr, i32, env) +DEF_HELPER_2(wur_fpu_fsr, void, env, i32) +DEF_HELPER_FLAGS_1(abs_d, TCG_CALL_NO_RWG_SE, f64, f64) +DEF_HELPER_FLAGS_1(neg_d, TCG_CALL_NO_RWG_SE, f64, f64) +DEF_HELPER_3(add_d, f64, env, f64, f64) +DEF_HELPER_3(add_s, f32, env, f32, f32) +DEF_HELPER_3(sub_d, f64, env, f64, f64) +DEF_HELPER_3(sub_s, f32, env, f32, f32) +DEF_HELPER_3(mul_d, f64, env, f64, f64) +DEF_HELPER_3(mul_s, f32, env, f32, f32) +DEF_HELPER_4(madd_d, f64, env, f64, f64, f64) +DEF_HELPER_4(madd_s, f32, env, f32, f32, f32) +DEF_HELPER_4(msub_d, f64, env, f64, f64, f64) +DEF_HELPER_4(msub_s, f32, env, f32, f32, f32) +DEF_HELPER_4(ftoi_d, i32, env, f64, i32, i32) +DEF_HELPER_4(ftoui_d, i32, env, f64, i32, i32) +DEF_HELPER_3(itof_d, f64, env, i32, i32) +DEF_HELPER_3(uitof_d, f64, env, i32, i32) +DEF_HELPER_2(cvts_d, f32, env, f64) + +DEF_HELPER_3(un_d, i32, env, f64, f64) +DEF_HELPER_3(oeq_d, i32, env, f64, f64) +DEF_HELPER_3(ueq_d, i32, env, f64, f64) +DEF_HELPER_3(olt_d, i32, env, f64, f64) +DEF_HELPER_3(ult_d, i32, env, f64, f64) +DEF_HELPER_3(ole_d, i32, env, f64, f64) +DEF_HELPER_3(ule_d, i32, env, f64, f64) + DEF_HELPER_2(rer, i32, env, i32) DEF_HELPER_3(wer, void, env, i32, i32) |