]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: decimal-floating-point facility related cleanups (BZ 509562)
authorFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 16:40:23 +0000 (16:40 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 16:40:23 +0000 (16:40 +0000)
The decimal-floating-point facility is always present on the supported
machines.
- Remove VEX_HWCAPS_S390X_DFP and s390_host_has_dfp
- Remove EmFail_S390X_DFP_insn
- Update tests/s390x_features.c

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562

18 files changed:
VEX/priv/guest_s390_toIR.c
VEX/priv/host_s390_defs.c
VEX/priv/host_s390_defs.h
VEX/priv/main_main.c
VEX/pub/libvex.h
VEX/pub/libvex_emnote.h
coregrind/m_machine.c
none/tests/s390x/dfp-1.vgtest
none/tests/s390x/dfp-2.vgtest
none/tests/s390x/dfp-3.vgtest
none/tests/s390x/dfp-4.vgtest
none/tests/s390x/dfp-XiC.vgtest
none/tests/s390x/dfp-XxC.vgtest
none/tests/s390x/dfpconv.vgtest
none/tests/s390x/dfpext.vgtest
none/tests/s390x/dfptest.vgtest
none/tests/s390x/srnmt.vgtest
tests/s390x_features.c

index 42bf5ad816fc58f5a5f987cdc1ddd2b81c71c375..463f389dfecd89baaf16f5e7b910a3329eeb009c 100644 (file)
@@ -12014,49 +12014,41 @@ s390_irgen_SDB(UChar r1, IRTemp op2addr)
 static const HChar *
 s390_irgen_ADTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_D64);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_D64);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_dw0(r2));
-      assign(op2, get_dpr_dw0(r3));
-      assign(result, triop(Iop_AddD64, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result);
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   IRTemp op1 = newTemp(Ity_D64);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_dw0(r2));
+   assign(op2, get_dpr_dw0(r3));
+   assign(result, triop(Iop_AddD64, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result);
+   put_dpr_dw0(r1, mkexpr(result));
    return "adtra";
 }
 
 static const HChar *
 s390_irgen_AXTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("axtra", is_valid_fpr_pair(r1));
-      s390_insn_assert("axtra", is_valid_fpr_pair(r2));
-      s390_insn_assert("axtra", is_valid_fpr_pair(r3));
+   s390_insn_assert("axtra", is_valid_fpr_pair(r1));
+   s390_insn_assert("axtra", is_valid_fpr_pair(r2));
+   s390_insn_assert("axtra", is_valid_fpr_pair(r3));
 
-      IRTemp op1 = newTemp(Ity_D128);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_D128);
-      IRTemp rounding_mode;
+   IRTemp op1 = newTemp(Ity_D128);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
+   IRTemp rounding_mode;
 
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_pair(r2));
-      assign(op2, get_dpr_pair(r3));
-      assign(result, triop(Iop_AddD128, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_pair(r1, mkexpr(result));
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_pair(r2));
+   assign(op2, get_dpr_pair(r3));
+   assign(result, triop(Iop_AddD128, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_pair(r1, mkexpr(result));
 
-      s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result);
-   }
+   s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result);
    return "axtra";
 }
 
@@ -12103,16 +12095,12 @@ static const HChar *
 s390_irgen_CDFTR(UChar m3 __attribute__((unused)),
                  UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op2 = newTemp(Ity_I32);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op2 = newTemp(Ity_I32);
 
-      assign(op2, get_gpr_w1(r2));
-      put_dpr_dw0(r1, unop(Iop_I32StoD64, mkexpr(op2)));
-   }
+   assign(op2, get_gpr_w1(r2));
+   put_dpr_dw0(r1, unop(Iop_I32StoD64, mkexpr(op2)));
    return "cdftr";
 }
 
@@ -12120,36 +12108,28 @@ static const HChar *
 s390_irgen_CXFTR(UChar m3 __attribute__((unused)),
                  UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("cxftr", is_valid_fpr_pair(r1));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   s390_insn_assert("cxftr", is_valid_fpr_pair(r1));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      IRTemp op2 = newTemp(Ity_I32);
+   IRTemp op2 = newTemp(Ity_I32);
 
-      assign(op2, get_gpr_w1(r2));
-      put_dpr_pair(r1, unop(Iop_I32StoD128, mkexpr(op2)));
-   }
+   assign(op2, get_gpr_w1(r2));
+   put_dpr_pair(r1, unop(Iop_I32StoD128, mkexpr(op2)));
    return "cxftr";
 }
 
 static const HChar *
 s390_irgen_CDGTRA(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op2 = newTemp(Ity_I64);
+   IRTemp op2 = newTemp(Ity_I64);
 
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      assign(op2, get_gpr_dw0(r2));
-      put_dpr_dw0(r1, binop(Iop_I64StoD64, mkexpr(encode_dfp_rounding_mode(m3)),
-                            mkexpr(op2)));
-   }
+   assign(op2, get_gpr_dw0(r2));
+   put_dpr_dw0(r1, binop(Iop_I64StoD64, mkexpr(encode_dfp_rounding_mode(m3)),
+                         mkexpr(op2)));
    return "cdgtra";
 }
 
@@ -12157,21 +12137,14 @@ static const HChar *
 s390_irgen_CXGTRA(UChar m3 __attribute__((unused)),
                   UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("cxgtra", is_valid_fpr_pair(r1));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-
-      IRTemp op2 = newTemp(Ity_I64);
+   s390_insn_assert("cxgtra", is_valid_fpr_pair(r1));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      /* No emulation warning here about an non-zero m3 on hosts without
-         floating point extension facility. No rounding is performed */
+   IRTemp op2 = newTemp(Ity_I64);
 
-      assign(op2, get_gpr_dw0(r2));
-      put_dpr_pair(r1, unop(Iop_I64StoD128, mkexpr(op2)));
-   }
+   assign(op2, get_gpr_dw0(r2));
+   put_dpr_pair(r1, unop(Iop_I64StoD128, mkexpr(op2)));
    return "cxgtra";
 }
 
@@ -12179,16 +12152,12 @@ static const HChar *
 s390_irgen_CDLFTR(UChar m3 __attribute__((unused)),
                   UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op2 = newTemp(Ity_I32);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op2 = newTemp(Ity_I32);
 
-      assign(op2, get_gpr_w1(r2));
-      put_dpr_dw0(r1, unop(Iop_I32UtoD64, mkexpr(op2)));
-   }
+   assign(op2, get_gpr_w1(r2));
+   put_dpr_dw0(r1, unop(Iop_I32UtoD64, mkexpr(op2)));
    return "cdlftr";
 }
 
