From bdcfcd445dd4f07e4df5345f1cdd0da5a5e6ba5f Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 18 Feb 2019 13:27:08 +0100 Subject: s390x/tcg: Implement rounding mode and XxC for LOAD ROUNDED With the floating-point extension facility, LOAD ROUNDED has a rounding mode specification and the inexact-exception control (XxC). Handle them just like e.g. LOAD FP INTEGER. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand Message-Id: <20190218122710.23639-14-david@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/translate.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'target/s390x/translate.c') diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 7dc485e989..41fb466bb4 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -2805,19 +2805,37 @@ static DisasJumpType op_ldeb(DisasContext *s, DisasOps *o) static DisasJumpType op_ledb(DisasContext *s, DisasOps *o) { - gen_helper_ledb(o->out, cpu_env, o->in2); + TCGv_i32 m34 = fpinst_extract_m34(s, true, true); + + if (!m34) { + return DISAS_NORETURN; + } + gen_helper_ledb(o->out, cpu_env, o->in2, m34); + tcg_temp_free_i32(m34); return DISAS_NEXT; } static DisasJumpType op_ldxb(DisasContext *s, DisasOps *o) { - gen_helper_ldxb(o->out, cpu_env, o->in1, o->in2); + TCGv_i32 m34 = fpinst_extract_m34(s, true, true); + + if (!m34) { + return DISAS_NORETURN; + } + gen_helper_ldxb(o->out, cpu_env, o->in1, o->in2, m34); + tcg_temp_free_i32(m34); return DISAS_NEXT; } static DisasJumpType op_lexb(DisasContext *s, DisasOps *o) { - gen_helper_lexb(o->out, cpu_env, o->in1, o->in2); + TCGv_i32 m34 = fpinst_extract_m34(s, true, true); + + if (!m34) { + return DISAS_NORETURN; + } + gen_helper_lexb(o->out, cpu_env, o->in1, o->in2, m34); + tcg_temp_free_i32(m34); return DISAS_NEXT; } -- cgit v1.2.3