From: Florian Krohm Date: Sat, 6 Dec 2014 20:24:08 +0000 (+0000) Subject: Add a few more asserts. Fix a function prototype. X-Git-Tag: svn/VALGRIND_3_11_0^2~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17e817d8fe77469f4f085044335300fb1a62bc88;p=thirdparty%2Fvalgrind.git Add a few more asserts. Fix a function prototype. git-svn-id: svn://svn.valgrind.org/vex/trunk@3032 --- diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index 9afbc1cb87..78ca2efa43 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -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; } diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index cce67acacf..f358a950de 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -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;