@@ -12196,36 +12165,27 @@ static const HChar *
 s390_irgen_CXLFTR(UChar m3 __attribute__((unused)),
                   UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("cxlftr", is_valid_fpr_pair(r1));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   s390_insn_assert("cxlftr", is_valid_fpr_pair(r1));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      IRTemp op2 = newTemp(Ity_I32);
+   IRTemp op2 = newTemp(Ity_I32);
 
-      assign(op2, get_gpr_w1(r2));
-      put_dpr_pair(r1, unop(Iop_I32UtoD128, mkexpr(op2)));
-   }
+   assign(op2, get_gpr_w1(r2));
+   put_dpr_pair(r1, unop(Iop_I32UtoD128, mkexpr(op2)));
    return "cxlftr";
 }
 
 static const HChar *
 s390_irgen_CDLGTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op2 = newTemp(Ity_I64);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op2 = newTemp(Ity_I64);
 
-      assign(op2, get_gpr_dw0(r2));
-      put_dpr_dw0(r1, binop(Iop_I64UtoD64,
-                            mkexpr(encode_dfp_rounding_mode(m3)),
-                            mkexpr(op2)));
-   }
+   assign(op2, get_gpr_dw0(r2));
+   put_dpr_dw0(r1, binop(Iop_I64UtoD64,
+                         mkexpr(encode_dfp_rounding_mode(m3)), mkexpr(op2)));
    return "cdlgtr";
 }
 
@@ -12233,827 +12193,645 @@ static const HChar *
 s390_irgen_CXLGTR(UChar m3 __attribute__((unused)),
                   UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      IRTemp op2 = newTemp(Ity_I64);
+   IRTemp op2 = newTemp(Ity_I64);
 
-      assign(op2, get_gpr_dw0(r2));
-      put_dpr_pair(r1, unop(Iop_I64UtoD128, mkexpr(op2)));
-   }
+   assign(op2, get_gpr_dw0(r2));
+   put_dpr_pair(r1, unop(Iop_I64UtoD128, mkexpr(op2)));
    return "cxlgtr";
 }
 
 static const HChar *
 s390_irgen_CFDTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_I32);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_I32);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
 
-      assign(op, get_dpr_dw0(r2));
-      assign(result, binop(Iop_D64toI32S, mkexpr(rounding_mode),
-                           mkexpr(op)));
-      put_gpr_w1(r1, mkexpr(result));
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_32, op, rounding_mode);
-   }
+   assign(op, get_dpr_dw0(r2));
+   assign(result, binop(Iop_D64toI32S, mkexpr(rounding_mode), mkexpr(op)));
+   put_gpr_w1(r1, mkexpr(result));
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_32, op, rounding_mode);
    return "cfdtr";
 }
 
 static const HChar *
 s390_irgen_CFXTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("cfxtr", is_valid_fpr_pair(r2));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   s390_insn_assert("cfxtr", is_valid_fpr_pair(r2));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      IRTemp op = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_I32);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+   IRTemp op = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_I32);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
 
-      assign(op, get_dpr_pair(r2));
-      assign(result, binop(Iop_D128toI32S, mkexpr(rounding_mode),
-                           mkexpr(op)));
-      put_gpr_w1(r1, mkexpr(result));
-      s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_32, op,
-                              rounding_mode);
-   }
+   assign(op, get_dpr_pair(r2));
+   assign(result, binop(Iop_D128toI32S, mkexpr(rounding_mode), mkexpr(op)));
+   put_gpr_w1(r1, mkexpr(result));
+   s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_32, op, rounding_mode);
    return "cfxtr";
 }
 
 static const HChar *
 s390_irgen_CGDTRA(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op = newTemp(Ity_D64);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op = newTemp(Ity_D64);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
 
-      assign(op, get_dpr_dw0(r2));
-      put_gpr_dw0(r1, binop(Iop_D64toI64S, mkexpr(rounding_mode), mkexpr(op)));
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_64, op, rounding_mode);
-   }
+   assign(op, get_dpr_dw0(r2));
+   put_gpr_dw0(r1, binop(Iop_D64toI64S, mkexpr(rounding_mode), mkexpr(op)));
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_64, op, rounding_mode);
    return "cgdtra";
 }
 
 static const HChar *
 s390_irgen_CGXTRA(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("cgxtra", is_valid_fpr_pair(r2));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   s390_insn_assert("cgxtra", is_valid_fpr_pair(r2));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      IRTemp op = newTemp(Ity_D128);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+   IRTemp op = newTemp(Ity_D128);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
 
-      assign(op, get_dpr_pair(r2));
-      put_gpr_dw0(r1, binop(Iop_D128toI64S, mkexpr(rounding_mode), mkexpr(op)));
-      s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_64, op, rounding_mode);
-   }
+   assign(op, get_dpr_pair(r2));
+   put_gpr_dw0(r1, binop(Iop_D128toI64S, mkexpr(rounding_mode), mkexpr(op)));
+   s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_64, op, rounding_mode);
    return "cgxtra";
 }
 
 static const HChar *
 s390_irgen_CEDTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_D64);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp cc_vex  = newTemp(Ity_I32);
-      IRTemp cc_s390 = newTemp(Ity_I32);
+   IRTemp op1 = newTemp(Ity_D64);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp cc_vex  = newTemp(Ity_I32);
+   IRTemp cc_s390 = newTemp(Ity_I32);
 
-      assign(op1, get_dpr_dw0(r1));
-      assign(op2, get_dpr_dw0(r2));
-      assign(cc_vex, binop(Iop_CmpExpD64, mkexpr(op1), mkexpr(op2)));
+   assign(op1, get_dpr_dw0(r1));
+   assign(op2, get_dpr_dw0(r2));
+   assign(cc_vex, binop(Iop_CmpExpD64, mkexpr(op1), mkexpr(op2)));
 
-      assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex));
-      s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
-   }
+   assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex));
+   s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
    return "cedtr";
 }
 
 static const HChar *
 s390_irgen_CEXTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("cextr", is_valid_fpr_pair(r1));
-      s390_insn_assert("cextr", is_valid_fpr_pair(r2));
+   s390_insn_assert("cextr", is_valid_fpr_pair(r1));
+   s390_insn_assert("cextr", is_valid_fpr_pair(r2));
 
-      IRTemp op1 = newTemp(Ity_D128);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp cc_vex  = newTemp(Ity_I32);
-      IRTemp cc_s390 = newTemp(Ity_I32);
+   IRTemp op1 = newTemp(Ity_D128);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp cc_vex  = newTemp(Ity_I32);
+   IRTemp cc_s390 = newTemp(Ity_I32);
 
-      assign(op1, get_dpr_pair(r1));
-      assign(op2, get_dpr_pair(r2));
-      assign(cc_vex, binop(Iop_CmpExpD128, mkexpr(op1), mkexpr(op2)));
+   assign(op1, get_dpr_pair(r1));
+   assign(op2, get_dpr_pair(r2));
+   assign(cc_vex, binop(Iop_CmpExpD128, mkexpr(op1), mkexpr(op2)));
 
