]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add a few more asserts. Fix a function prototype.
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 6 Dec 2014 20:24:08 +0000 (20:24 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 6 Dec 2014 20:24:08 +0000 (20:24 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@3032

VEX/priv/guest_s390_helpers.c
VEX/priv/host_s390_defs.c

index 9afbc1cb879b4a49c524606647e7d16296ef07ce..78ca2efa43023af16ce058460ce921159789b57f 100644 (file)
@@ -1811,7 +1811,7 @@ s390_calculate_cond(ULong mask, ULong op, ULong dep1, ULong dep2, ULong ndep)
 
 
 static inline Bool
-isC64(IRExpr *expr)
+isC64(const IRExpr *expr)
 {
    return expr->tag == Iex_Const && expr->Iex.Const.con->tag == Ico_U64;
 }
index cce67acacf7091f44cc5c3159ba1e833d6d53653..f358a950debb2a3c5b87e0df3a9b8f97b34f6da0 100644 (file)
@@ -2907,6 +2907,8 @@ s390_emit_MVI(UChar *p, UChar i2, UChar b1, UShort d1)
 static UChar *
 s390_emit_MVHHI(UChar *p, UChar b1, UShort d1, UShort i2)
 {
+   vassert(s390_host_has_gie);
+
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       s390_disasm(ENC3(MNM, UDXB, INT), "mvhhi", d1, 0, b1, i2);
 
@@ -2917,6 +2919,8 @@ s390_emit_MVHHI(UChar *p, UChar b1, UShort d1, UShort i2)
 static UChar *
 s390_emit_MVHI(UChar *p, UChar b1, UShort d1, UShort i2)
 {
+   vassert(s390_host_has_gie);
+
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       s390_disasm(ENC3(MNM, UDXB, INT), "mvhi", d1, 0, b1, i2);
 
@@ -2927,6 +2931,8 @@ s390_emit_MVHI(UChar *p, UChar b1, UShort d1, UShort i2)
 static UChar *
 s390_emit_MVGHI(UChar *p, UChar b1, UShort d1, UShort i2)
 {
+   vassert(s390_host_has_gie);
+
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
       s390_disasm(ENC3(MNM, UDXB, INT), "mvghi", d1, 0, b1, i2);
 
@@ -6300,6 +6306,8 @@ s390_insn_madd(UChar size, s390_amode *dst, UChar delta, ULong value)
    /* This insn will be mapped to an ASI or AGSI so we can only allow base
       register plus 12-bit / 20-bit displacement. */
    vassert(dst->tag == S390_AMODE_B12 || dst->tag == S390_AMODE_B20);
+   /* ASI and AGSI require the GIE facility */
+   vassert(s390_host_has_gie);
 
    insn->tag  = S390_INSN_MADD;
    insn->size = size;