|
From: <sv...@va...> - 2012-09-06 03:13:52
|
florian 2012-09-06 04:13:22 +0100 (Thu, 06 Sep 2012)
New Revision: 2516
Log:
s390: Fix condition code computation for convert-to-fixed/logical
insns. Previously the condition code was computed based on the
to-be-converted value only. But that is not sufficient as testcase
none/tests/s390x/rounding-1 shows. The rounding mode needs to be
considered, too. Therefore, the rounding mode is now stored in the
flags thunk as well (in IRRoundingMode encoding). Note, that this is
done for *all* convert-to-fixed/logical insns. It's possible that some
of them do not need the rounding mode but I did not bother exploring
the fine print. Setting the rounding mode as it was on the incoming
insn certainly will not be detrimental so we can as well do it.
This patch fixes bugzilla #306054.
Modified files:
trunk/priv/guest_s390_defs.h
trunk/priv/guest_s390_helpers.c
trunk/priv/guest_s390_toIR.c
Modified: trunk/priv/guest_s390_helpers.c (+131 -20)
===================================================================
--- trunk/priv/guest_s390_helpers.c 2012-09-05 21:05:20 +01:00 (rev 2515)
+++ trunk/priv/guest_s390_helpers.c 2012-09-06 04:13:22 +01:00 (rev 2516)
@@ -41,6 +41,7 @@
#include "main_globals.h"
#include "guest_generic_bb_to_IR.h"
#include "guest_s390_defs.h"
+#include "host_s390_defs.h" /* S390_ROUND_xyzzy */
void
LibVEX_GuestS390X_initialise(VexGuestS390XState *state)
@@ -871,6 +872,20 @@
/*--- Helper for condition code. ---*/
/*------------------------------------------------------------*/
+/* Convert an IRRoundingMode value to s390_round_t */
+static s390_round_t
+decode_bfp_rounding_mode(UInt irrm)
+{
+ switch (irrm) {
+ case Irrm_NEAREST: return S390_ROUND_NEAREST_EVEN;
+ case Irrm_NegINF: return S390_ROUND_NEGINF;
+ case Irrm_PosINF: return S390_ROUND_POSINF;
+ case Irrm_ZERO: return S390_ROUND_ZERO;
+ }
+ vpanic("decode_bfp_rounding_mode");
+}
+
+
#define S390_CC_FOR_BINARY(opcode,cc_dep1,cc_dep2) \
({ \
__asm__ volatile ( \
@@ -934,50 +949,144 @@
psw >> 28; /* cc */ \
})
-#define S390_CC_FOR_BFP_CONVERT(opcode,cc_dep1) \
+#define S390_CC_FOR_BFP_CONVERT_AUX(opcode,cc_dep1,rounding_mode) \
({ \
__asm__ volatile ( \
- opcode " 0,0,%[op]\n\t" \
+ opcode " 0," #rounding_mode ",%[op]\n\t" \
"ipm %[psw]\n\t" : [psw] "=d"(psw) \
: [op] "f"(cc_dep1) \
: "cc", "r0");\
psw >> 28; /* cc */ \
})
-#define S390_CC_FOR_BFP_UCONVERT(opcode,cc_dep1) \
+#define S390_CC_FOR_BFP_CONVERT(opcode,cc_dep1,cc_dep2) \
+({ \
+ UInt cc; \
+ switch (decode_bfp_rounding_mode(cc_dep2)) { \
+ case S390_ROUND_NEAREST_EVEN: \
+ cc = S390_CC_FOR_BFP_CONVERT_AUX(opcode,cc_dep1,4); \
+ break; \
+ case S390_ROUND_ZERO: \
+ cc = S390_CC_FOR_BFP_CONVERT_AUX(opcode,cc_dep1,5); \
+ break; \
+ case S390_ROUND_POSINF: \
+ cc = S390_CC_FOR_BFP_CONVERT_AUX(opcode,cc_dep1,6); \
+ break; \
+ case S390_ROUND_NEGINF: \
+ cc = S390_CC_FOR_BFP_CONVERT_AUX(opcode,cc_dep1,7); \
+ break; \
+ default: \
+ vpanic("unexpected rounding mode"); \
+ } \
+ cc; \
+})
+
+#define S390_CC_FOR_BFP_UCONVERT_AUX(opcode,cc_dep1,rounding_mode) \
({ \
__asm__ volatile ( \
- opcode ",0,%[op],0,0\n\t" \
+ opcode ",0,%[op]," #rounding_mode ",0\n\t" \
"ipm %[psw]\n\t" : [psw] "=d"(psw) \
: [op] "f"(cc_dep1) \
: "cc", "r0");\
psw >> 28; /* cc */ \
})
-#define S390_CC_FOR_BFP128_CONVERT(opcode,hi,lo) \
+#define S390_CC_FOR_BFP_UCONVERT(opcode,cc_dep1,cc_dep2) \
+({ \
+ UInt cc; \
+ switch (decode_bfp_rounding_mode(cc_dep2)) { \
+ case S390_ROUND_NEAREST_EVEN: \
+ cc = S390_CC_FOR_BFP_UCONVERT_AUX(opcode,cc_dep1,4); \
+ break; \
+ case S390_ROUND_ZERO: \
+ cc = S390_CC_FOR_BFP_UCONVERT_AUX(opcode,cc_dep1,5); \
+ break; \
+ case S390_ROUND_POSINF: \
+ cc = S390_CC_FOR_BFP_UCONVERT_AUX(opcode,cc_dep1,6); \
+ break; \
+ case S390_ROUND_NEGINF: \
+ cc = S390_CC_FOR_BFP_UCONVERT_AUX(opcode,cc_dep1,7); \
+ break; \
+ default: \
+ vpanic("unexpected rounding mode"); \
+ } \
+ cc; \
+})
+
+#define S390_CC_FOR_BFP128_CONVERT_AUX(opcode,hi,lo,rounding_mode) \
({ \
__asm__ volatile ( \
"ldr 4,%[high]\n\t" \
"ldr 6,%[low]\n\t" \
- opcode " 0,0,4\n\t" \
+ opcode " 0," #rounding_mode ",4\n\t" \
"ipm %[psw]\n\t" : [psw] "=d"(psw) \
: [high] "f"(hi), [low] "f"(lo) \
: "cc", "r0", "f4", "f6");\
psw >> 28; /* cc */ \
})
-#define S390_CC_FOR_BFP128_UCONVERT(opcode,hi,lo) \
+#define S390_CC_FOR_BFP128_CONVERT(opcode,cc_dep1,cc_dep2,cc_ndep) \
+({ \
+ UInt cc; \
+ /* Recover the original DEP2 value. See comment near \
+ s390_cc_thunk_put3 for rationale. */ \
+ cc_dep2 = cc_dep2 ^ cc_ndep; \
+ switch (decode_bfp_rounding_mode(cc_ndep)) { \
+ case S390_ROUND_NEAREST_EVEN: \
+ cc = S390_CC_FOR_BFP128_CONVERT_AUX(opcode,cc_dep1,cc_dep2,4); \
+ break; \
+ case S390_ROUND_ZERO: \
+ cc = S390_CC_FOR_BFP128_CONVERT_AUX(opcode,cc_dep1,cc_dep2,5); \
+ break; \
+ case S390_ROUND_POSINF: \
+ cc = S390_CC_FOR_BFP128_CONVERT_AUX(opcode,cc_dep1,cc_dep2,6); \
+ break; \
+ case S390_ROUND_NEGINF: \
+ cc = S390_CC_FOR_BFP128_CONVERT_AUX(opcode,cc_dep1,cc_dep2,7); \
+ break; \
+ default: \
+ vpanic("unexpected rounding mode"); \
+ } \
+ cc; \
+})
+
+#define S390_CC_FOR_BFP128_UCONVERT_AUX(opcode,hi,lo,rounding_mode) \
({ \
__asm__ volatile ( \
"ldr 4,%[high]\n\t" \
"ldr 6,%[low]\n\t" \
- opcode ",0,4,0,0\n\t" \
+ opcode ",0,4," #rounding_mode ",0\n\t" \
"ipm %[psw]\n\t" : [psw] "=d"(psw) \
: [high] "f"(hi), [low] "f"(lo) \
: "cc", "r0", "f4", "f6");\
psw >> 28; /* cc */ \
})
+#define S390_CC_FOR_BFP128_UCONVERT(opcode,cc_dep1,cc_dep2,cc_ndep) \
+({ \
+ UInt cc; \
+ /* Recover the original DEP2 value. See comment near \
+ s390_cc_thunk_put3 for rationale. */ \
+ cc_dep2 = cc_dep2 ^ cc_ndep; \
+ switch (decode_bfp_rounding_mode(cc_ndep)) { \
+ case S390_ROUND_NEAREST_EVEN: \
+ cc = S390_CC_FOR_BFP128_UCONVERT_AUX(opcode,cc_dep1,cc_dep2,4); \
+ break; \
+ case S390_ROUND_ZERO: \
+ cc = S390_CC_FOR_BFP128_UCONVERT_AUX(opcode,cc_dep1,cc_dep2,5); \
+ break; \
+ case S390_ROUND_POSINF: \
+ cc = S390_CC_FOR_BFP128_UCONVERT_AUX(opcode,cc_dep1,cc_dep2,6); \
+ break; \
+ case S390_ROUND_NEGINF: \
+ cc = S390_CC_FOR_BFP128_UCONVERT_AUX(opcode,cc_dep1,cc_dep2,7); \
+ break; \
+ default: \
+ vpanic("unexpected rounding mode"); \
+ } \
+ cc; \
+})
+
#define S390_CC_FOR_BFP_TDC(opcode,cc_dep1,cc_dep2) \
({ \
__asm__ volatile ( \
@@ -1172,22 +1281,22 @@
return S390_CC_FOR_BFP128_RESULT(cc_dep1, cc_dep2);
case S390_CC_OP_BFP_32_TO_INT_32:
- return S390_CC_FOR_BFP_CONVERT("cfebr", cc_dep1);
+ return S390_CC_FOR_BFP_CONVERT("cfebr", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_64_TO_INT_32:
- return S390_CC_FOR_BFP_CONVERT("cfdbr", cc_dep1);
+ return S390_CC_FOR_BFP_CONVERT("cfdbr", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_128_TO_INT_32:
- return S390_CC_FOR_BFP128_CONVERT("cfxbr", cc_dep1, cc_dep2);
+ return S390_CC_FOR_BFP128_CONVERT("cfxbr", cc_dep1, cc_dep2, cc_ndep);
case S390_CC_OP_BFP_32_TO_INT_64:
- return S390_CC_FOR_BFP_CONVERT("cgebr", cc_dep1);
+ return S390_CC_FOR_BFP_CONVERT("cgebr", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_64_TO_INT_64:
- return S390_CC_FOR_BFP_CONVERT("cgdbr", cc_dep1);
+ return S390_CC_FOR_BFP_CONVERT("cgdbr", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_128_TO_INT_64:
- return S390_CC_FOR_BFP128_CONVERT("cgxbr", cc_dep1, cc_dep2);
+ return S390_CC_FOR_BFP128_CONVERT("cgxbr", cc_dep1, cc_dep2, cc_ndep);
case S390_CC_OP_BFP_TDC_32:
return S390_CC_FOR_BFP_TDC("tceb", cc_dep1, cc_dep2);
@@ -1202,22 +1311,24 @@
return cc_dep1;
case S390_CC_OP_BFP_32_TO_UINT_32:
- return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb39c0000", cc_dep1);
+ return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb39c0000", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_64_TO_UINT_32:
- return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb39d0000", cc_dep1);
+ return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb39d0000", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_128_TO_UINT_32:
- return S390_CC_FOR_BFP128_UCONVERT(".insn rrf,0xb39e0000", cc_dep1, cc_dep2);
+ return S390_CC_FOR_BFP128_UCONVERT(".insn rrf,0xb39e0000", cc_dep1,
+ cc_dep2, cc_ndep);
case S390_CC_OP_BFP_32_TO_UINT_64:
- return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb3ac0000", cc_dep1);
+ return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb3ac0000", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_64_TO_UINT_64:
- return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb3ad0000", cc_dep1);
+ return S390_CC_FOR_BFP_UCONVERT(".insn rrf,0xb3ad0000", cc_dep1, cc_dep2);
case S390_CC_OP_BFP_128_TO_UINT_64:
- return S390_CC_FOR_BFP128_UCONVERT(".insn rrf,0xb3ae0000", cc_dep1, cc_dep2);
+ return S390_CC_FOR_BFP128_UCONVERT(".insn rrf,0xb3ae0000", cc_dep1,
+ cc_dep2, cc_ndep);
default:
Modified: trunk/priv/guest_s390_toIR.c (+37 -24)
===================================================================
--- trunk/priv/guest_s390_toIR.c 2012-09-05 21:05:20 +01:00 (rev 2515)
+++ trunk/priv/guest_s390_toIR.c 2012-09-06 04:13:22 +01:00 (rev 2516)
@@ -8395,12 +8395,13 @@
} else {
IRTemp op = newTemp(Ity_F32);
IRTemp result = newTemp(Ity_I32);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_w0(r2));
- assign(result, binop(Iop_F32toI32U, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F32toI32U, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_w1(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_32_TO_UINT_32, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_32, op, rounding_mode);
}
return "clfebr";
}
@@ -8414,12 +8415,13 @@
} else {
IRTemp op = newTemp(Ity_F64);
IRTemp result = newTemp(Ity_I32);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_dw0(r2));
- assign(result, binop(Iop_F64toI32U, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F64toI32U, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_w1(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_64_TO_UINT_32, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_32, op, rounding_mode);
}
return "clfdbr";
}
@@ -8433,12 +8435,13 @@
} else {
IRTemp op = newTemp(Ity_F32);
IRTemp result = newTemp(Ity_I64);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_w0(r2));
- assign(result, binop(Iop_F32toI64U, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F32toI64U, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_dw0(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_32_TO_UINT_64, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_64, op, rounding_mode);
}
return "clgebr";
}
@@ -8452,12 +8455,13 @@
} else {
IRTemp op = newTemp(Ity_F64);
IRTemp result = newTemp(Ity_I64);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_dw0(r2));
- assign(result, binop(Iop_F64toI64U, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F64toI64U, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_dw0(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_64_TO_UINT_64, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_64, op, rounding_mode);
}
return "clgdbr";
}
@@ -8468,12 +8472,13 @@
{
IRTemp op = newTemp(Ity_F32);
IRTemp result = newTemp(Ity_I32);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_w0(r2));
- assign(result, binop(Iop_F32toI32S, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F32toI32S, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_w1(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_32_TO_INT_32, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_INT_32, op, rounding_mode);
return "cfebr";
}
@@ -8484,12 +8489,13 @@
{
IRTemp op = newTemp(Ity_F64);
IRTemp result = newTemp(Ity_I32);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_dw0(r2));
- assign(result, binop(Iop_F64toI32S, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F64toI32S, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_w1(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_64_TO_INT_32, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_INT_32, op, rounding_mode);
return "cfdbr";
}
@@ -8500,12 +8506,13 @@
{
IRTemp op = newTemp(Ity_F32);
IRTemp result = newTemp(Ity_I64);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_w0(r2));
- assign(result, binop(Iop_F32toI64S, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F32toI64S, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_dw0(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_32_TO_INT_64, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_INT_64, op, rounding_mode);
return "cgebr";
}
@@ -8516,12 +8523,13 @@
{
IRTemp op = newTemp(Ity_F64);
IRTemp result = newTemp(Ity_I64);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_dw0(r2));
- assign(result, binop(Iop_F64toI64S, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F64toI64S, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_dw0(r1, mkexpr(result));
- s390_cc_thunk_putF(S390_CC_OP_BFP_64_TO_INT_64, op);
+ s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_INT_64, op, rounding_mode);
return "cgdbr";
}
@@ -10430,12 +10438,13 @@
{
IRTemp op = newTemp(Ity_F128);
IRTemp result = newTemp(Ity_I32);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_pair(r2));
- assign(result, binop(Iop_F128toI32S, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F128toI32S, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_w1(r1, mkexpr(result));
- s390_cc_thunk_put1f128(S390_CC_OP_BFP_128_TO_INT_32, op);
+ s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_INT_32, op, rounding_mode);
return "cfxbr";
}
@@ -10449,12 +10458,13 @@
} else {
IRTemp op = newTemp(Ity_F128);
IRTemp result = newTemp(Ity_I32);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_pair(r2));
- assign(result, binop(Iop_F128toI32U, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F128toI32U, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_w1(r1, mkexpr(result));
- s390_cc_thunk_put1f128(S390_CC_OP_BFP_128_TO_UINT_32, op);
+ s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_32, op, rounding_mode);
}
return "clfxbr";
}
@@ -10466,12 +10476,13 @@
{
IRTemp op = newTemp(Ity_F128);
IRTemp result = newTemp(Ity_I64);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_pair(r2));
- assign(result, binop(Iop_F128toI64S, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F128toI64S, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_dw0(r1, mkexpr(result));
- s390_cc_thunk_put1f128(S390_CC_OP_BFP_128_TO_INT_64, op);
+ s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_INT_64, op, rounding_mode);
return "cgxbr";
}
@@ -10485,12 +10496,14 @@
} else {
IRTemp op = newTemp(Ity_F128);
IRTemp result = newTemp(Ity_I64);
+ IRTemp rounding_mode = encode_bfp_rounding_mode(m3);
assign(op, get_fpr_pair(r2));
- assign(result, binop(Iop_F128toI64U, mkexpr(encode_bfp_rounding_mode(m3)),
+ assign(result, binop(Iop_F128toI64U, mkexpr(rounding_mode),
mkexpr(op)));
put_gpr_dw0(r1, mkexpr(result));
- s390_cc_thunk_put1f128(S390_CC_OP_BFP_128_TO_UINT_64, op);
+ s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_64, op,
+ rounding_mode);
}
return "clgxbr";
}
Modified: trunk/priv/guest_s390_defs.h (+46 -46)
===================================================================
--- trunk/priv/guest_s390_defs.h 2012-09-05 21:05:20 +01:00 (rev 2515)
+++ trunk/priv/guest_s390_defs.h 2012-09-06 04:13:22 +01:00 (rev 2516)
@@ -149,52 +149,52 @@
S -- value is sign extended to 32 / 64 bit
F -- a binary floating point value
- +--------------------------------+-----------------------+----------------------+-------------+
- | op | cc_dep1 | cc_dep2 | cc_ndep |
- +--------------------------------+-----------------------+----------------------+-------------+
- | S390_CC_OP_BITWISE | Z result | | |
- | S390_CC_OP_SIGNED_COMPARE | S 1st operand | S 2nd operand | |
- | S390_CC_OP_UNSIGNED_COMPARE | Z 1st operand | Z 2nd operand | |
- | S390_CC_OP_SIGNED_ADD_32 | S 1st operand | S 2nd operand | |
- | S390_CC_OP_SIGNED_ADD_64 | S 1st operand | S 2nd operand | |
- | S390_CC_OP_UNSIGNED_ADD_32 | Z 1st operand | Z 2nd operand | |
- | S390_CC_OP_UNSIGNED_ADD_64 | Z 1st operand | Z 2nd operand | |
- | S390_CC_OP_UNSIGNED_ADDC_32 | Z 1st operand | Z 2nd operand | Z carry in |
- | S390_CC_OP_UNSIGNED_ADDC_64 | Z 1st operand | Z 2nd operand | Z carry in |
- | S390_CC_OP_SIGNED_SUB_32 | S left operand | S right operand | |
- | S390_CC_OP_SIGNED_SUB_64 | S left operand | S right operand | |
- | S390_CC_OP_UNSIGNED_SUB_32 | Z left operand | Z right operand | |
- | S390_CC_OP_UNSIGNED_SUB_64 | Z left operand | Z right operand | |
- | S390_CC_OP_UNSIGNED_SUBB_32 | Z left operand | Z right operand | Z borrow in |
- | S390_CC_OP_UNSIGNED_SUBB_64 | Z left operand | Z right operand | Z borrow in |
- | S390_CC_OP_LOAD_AND_TEST | S loaded value | | |
- | S390_CC_OP_LOAD_POSITIVE_32 | S loaded value | | |
- | S390_CC_OP_LOAD_POSITIVE_64 | S loaded value | | |
- | S390_CC_OP_TEST_UNDER_MASK_8 | Z tested value | Z mask | |
- | S390_CC_OP_TEST_UNDER_MASK_16 | Z tested value | Z mask | |
- | S390_CC_OP_SHIFT_LEFT_32 | Z value to be shifted | Z shift amount | |
- | S390_CC_OP_SHIFT_LEFT_64 | Z value to be shifted | Z shift amount | |
- | S390_CC_OP_INSERT_CHAR_MASK_32 | Z result | Z mask | |
- | S390_CC_OP_BFP_RESULT_32 | F result | | |
- | S390_CC_OP_BFP_RESULT_64 | F result | | |
- | S390_CC_OP_BFP_RESULT_128 | F result hi 64 bits | F result low 64 bits | |
- | S390_CC_OP_BFP_32_TO_INT_32 | F source | | |
- | S390_CC_OP_BFP_64_TO_INT_32 | F source | | |
- | S390_CC_OP_BFP_128_TO_INT_32 | F source hi 64 bits | F source low 64 bits | |
- | S390_CC_OP_BFP_32_TO_INT_64 | F source | | |
- | S390_CC_OP_BFP_64_TO_INT_64 | F source | | |
- | S390_CC_OP_BFP_128_TO_INT_64 | F source hi 64 bits | F source low 64 bits | |
- | S390_CC_OP_BFP_TDC_32 | F value | Z class | |
- | S390_CC_OP_BFP_TDC_64 | F value | Z class | |
- | S390_CC_OP_BFP_TDC_128 | F value hi 64 bits | F value low 64 bits | Z class |
- | S390_CC_OP_SET | Z condition code | | |
- | S390_CC_OP_BFP_32_TO_UINT_32 | F source | | |
- | S390_CC_OP_BFP_64_TO_UINT_32 | F source | | |
- | S390_CC_OP_BFP_128_TO_UINT_32 | F source hi 64 bits | F source low 64 bits | |
- | S390_CC_OP_BFP_32_TO_UINT_64 | F source | | |
- | S390_CC_OP_BFP_64_TO_UINT_64 | F source | | |
- | S390_CC_OP_BFP_128_TO_UINT_64 | F source hi 64 bits | F source low 64 bits | |
- +--------------------------------+-----------------------+----------------------+-------------+
+ +--------------------------------+-----------------------+----------------------+-----------------+
+ | op | cc_dep1 | cc_dep2 | cc_ndep |
+ +--------------------------------+-----------------------+----------------------+-----------------+
+ | S390_CC_OP_BITWISE | Z result | | |
+ | S390_CC_OP_SIGNED_COMPARE | S 1st operand | S 2nd operand | |
+ | S390_CC_OP_UNSIGNED_COMPARE | Z 1st operand | Z 2nd operand | |
+ | S390_CC_OP_SIGNED_ADD_32 | S 1st operand | S 2nd operand | |
+ | S390_CC_OP_SIGNED_ADD_64 | S 1st operand | S 2nd operand | |
+ | S390_CC_OP_UNSIGNED_ADD_32 | Z 1st operand | Z 2nd operand | |
+ | S390_CC_OP_UNSIGNED_ADD_64 | Z 1st operand | Z 2nd operand | |
+ | S390_CC_OP_UNSIGNED_ADDC_32 | Z 1st operand | Z 2nd operand | Z carry in |
+ | S390_CC_OP_UNSIGNED_ADDC_64 | Z 1st operand | Z 2nd operand | Z carry in |
+ | S390_CC_OP_SIGNED_SUB_32 | S left operand | S right operand | |
+ | S390_CC_OP_SIGNED_SUB_64 | S left operand | S right operand | |
+ | S390_CC_OP_UNSIGNED_SUB_32 | Z left operand | Z right operand | |
+ | S390_CC_OP_UNSIGNED_SUB_64 | Z left operand | Z right operand | |
+ | S390_CC_OP_UNSIGNED_SUBB_32 | Z left operand | Z right operand | Z borrow in |
+ | S390_CC_OP_UNSIGNED_SUBB_64 | Z left operand | Z right operand | Z borrow in |
+ | S390_CC_OP_LOAD_AND_TEST | S loaded value | | |
+ | S390_CC_OP_LOAD_POSITIVE_32 | S loaded value | | |
+ | S390_CC_OP_LOAD_POSITIVE_64 | S loaded value | | |
+ | S390_CC_OP_TEST_UNDER_MASK_8 | Z tested value | Z mask | |
+ | S390_CC_OP_TEST_UNDER_MASK_16 | Z tested value | Z mask | |
+ | S390_CC_OP_SHIFT_LEFT_32 | Z value to be shifted | Z shift amount | |
+ | S390_CC_OP_SHIFT_LEFT_64 | Z value to be shifted | Z shift amount | |
+ | S390_CC_OP_INSERT_CHAR_MASK_32 | Z result | Z mask | |
+ | S390_CC_OP_BFP_RESULT_32 | F result | | |
+ | S390_CC_OP_BFP_RESULT_64 | F result | | |
+ | S390_CC_OP_BFP_RESULT_128 | F result hi 64 bits | F result low 64 bits | |
+ | S390_CC_OP_BFP_32_TO_INT_32 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_64_TO_INT_32 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_128_TO_INT_32 | F source hi 64 bits | F source low 64 bits | Z rounding mode |
+ | S390_CC_OP_BFP_32_TO_INT_64 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_64_TO_INT_64 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_128_TO_INT_64 | F source hi 64 bits | F source low 64 bits | Z rounding mode |
+ | S390_CC_OP_BFP_TDC_32 | F value | Z class | |
+ | S390_CC_OP_BFP_TDC_64 | F value | Z class | |
+ | S390_CC_OP_BFP_TDC_128 | F value hi 64 bits | F value low 64 bits | Z class |
+ | S390_CC_OP_SET | Z condition code | | |
+ | S390_CC_OP_BFP_32_TO_UINT_32 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_64_TO_UINT_32 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_128_TO_UINT_32 | F source hi 64 bits | F source low 64 bits | Z rounding mode |
+ | S390_CC_OP_BFP_32_TO_UINT_64 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_64_TO_UINT_64 | F source | Z rounding mode | |
+ | S390_CC_OP_BFP_128_TO_UINT_64 | F source hi 64 bits | F source low 64 bits | Z rounding mode |
+ +--------------------------------+-----------------------+----------------------+-----------------+
*/
/*------------------------------------------------------------*/
|