-      assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex));
-      s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
-   }
+   assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex));
+   s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
    return "cextr";
 }
 
 static const HChar *
 s390_irgen_CLFDTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_I32);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_I32);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
 
-      assign(op, get_dpr_dw0(r2));
-      assign(result, binop(Iop_D64toI32U, mkexpr(rounding_mode),
-                           mkexpr(op)));
-      put_gpr_w1(r1, mkexpr(result));
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_32, op, rounding_mode);
-   }
+   assign(op, get_dpr_dw0(r2));
+   assign(result, binop(Iop_D64toI32U, mkexpr(rounding_mode), mkexpr(op)));
+   put_gpr_w1(r1, mkexpr(result));
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_32, op, rounding_mode);
    return "clfdtr";
 }
 
 static const HChar *
 s390_irgen_CLFXTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("clfxtr", is_valid_fpr_pair(r2));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   s390_insn_assert("clfxtr", is_valid_fpr_pair(r2));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      IRTemp op = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_I32);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+   IRTemp op = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_I32);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
 
-      assign(op, get_dpr_pair(r2));
-      assign(result, binop(Iop_D128toI32U, mkexpr(rounding_mode),
-                           mkexpr(op)));
-      put_gpr_w1(r1, mkexpr(result));
-      s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_32, op,
-                              rounding_mode);
-   }
+   assign(op, get_dpr_pair(r2));
+   assign(result, binop(Iop_D128toI32U, mkexpr(rounding_mode), mkexpr(op)));
+   put_gpr_w1(r1, mkexpr(result));
+   s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_32, op, rounding_mode);
    return "clfxtr";
 }
 
 static const HChar *
 s390_irgen_CLGDTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_I64);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
-
-      assign(op, get_dpr_dw0(r2));
-      assign(result, binop(Iop_D64toI64U, mkexpr(rounding_mode),
-                           mkexpr(op)));
-      put_gpr_dw0(r1, mkexpr(result));
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_64, op, rounding_mode);
-   }
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_I64);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+
+   assign(op, get_dpr_dw0(r2));
+   assign(result, binop(Iop_D64toI64U, mkexpr(rounding_mode), mkexpr(op)));
+   put_gpr_dw0(r1, mkexpr(result));
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_64, op, rounding_mode);
    return "clgdtr";
 }
 
 static const HChar *
 s390_irgen_CLGXTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("clgxtr", is_valid_fpr_pair(r2));
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
+   s390_insn_assert("clgxtr", is_valid_fpr_pair(r2));
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
 
-      IRTemp op = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_I64);
-      IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
+   IRTemp op = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_I64);
+   IRTemp rounding_mode = encode_dfp_rounding_mode(m3);
 
-      assign(op, get_dpr_pair(r2));
-      assign(result, binop(Iop_D128toI64U, mkexpr(rounding_mode),
-                           mkexpr(op)));
-      put_gpr_dw0(r1, mkexpr(result));
-      s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_64, op,
-                              rounding_mode);
-   }
+   assign(op, get_dpr_pair(r2));
+   assign(result, binop(Iop_D128toI64U, mkexpr(rounding_mode), mkexpr(op)));
+   put_gpr_dw0(r1, mkexpr(result));
+   s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_64, op, rounding_mode);
    return "clgxtr";
 }
 
 static const HChar *
 s390_irgen_DDTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_D64);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_D64);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_dw0(r2));
-      assign(op2, get_dpr_dw0(r3));
-      assign(result, triop(Iop_DivD64, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   IRTemp op1 = newTemp(Ity_D64);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_dw0(r2));
+   assign(op2, get_dpr_dw0(r3));
+   assign(result, triop(Iop_DivD64, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_dw0(r1, mkexpr(result));
    return "ddtra";
 }
 
 static const HChar *
 s390_irgen_DXTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("dxtra", is_valid_fpr_pair(r1));
-      s390_insn_assert("dxtra", is_valid_fpr_pair(r2));
-      s390_insn_assert("dxtra", is_valid_fpr_pair(r3));
-
-      IRTemp op1 = newTemp(Ity_D128);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_D128);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_pair(r2));
-      assign(op2, get_dpr_pair(r3));
-      assign(result, triop(Iop_DivD128, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_pair(r1, mkexpr(result));
-   }
+   s390_insn_assert("dxtra", is_valid_fpr_pair(r1));
+   s390_insn_assert("dxtra", is_valid_fpr_pair(r2));
+   s390_insn_assert("dxtra", is_valid_fpr_pair(r3));
+
+   IRTemp op1 = newTemp(Ity_D128);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_pair(r2));
+   assign(op2, get_dpr_pair(r3));
+   assign(result, triop(Iop_DivD128, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_pair(r1, mkexpr(result));
    return "dxtra";
 }
 
 static const HChar *
 s390_irgen_EEDTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      put_gpr_dw0(r1, unop(Iop_ExtractExpD64, get_dpr_dw0(r2)));
-   }
+   put_gpr_dw0(r1, unop(Iop_ExtractExpD64, get_dpr_dw0(r2)));
    return "eedtr";
 }
 
 static const HChar *
 s390_irgen_EEXTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("eextr", is_valid_fpr_pair(r2));
+   s390_insn_assert("eextr", is_valid_fpr_pair(r2));
 
-      put_gpr_dw0(r1, unop(Iop_ExtractExpD128, get_dpr_pair(r2)));
-   }
+   put_gpr_dw0(r1, unop(Iop_ExtractExpD128, get_dpr_pair(r2)));
    return "eextr";
 }
 
 static const HChar *
 s390_irgen_ESDTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      put_gpr_dw0(r1, unop(Iop_ExtractSigD64, get_dpr_dw0(r2)));
-   }
+   put_gpr_dw0(r1, unop(Iop_ExtractSigD64, get_dpr_dw0(r2)));
    return "esdtr";
 }
 
 static const HChar *
 s390_irgen_ESXTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("esxtr", is_valid_fpr_pair(r2));
+   s390_insn_assert("esxtr", is_valid_fpr_pair(r2));
 
-      put_gpr_dw0(r1, unop(Iop_ExtractSigD128, get_dpr_pair(r2)));
-   }
+   put_gpr_dw0(r1, unop(Iop_ExtractSigD128, get_dpr_pair(r2)));
    return "esxtr";
 }
 
 static const HChar *
 s390_irgen_IEDTR(UChar r3, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_I64);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_D64);
+   IRTemp op1 = newTemp(Ity_I64);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
 
