Richard Henderson <richard.hender...@linaro.org> writes: > On 02/08/2018 09:31 AM, Alex Bennée wrote: >> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> >> --- >> target/arm/helper-a64.c | 49 >> ++++++++++++++++++++++++++++++++++++++++++++++ >> target/arm/helper-a64.h | 5 +++++ >> target/arm/translate-a64.c | 15 ++++++++++++++ >> 3 files changed, 69 insertions(+) >> >> diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c >> index 25e45121af..78eeda31d1 100644 >> --- a/target/arm/helper-a64.c >> +++ b/target/arm/helper-a64.c >> @@ -599,3 +599,52 @@ ADVSIMD_HALFOP(min) >> ADVSIMD_HALFOP(max) >> ADVSIMD_HALFOP(minnum) >> ADVSIMD_HALFOP(maxnum) >> + >> +/* >> + * Floating point comparisons produce an integer result. Softfloat >> + * routines return float_relation types which we convert to the 0/-1 >> + * Neon requires. >> + */ >> + >> +#define ADVSIMD_CMPRES(test) (test) ? 0xffff : 0 >> + >> +uint32_t HELPER(advsimd_ceq_f16)(float16 a, float16 b, void *fpstp) >> +{ >> + float_status *fpst = fpstp; >> + int compare = float16_compare_quiet(a, b, fpst); >> + return ADVSIMD_CMPRES(compare == float_relation_equal); > > Not using float16_eq etc?
These don't actually exist. But I guess we could make stubs for them based on the generic float_compare support. But would it buy us much? > >> +} >> + >> +uint32_t HELPER(advsimd_cge_f16)(float16 a, float16 b, void *fpstp) >> +{ >> + float_status *fpst = fpstp; >> + int compare = float16_compare(a, b, fpst); >> + return ADVSIMD_CMPRES(compare == float_relation_greater || >> + compare == float_relation_equal); > > Especially float16_le(b, a, fpst). > > Otherwise, > > Reviewed-by: Richard Henderson <richard.hender...@linaro.org> > > > r~ -- Alex Bennée