Skip to contentSkip to conversation

arm/translate-a64: add FP16 FCMP operations

PATCH In review Alex Bennée 2 participants 2 messages Apr 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/translate-a64: add FP16 FCMP operations

These where missed out from the rest of the half-precision work.

---
 target/arm/helper-a64.c    | 10 +++++++
 target/arm/helper-a64.h    |  2 ++
 target/arm/translate-a64.c | 60 ++++++++++++++++++++++++++++++++------
 3 files changed, 63 insertions(+), 9 deletions(-)
target/arm/helper-a64.c +10 -0
index afb25ad20c..35df07adb9 100644
@@ -85,6 +85,16 @@ static inline uint32_t float_rel_to_flags(int res)
     return flags;
 }
 
+uint64_t HELPER(vfp_cmph_a64)(float16 x, float16 y, void *fp_status)
+{
+    return float_rel_to_flags(float16_compare_quiet(x, y, fp_status));
+}
+
+uint64_t HELPER(vfp_cmpeh_a64)(float16 x, float16 y, void *fp_status)
+{
+    return float_rel_to_flags(float16_compare(x, y, fp_status));
+}
+
 uint64_t HELPER(vfp_cmps_a64)(float32 x, float32 y, void *fp_status)
 {
     return float_rel_to_flags(float32_compare_quiet(x, y, fp_status));
target/arm/helper-a64.h +2 -0
index ef4ddfe9d8..5c0b9bd799 100644
@@ -19,6 +19,8 @@
 DEF_HELPER_FLAGS_2(udiv64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
 DEF_HELPER_FLAGS_2(sdiv64, TCG_CALL_NO_RWG_SE, s64, s64, s64)
 DEF_HELPER_FLAGS_1(rbit64, TCG_CALL_NO_RWG_SE, i64, i64)
+DEF_HELPER_3(vfp_cmph_a64, i64, f16, f16, ptr)
+DEF_HELPER_3(vfp_cmpeh_a64, i64, f16, f16, ptr)
 DEF_HELPER_3(vfp_cmps_a64, i64, f32, f32, ptr)
 DEF_HELPER_3(vfp_cmpes_a64, i64, f32, f32, ptr)
 DEF_HELPER_3(vfp_cmpd_a64, i64, f64, f64, ptr)
target/arm/translate-a64.c +51 -9

110 lines not on this page · raw message

Signature · 1 line
2.17.0
#1 lore raw
Quoted 2 lines · Alex Bennée

These where missed out from the rest of the half-precision work.

s/where missed out from/were missed during/

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org