-      assign(op1, get_gpr_dw0(r2));
-      assign(op2, get_dpr_dw0(r3));
-      assign(result, binop(Iop_InsertExpD64, mkexpr(op1), mkexpr(op2)));
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   assign(op1, get_gpr_dw0(r2));
+   assign(op2, get_dpr_dw0(r3));
+   assign(result, binop(Iop_InsertExpD64, mkexpr(op1), mkexpr(op2)));
+   put_dpr_dw0(r1, mkexpr(result));
    return "iedtr";
 }
 
 static const HChar *
 s390_irgen_IEXTR(UChar r3, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("iextr", is_valid_fpr_pair(r1));
-      s390_insn_assert("iextr", is_valid_fpr_pair(r3));
+   s390_insn_assert("iextr", is_valid_fpr_pair(r1));
+   s390_insn_assert("iextr", is_valid_fpr_pair(r3));
 
-      IRTemp op1 = newTemp(Ity_I64);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_D128);
+   IRTemp op1 = newTemp(Ity_I64);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
 
-      assign(op1, get_gpr_dw0(r2));
-      assign(op2, get_dpr_pair(r3));
-      assign(result, binop(Iop_InsertExpD128, mkexpr(op1), mkexpr(op2)));
-      put_dpr_pair(r1, mkexpr(result));
-   }
+   assign(op1, get_gpr_dw0(r2));
+   assign(op2, get_dpr_pair(r3));
+   assign(result, binop(Iop_InsertExpD128, mkexpr(op1), mkexpr(op2)));
+   put_dpr_pair(r1, mkexpr(result));
    return "iextr";
 }
 
 static const HChar *
 s390_irgen_LDETR(UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x8) != 0)
-         emulation_warning(EmWarn_S390X_XiC_not_zero);
-      IRTemp op = newTemp(Ity_D32);
+   if ((m4 & 0x8) != 0)
+      emulation_warning(EmWarn_S390X_XiC_not_zero);
+   IRTemp op = newTemp(Ity_D32);
 
-      assign(op, get_dpr_w0(r2));
-      put_dpr_dw0(r1, unop(Iop_D32toD64, mkexpr(op)));
-   }
+   assign(op, get_dpr_w0(r2));
+   put_dpr_dw0(r1, unop(Iop_D32toD64, mkexpr(op)));
    return "ldetr";
 }
 
 static const HChar *
 s390_irgen_LXDTR(UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x8) != 0)
-         emulation_warning(EmWarn_S390X_XiC_not_zero);
-      s390_insn_assert("lxdtr", is_valid_fpr_pair(r1));
+   if ((m4 & 0x8) != 0)
+      emulation_warning(EmWarn_S390X_XiC_not_zero);
+   s390_insn_assert("lxdtr", is_valid_fpr_pair(r1));
 
-      IRTemp op = newTemp(Ity_D64);
+   IRTemp op = newTemp(Ity_D64);
 
-      assign(op, get_dpr_dw0(r2));
-      put_dpr_pair(r1, unop(Iop_D64toD128, mkexpr(op)));
-   }
+   assign(op, get_dpr_dw0(r2));
+   put_dpr_pair(r1, unop(Iop_D64toD128, mkexpr(op)));
    return "lxdtr";
 }
 
 static const HChar *
 s390_irgen_LDXTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("ldxtr", is_valid_fpr_pair(r1));
-      s390_insn_assert("ldxtr", is_valid_fpr_pair(r2));
+   s390_insn_assert("ldxtr", is_valid_fpr_pair(r1));
+   s390_insn_assert("ldxtr", is_valid_fpr_pair(r2));
 
-      if ((m4 & 0x8) != 0)
-         emulation_warning(EmWarn_S390X_XiC_not_zero);
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp result = newTemp(Ity_D64);
+   if ((m4 & 0x8) != 0)
+      emulation_warning(EmWarn_S390X_XiC_not_zero);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp result = newTemp(Ity_D64);
 
-      assign(result, binop(Iop_D128toD64, mkexpr(encode_dfp_rounding_mode(m3)),
-                           get_dpr_pair(r2)));
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   assign(result, binop(Iop_D128toD64, mkexpr(encode_dfp_rounding_mode(m3)),
+                        get_dpr_pair(r2)));
+   put_dpr_dw0(r1, mkexpr(result));
    return "ldxtr";
 }
 
 static const HChar *
 s390_irgen_LEDTR(UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      if ((m4 & 0x8) != 0)
-         emulation_warning(EmWarn_S390X_XiC_not_zero);
-      if ((m4 & 0x4) != 0)
-         emulation_warning(EmWarn_S390X_XxC_not_zero);
-      IRTemp op = newTemp(Ity_D64);
+   if ((m4 & 0x8) != 0)
+      emulation_warning(EmWarn_S390X_XiC_not_zero);
+   if ((m4 & 0x4) != 0)
+      emulation_warning(EmWarn_S390X_XxC_not_zero);
+   IRTemp op = newTemp(Ity_D64);
 
-      assign(op, get_dpr_dw0(r2));
-      put_dpr_w0(r1, binop(Iop_D64toD32, mkexpr(encode_dfp_rounding_mode(m3)),
-                           mkexpr(op)));
-   }
+   assign(op, get_dpr_dw0(r2));
+   put_dpr_w0(r1, binop(Iop_D64toD32, mkexpr(encode_dfp_rounding_mode(m3)),
+                        mkexpr(op)));
    return "ledtr";
 }
 
 static const HChar *
 s390_irgen_LTDTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp result = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
 
-      assign(result, get_dpr_dw0(r2));
-      put_dpr_dw0(r1, mkexpr(result));
-      s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result);
-   }
+   assign(result, get_dpr_dw0(r2));
+   put_dpr_dw0(r1, mkexpr(result));
+   s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result);
    return "ltdtr";
 }
 
 static const HChar *
 s390_irgen_LTXTR(UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("ltxtr", is_valid_fpr_pair(r1));
-      s390_insn_assert("ltxtr", is_valid_fpr_pair(r2));
+   s390_insn_assert("ltxtr", is_valid_fpr_pair(r1));
+   s390_insn_assert("ltxtr", is_valid_fpr_pair(r2));
 
-      IRTemp result = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
 
-      assign(result, get_dpr_pair(r2));
-      put_dpr_pair(r1, mkexpr(result));
-      s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result);
-   }
+   assign(result, get_dpr_pair(r2));
+   put_dpr_pair(r1, mkexpr(result));
+   s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result);
    return "ltxtr";
 }
 
 static const HChar *
 s390_irgen_MDTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_D64);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_D64);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_dw0(r2));
-      assign(op2, get_dpr_dw0(r3));
-      assign(result, triop(Iop_MulD64, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   IRTemp op1 = newTemp(Ity_D64);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_dw0(r2));
+   assign(op2, get_dpr_dw0(r3));
+   assign(result, triop(Iop_MulD64, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_dw0(r1, mkexpr(result));
    return "mdtra";
 }
 
 static const HChar *
 s390_irgen_MXTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("mxtra", is_valid_fpr_pair(r1));
-      s390_insn_assert("mxtra", is_valid_fpr_pair(r2));
-      s390_insn_assert("mxtra", is_valid_fpr_pair(r3));
-
-      IRTemp op1 = newTemp(Ity_D128);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_D128);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_pair(r2));
-      assign(op2, get_dpr_pair(r3));
-      assign(result, triop(Iop_MulD128, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_pair(r1, mkexpr(result));
-   }
+   s390_insn_assert("mxtra", is_valid_fpr_pair(r1));
+   s390_insn_assert("mxtra", is_valid_fpr_pair(r2));
+   s390_insn_assert("mxtra", is_valid_fpr_pair(r3));
+
+   IRTemp op1 = newTemp(Ity_D128);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_pair(r2));
+   assign(op2, get_dpr_pair(r3));
+   assign(result, triop(Iop_MulD128, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_pair(r1, mkexpr(result));
    return "mxtra";
 }
 
 static const HChar *
 s390_irgen_QADTR(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_D64);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_D64);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_dw0(r2));
-      assign(op2, get_dpr_dw0(r3));
-      assign(result, triop(Iop_QuantizeD64, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   IRTemp op1 = newTemp(Ity_D64);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_dw0(r2));
+   assign(op2, get_dpr_dw0(r3));
+   assign(result, triop(Iop_QuantizeD64, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_dw0(r1, mkexpr(result));
    return "qadtr";
 }
 
 static const HChar *
 s390_irgen_QAXTR(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("qaxtr", is_valid_fpr_pair(r1));
-      s390_insn_assert("qaxtr", is_valid_fpr_pair(r2));
-      s390_insn_assert("qaxtr", is_valid_fpr_pair(r3));
-
-      IRTemp op1 = newTemp(Ity_D128);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_D128);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_pair(r2));
-      assign(op2, get_dpr_pair(r3));
-      assign(result, triop(Iop_QuantizeD128, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_pair(r1, mkexpr(result));
-   }
+   s390_insn_assert("qaxtr", is_valid_fpr_pair(r1));
+   s390_insn_assert("qaxtr", is_valid_fpr_pair(r2));
+   s390_insn_assert("qaxtr", is_valid_fpr_pair(r3));
+
+   IRTemp op1 = newTemp(Ity_D128);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_pair(r2));
+   assign(op2, get_dpr_pair(r3));
+   assign(result, triop(Iop_QuantizeD128, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_pair(r1, mkexpr(result));
    return "qaxtr";
 }
 
 static const HChar *
 s390_irgen_RRDTR(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_I8);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_D64);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_gpr_b7(r2));
-      assign(op2, get_dpr_dw0(r3));
-      assign(result, triop(Iop_SignificanceRoundD64, mkexpr(rounding_mode),
-                           mkexpr(op1), mkexpr(op2)));
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   IRTemp op1 = newTemp(Ity_I8);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_gpr_b7(r2));
+   assign(op2, get_dpr_dw0(r3));
+   assign(result, triop(Iop_SignificanceRoundD64, mkexpr(rounding_mode),
+                        mkexpr(op1), mkexpr(op2)));
+   put_dpr_dw0(r1, mkexpr(result));
    return "rrdtr";
 }
 
 static const HChar *
 s390_irgen_RRXTR(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("rrxtr", is_valid_fpr_pair(r1));
-      s390_insn_assert("rrxtr", is_valid_fpr_pair(r3));
+   s390_insn_assert("rrxtr", is_valid_fpr_pair(r1));
+   s390_insn_assert("rrxtr", is_valid_fpr_pair(r3));
 
-      IRTemp op1 = newTemp(Ity_I8);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_D128);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_gpr_b7(r2));
-      assign(op2, get_dpr_pair(r3));
-      assign(result, triop(Iop_SignificanceRoundD128, mkexpr(rounding_mode),
-                           mkexpr(op1), mkexpr(op2)));
-      put_dpr_pair(r1, mkexpr(result));
-   }
+   IRTemp op1 = newTemp(Ity_I8);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_gpr_b7(r2));
+   assign(op2, get_dpr_pair(r3));
+   assign(result, triop(Iop_SignificanceRoundD128, mkexpr(rounding_mode),
+                        mkexpr(op1), mkexpr(op2)));
+   put_dpr_pair(r1, mkexpr(result));
    return "rrxtr";
 }
 
 static const HChar *
 s390_irgen_SDTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op1 = newTemp(Ity_D64);
-      IRTemp op2 = newTemp(Ity_D64);
-      IRTemp result = newTemp(Ity_D64);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_dw0(r2));
-      assign(op2, get_dpr_dw0(r3));
-      assign(result, triop(Iop_SubD64, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result);
-      put_dpr_dw0(r1, mkexpr(result));
-   }
+   IRTemp op1 = newTemp(Ity_D64);
+   IRTemp op2 = newTemp(Ity_D64);
+   IRTemp result = newTemp(Ity_D64);
+   IRTemp rounding_mode;
+
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_dw0(r2));
+   assign(op2, get_dpr_dw0(r3));
+   assign(result, triop(Iop_SubD64, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result);
+   put_dpr_dw0(r1, mkexpr(result));
    return "sdtra";
 }
 
 static const HChar *
 s390_irgen_SXTRA(UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("sxtra", is_valid_fpr_pair(r1));
-      s390_insn_assert("sxtra", is_valid_fpr_pair(r2));
-      s390_insn_assert("sxtra", is_valid_fpr_pair(r3));
+   s390_insn_assert("sxtra", is_valid_fpr_pair(r1));
+   s390_insn_assert("sxtra", is_valid_fpr_pair(r2));
+   s390_insn_assert("sxtra", is_valid_fpr_pair(r3));
 
-      IRTemp op1 = newTemp(Ity_D128);
-      IRTemp op2 = newTemp(Ity_D128);
-      IRTemp result = newTemp(Ity_D128);
-      IRTemp rounding_mode;
-
-      rounding_mode = encode_dfp_rounding_mode(m4);
-      assign(op1, get_dpr_pair(r2));
-      assign(op2, get_dpr_pair(r3));
-      assign(result, triop(Iop_SubD128, mkexpr(rounding_mode), mkexpr(op1),
-                           mkexpr(op2)));
-      put_dpr_pair(r1, mkexpr(result));
+   IRTemp op1 = newTemp(Ity_D128);
+   IRTemp op2 = newTemp(Ity_D128);
+   IRTemp result = newTemp(Ity_D128);
+   IRTemp rounding_mode;
 
-      s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result);
-   }
+   rounding_mode = encode_dfp_rounding_mode(m4);
+   assign(op1, get_dpr_pair(r2));
+   assign(op2, get_dpr_pair(r3));
+   assign(result, triop(Iop_SubD128, mkexpr(rounding_mode), mkexpr(op1),
+                        mkexpr(op2)));
+   put_dpr_pair(r1, mkexpr(result));
+   s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result);
    return "sxtra";
 }
 
 static const HChar *
 s390_irgen_SLDT(UChar r3, IRTemp op2addr, UChar r1)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op = newTemp(Ity_D64);
+   IRTemp op = newTemp(Ity_D64);
 
-      assign(op, get_dpr_dw0(r3));
-      put_dpr_dw0(r1, binop(Iop_ShlD64, mkexpr(op),
-                            unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
-                                                  mkU64(63)))));
-   }
+   assign(op, get_dpr_dw0(r3));
+   put_dpr_dw0(r1, binop(Iop_ShlD64, mkexpr(op),
+                         unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
+                                               mkU64(63)))));
    return "sldt";
 }
 
 static const HChar *
 s390_irgen_SLXT(UChar r3, IRTemp op2addr, UChar r1)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("slxt", is_valid_fpr_pair(r1));
-      s390_insn_assert("slxt", is_valid_fpr_pair(r3));
+   s390_insn_assert("slxt", is_valid_fpr_pair(r1));
+   s390_insn_assert("slxt", is_valid_fpr_pair(r3));
 
-      IRTemp op = newTemp(Ity_D128);
+   IRTemp op = newTemp(Ity_D128);
 
-      assign(op, get_dpr_pair(r3));
-      put_dpr_pair(r1, binop(Iop_ShlD128, mkexpr(op),
-                             unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
-                                                   mkU64(63)))));
-   }
+   assign(op, get_dpr_pair(r3));
+   put_dpr_pair(r1, binop(Iop_ShlD128, mkexpr(op),
+                          unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
+                                                mkU64(63)))));
    return "slxt";
 }
 
 static const HChar *
 s390_irgen_SRDT(UChar r3, IRTemp op2addr, UChar r1)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp op = newTemp(Ity_D64);
+   IRTemp op = newTemp(Ity_D64);
 
-      assign(op, get_dpr_dw0(r3));
-      put_dpr_dw0(r1, binop(Iop_ShrD64, mkexpr(op),
-                            unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
-                                                  mkU64(63)))));
-   }
+   assign(op, get_dpr_dw0(r3));
+   put_dpr_dw0(r1, binop(Iop_ShrD64, mkexpr(op),
+                         unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
+                                               mkU64(63)))));
    return "srdt";
 }
 
 static const HChar *
 s390_irgen_SRXT(UChar r3, IRTemp op2addr, UChar r1)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("srxt", is_valid_fpr_pair(r1));
-      s390_insn_assert("srxt", is_valid_fpr_pair(r3));
+   s390_insn_assert("srxt", is_valid_fpr_pair(r1));
+   s390_insn_assert("srxt", is_valid_fpr_pair(r3));
 
-      IRTemp op = newTemp(Ity_D128);
+   IRTemp op = newTemp(Ity_D128);
 
-      assign(op, get_dpr_pair(r3));
-      put_dpr_pair(r1, binop(Iop_ShrD128, mkexpr(op),
-                             unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
-                                                   mkU64(63)))));
-   }
+   assign(op, get_dpr_pair(r3));
+   put_dpr_pair(r1, binop(Iop_ShrD128, mkexpr(op),
+                          unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr),
+                                                mkU64(63)))));
    return "srxt";
 }
 
 static const HChar *
 s390_irgen_TDCET(UChar r1, IRTemp op2addr)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp value = newTemp(Ity_D32);
+   IRTemp value = newTemp(Ity_D32);
 
-      assign(value, get_dpr_w0(r1));
+   assign(value, get_dpr_w0(r1));
 
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_32, value, op2addr);
-   }
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_32, value, op2addr);
    return "tdcet";
 }
 
 static const HChar *
 s390_irgen_TDCDT(UChar r1, IRTemp op2addr)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp value = newTemp(Ity_D64);
+   IRTemp value = newTemp(Ity_D64);
 
-      assign(value, get_dpr_dw0(r1));
+   assign(value, get_dpr_dw0(r1));
 
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_64, value, op2addr);
-   }
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_64, value, op2addr);
    return "tdcdt";
 }
 
 static const HChar *
 s390_irgen_TDCXT(UChar r1, IRTemp op2addr)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("tdcxt", is_valid_fpr_pair(r1));
+   s390_insn_assert("tdcxt", is_valid_fpr_pair(r1));
 
-      IRTemp value = newTemp(Ity_D128);
+   IRTemp value = newTemp(Ity_D128);
 
-      assign(value, get_dpr_pair(r1));
+   assign(value, get_dpr_pair(r1));
 
-      s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDC_128, value, op2addr);
-   }
+   s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDC_128, value, op2addr);
    return "tdcxt";
 }
 
 static const HChar *
 s390_irgen_TDGET(UChar r1, IRTemp op2addr)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp value = newTemp(Ity_D32);
+   IRTemp value = newTemp(Ity_D32);
 
-      assign(value, get_dpr_w0(r1));
+   assign(value, get_dpr_w0(r1));
 
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_32, value, op2addr);
-   }
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_32, value, op2addr);
    return "tdget";
 }
 
 static const HChar *
 s390_irgen_TDGDT(UChar r1, IRTemp op2addr)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      IRTemp value = newTemp(Ity_D64);
+   IRTemp value = newTemp(Ity_D64);
 
-      assign(value, get_dpr_dw0(r1));
+   assign(value, get_dpr_dw0(r1));
 
-      s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_64, value, op2addr);
-   }
+   s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_64, value, op2addr);
    return "tdgdt";
 }
 
 static const HChar *
 s390_irgen_TDGXT(UChar r1, IRTemp op2addr)
 {
-   if (! s390_host_has_dfp) {
-      emulation_failure(EmFail_S390X_DFP_insn);
-   } else {
-      s390_insn_assert("tdgxt", is_valid_fpr_pair(r1));
+   s390_insn_assert("tdgxt", is_valid_fpr_pair(r1));
 
-      IRTemp value = newTemp(Ity_D128);
+   IRTemp value = newTemp(Ity_D128);
 
-      assign(value, get_dpr_pair(r1));
+   assign(value, get_dpr_pair(r1));
 
-      s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDG_128, value, op2addr);
-   }
+   s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDG_128, value, op2addr);
    return "tdgxt";
 }
 
index 6f5191124c7814a073f0e9df085f02d53a3b5840..4831e1d67d2aa5a659ff5f357ccf2a449f12be97 100644 (file)
@@ -4562,7 +4562,6 @@ s390_emit_SXBR(UChar *p, UChar r1, UChar r2)
 static UChar *
 s390_emit_ADTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("adtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -4573,7 +4572,6 @@ s390_emit_ADTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_AXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("axtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -4584,7 +4582,6 @@ s390_emit_AXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_CDTR(UChar *p, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("cdtr"), FPR(r1), FPR(r2));
 
@@ -4595,7 +4592,6 @@ s390_emit_CDTR(UChar *p, UChar r1, UChar r2)
 static UChar *
 s390_emit_CXTR(UChar *p, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("cxtr"), FPR(r1), FPR(r2));
 
@@ -4606,7 +4602,6 @@ s390_emit_CXTR(UChar *p, UChar r1, UChar r2)
 static UChar *
 s390_emit_CDGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    vassert(m4 == 0);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
@@ -4619,7 +4614,6 @@ s390_emit_CDGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_CXGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    vassert(m4 == 0);
    /* rounding mode m3 is not considered, as the corresponding
       IRop (Iop_I64StoD128) does not take rounding mode. */
@@ -4636,7 +4630,6 @@ static UChar *
 s390_emit_CDFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cdftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4));
@@ -4649,7 +4642,6 @@ static UChar *
 s390_emit_CXFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cxftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4));
@@ -4662,7 +4654,6 @@ static UChar *
 s390_emit_CDLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cdlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4));
@@ -4675,7 +4666,6 @@ static UChar *
 s390_emit_CXLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cxlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4));
@@ -4688,7 +4678,6 @@ static UChar *
 s390_emit_CDLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cdlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4));
@@ -4701,7 +4690,6 @@ static UChar *
 s390_emit_CXLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cxlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4));
@@ -4734,7 +4722,6 @@ static UChar *
 s390_emit_CFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4));
@@ -4747,7 +4734,6 @@ static UChar *
 s390_emit_CFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("cfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4));
@@ -4759,7 +4745,6 @@ s390_emit_CFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_CGDTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    vassert(m4 == 0);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
@@ -4772,7 +4757,6 @@ s390_emit_CGDTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_CGXTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    vassert(m4 == 0);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
@@ -4786,7 +4770,6 @@ static UChar *
 s390_emit_CLFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("clfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4));
@@ -4799,7 +4782,6 @@ static UChar *
 s390_emit_CLFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("clfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4));
@@ -4812,7 +4794,6 @@ static UChar *
 s390_emit_CLGDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("clgdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4));
@@ -4825,7 +4806,6 @@ static UChar *
 s390_emit_CLGXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
    vassert(m4 == 0);
-   vassert(s390_host_has_dfp);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("clgxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4));
@@ -4837,7 +4817,6 @@ s390_emit_CLGXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_DDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("ddtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -4848,7 +4827,6 @@ s390_emit_DDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_DXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("dxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -4919,7 +4897,6 @@ s390_emit_IEXTR(UChar *p, UChar r3, UChar r1, UChar r2)
 static UChar *
 s390_emit_LDETR(UChar *p, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("ldetr"), FPR(r1), FPR(r2), UINT(m4));
 
@@ -4930,7 +4907,6 @@ s390_emit_LDETR(UChar *p, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_LXDTR(UChar *p, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("lxdtr"), FPR(r1), FPR(r2), UINT(m4));
 
@@ -4941,7 +4917,6 @@ s390_emit_LXDTR(UChar *p, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_LEDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    vassert(m4 == 0);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
@@ -4954,7 +4929,6 @@ s390_emit_LEDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_LDXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    vassert(m4 == 0);
 
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
@@ -4967,7 +4941,6 @@ s390_emit_LDXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_MDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("mdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -4978,7 +4951,6 @@ s390_emit_MDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_MXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("mxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -5010,7 +4982,6 @@ s390_emit_PFPO(UChar *p)
 static UChar *
 s390_emit_QADTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("qadtr"), FPR(r1), FPR(r3), FPR(r2), UINT(m4));
 
@@ -5021,7 +4992,6 @@ s390_emit_QADTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_QAXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("qaxtr"), FPR(r1), FPR(r3), FPR(r2), UINT(m4));
 
@@ -5032,7 +5002,6 @@ s390_emit_QAXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_RRDTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("rrdtr"), FPR(r1), FPR(r3), GPR(r2), UINT(m4));
 
@@ -5043,7 +5012,6 @@ s390_emit_RRDTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_RRXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("rrxtr"), FPR(r1), FPR(r3), GPR(r2), UINT(m4));
 
@@ -5054,7 +5022,6 @@ s390_emit_RRXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("sdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -5065,7 +5032,6 @@ s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_SXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(XMNM("sxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4));
 
@@ -5076,7 +5042,6 @@ s390_emit_SXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_SLDT(UChar *p, UChar r3, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("sldt"), FPR(r1), FPR(r3), UDXB(0, 0, r2));
 
@@ -5087,7 +5052,6 @@ s390_emit_SLDT(UChar *p, UChar r3, UChar r1, UChar r2)
 static UChar *
 s390_emit_SLXT(UChar *p, UChar r3, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("slxt"), FPR(r1), FPR(r3), UDXB(0, 0, r2));
 
@@ -5098,7 +5062,6 @@ s390_emit_SLXT(UChar *p, UChar r3, UChar r1, UChar r2)
 static UChar *
 s390_emit_SRDT(UChar *p, UChar r3, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("srdt"), FPR(r1), FPR(r3), UDXB(0, 0, r2));
 
@@ -5109,7 +5072,6 @@ s390_emit_SRDT(UChar *p, UChar r3, UChar r1, UChar r2)
 static UChar *
 s390_emit_SRXT(UChar *p, UChar r3, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_dfp);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       S390_DISASM(MNM("srxt"), FPR(r1), FPR(r3), UDXB(0, 0, r2));
 
index 89ebfc7472c594c2ad29df20d5a2deb38b1af06f..da0e2553e3a5b22d5e36b90146a0ac9c462d10dc 100644 (file)
@@ -922,8 +922,6 @@ extern UInt s390_host_hwcaps;
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_EIMM))
 #define s390_host_has_gie \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_GIE))
-#define s390_host_has_dfp \
-                      (s390_host_hwcaps & (VEX_HWCAPS_S390X_DFP))
 #define s390_host_has_fgx \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_FGX))
 #define s390_host_has_etf2 \
index 9a12eebad0ca976ca0f403a9f3de61975654fd62..1cdbd1b4b16f22e14aefd71cede621e14d965ef6 100644 (file)
@@ -1546,8 +1546,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew )
                "  IEEE-invalid-operation exceptions will not be suppressed.";
      case EmFail_S390X_pfpo:
         return "Instruction pfpo is not supported on this host";
-     case EmFail_S390X_DFP_insn:
-        return "DFP instructions are not supported on this host";
      case EmFail_S390X_invalid_PFPO_rounding_mode:
         return "The rounding mode in GPR 0 for the PFPO instruction"
                " is invalid";
@@ -1914,7 +1912,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps )
    } hwcaps_list[] = {
       { VEX_HWCAPS_S390X_EIMM,  "eimm" },
       { VEX_HWCAPS_S390X_GIE,   "gie" },
-      { VEX_HWCAPS_S390X_DFP,   "dfp" },
       { VEX_HWCAPS_S390X_FGX,   "fgx" },
       { VEX_HWCAPS_S390X_ETF2,  "etf2" },
       { VEX_HWCAPS_S390X_ETF3,  "etf3" },
index 8ff333bc4669e419c8d3c2e583075a0f5d23308d..a1db9dbf6f826238d65deed3a6459cc5a54c6e4e 100644 (file)
@@ -164,7 +164,6 @@ typedef
 
 #define VEX_HWCAPS_S390X_EIMM  (1<<7)   /* Extended-immediate facility */
 #define VEX_HWCAPS_S390X_GIE   (1<<8)   /* General-instruction-extension facility */
-#define VEX_HWCAPS_S390X_DFP   (1<<9)   /* Decimal floating point facility */
 #define VEX_HWCAPS_S390X_FGX   (1<<10)  /* FPR-GR transfer facility */
 #define VEX_HWCAPS_S390X_ETF2  (1<<11)  /* ETF2-enhancement facility */
 #define VEX_HWCAPS_S390X_ETF3  (1<<13)  /* ETF3-enhancement facility */
@@ -187,7 +186,6 @@ typedef
 /* Special value representing all available s390x hwcaps */
 #define VEX_HWCAPS_S390X_ALL   (VEX_HWCAPS_S390X_EIMM  | \
                                 VEX_HWCAPS_S390X_GIE   | \
-                                VEX_HWCAPS_S390X_DFP   | \
                                 VEX_HWCAPS_S390X_FGX   | \
                                 VEX_HWCAPS_S390X_LSC   | \
                                 VEX_HWCAPS_S390X_ETF3  | \
index fc2053125fe0cb070507239b286a9dd9385e6dd4..8e0fc1349cb55650bb15f554e976805eb789a495 100644 (file)
@@ -97,9 +97,6 @@ typedef
       /* pfpo insn is not supported on this host */
       EmFail_S390X_pfpo,
 
-      /* DFP insns are not supported on this host */
-      EmFail_S390X_DFP_insn,
-
       /* GPR 0 contains invalid rounding mode for PFPO instruction */
       EmFail_S390X_invalid_PFPO_rounding_mode,
 
index a1fa59351c04658c33f94a0c55d7eaf22b74ad9f..4690163f4c319572a84659d4a327f927bed73061 100644 (file)
@@ -1567,7 +1567,6 @@ Bool VG_(machine_get_hwcaps)( void )
      } fac_hwcaps[] = {
         { False,  21,  VEX_HWCAPS_S390X_EIMM,  "EIMM"  },
         { False,  34,  VEX_HWCAPS_S390X_GIE,   "GIE"   },
-        { False,  42,  VEX_HWCAPS_S390X_DFP,   "DFP"   },
         { False,  41,  VEX_HWCAPS_S390X_FGX,   "FGX"   },
         { False,  24,  VEX_HWCAPS_S390X_ETF2,  "ETF2"  },
         { False,  30,  VEX_HWCAPS_S390X_ETF3,  "ETF3"  },
index 0423b34adf0c021a645c3df5593cad1543f19363..4ec0137dc0e13c4aeb5a64792d584cb01da92ac1 100644 (file)
@@ -1,2 +1 @@
 prog: dfp-1
-prereq: test -e dfp-1 && ../../../tests/s390x_features s390x-dfp
index 164632918e2c8c9a7ca309150326d868daa88069..0619fc3474fd63047d93f5579951d10ce8f7063f 100644 (file)
@@ -1,2 +1 @@
 prog: dfp-2
-prereq: test -e dfp-2 && ../../../tests/s390x_features s390x-dfp
index e2b5673e417874ebf41c3f955b21960c68489527..4748299daf3a912fa35ed292f02bd13d68495512 100644 (file)
@@ -1,2 +1 @@
 prog: dfp-3
-prereq: test -e dfp-3 && ../../../tests/s390x_features s390x-dfp
index 0ffc1a6d60a95437dda333af80e22fa9b32ee427..7591e189c9a45128932b1b5a30b899dc0f377df0 100644 (file)
@@ -1,2 +1 @@
 prog: dfp-4
-prereq: test -e dfp-4 && ../../../tests/s390x_features s390x-dfp
index 6f4b2d0fd52ef7bc922753abd28360f1fa97ec76..74979eb9bf85543067f0972a197757addcf91c2a 100644 (file)
@@ -1,3 +1,2 @@
-prereq: ../../../tests/s390x_features s390x-dfp
 prog: /bin/true
 post: ./emwarn-gen.pl --dfp-XiC
index 76cd8072641b9d8f6bd3c0bd431a2abdb1bd589d..0f29e3fd66ac3e5489584eac5f6b27522698746d 100644 (file)
@@ -1,3 +1,2 @@
-prereq: ../../../tests/s390x_features s390x-dfp
 prog: /bin/true
 post: ./emwarn-gen.pl --dfp-XxC
index 0b0f133b3f4fb44cdd7cd430281996684c2b702d..cf2468daa4f557585a0900d0402f76172da97d47 100644 (file)
@@ -1,2 +1 @@
 prog: dfpconv
-prereq: test -e dfpconv && ../../../tests/s390x_features s390x-dfp
index 9cca691585a1695b4a010b59878e85a3cce7cb4b..2347c39bcfb27a6bfc7ecc89e500118965094ed6 100644 (file)
@@ -1,2 +1 @@
 prog: dfpext
-prereq: test -e dfpext && ../../../tests/s390x_features s390x-dfp
index a6f12913915ec57aefe545af90ceb50c1f89f672..440c611b4185509db220d9ca678a83d30ca16eda 100644 (file)
@@ -1,2 +1 @@
 prog: dfptest
-prereq: test -e dfptest && ../../../tests/s390x_features s390x-dfp
index cb7a4485f77bf57e7b687c17eff43f3e281914bc..358127665bc213dbb3e397cc7cbb6997302010e9 100644 (file)
@@ -1,2 +1 @@
 prog: srnmt
-prereq: test -e srnmt && ../../../tests/s390x_features s390x-dfp
index 560fbb843bcca76edb4839097ab2033d50986564..1a5b4f5f786b4a6c5b010e274e92542ffd5b5b0a 100644 (file)
@@ -237,8 +237,6 @@ static int go(char *feature, char *cpu)
       match = facilities[0] & FAC_BIT(35);
    } else if (strcmp(feature, "s390x-etf3") == 0 ) {
       match = facilities[0] & FAC_BIT(30);
-   } else if (strcmp(feature, "s390x-dfp") == 0 ) {
-      match = facilities[0] & FAC_BIT(42);
    } else if (strcmp(feature, "s390x-pfpo") == 0 ) {
       match = facilities[0] & FAC_BIT(44);
    } else if (strcmp(feature, "s390x-highw") == 0 ) {