From: Florian Krohm Date: Sun, 9 Dec 2012 02:06:29 +0000 (+0000) Subject: Use VEX types. X-Git-Tag: svn/VALGRIND_3_9_0^2~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d03c1a0d20917c2bbb02f2965732df674e47d5c;p=thirdparty%2Fvalgrind.git Use VEX types. git-svn-id: svn://svn.valgrind.org/vex/trunk@2584 --- diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index b0c0225519..1b56e1826a 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -41,7 +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 */ +#include "host_s390_defs.h" /* S390_BFP_ROUND_xyzzy */ void LibVEX_GuestS390X_initialise(VexGuestS390XState *state) @@ -251,7 +251,7 @@ s390x_dirtyhelper_EX(ULong torun) ULong s390x_dirtyhelper_STCK(ULong *addr) { - int cc; + UInt cc; asm volatile("stck %0\n" "ipm %1\n" @@ -263,7 +263,7 @@ s390x_dirtyhelper_STCK(ULong *addr) ULong s390x_dirtyhelper_STCKE(ULong *addr) { - int cc; + UInt cc; asm volatile("stcke %0\n" "ipm %1\n" @@ -274,7 +274,7 @@ s390x_dirtyhelper_STCKE(ULong *addr) ULong s390x_dirtyhelper_STCKF(ULong *addr) { - int cc; + UInt cc; asm volatile(".insn s,0xb27c0000,%0\n" "ipm %1\n" diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 4d87ebf570..81f827e69c 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -41,7 +41,7 @@ #include "guest_generic_bb_to_IR.h" /* DisResult */ #include "guest_s390_defs.h" /* prototypes for this file's functions */ #include "s390_disasm.h" -#include "host_s390_defs.h" /* S390_ROUND_xyzzy */ +#include "host_s390_defs.h" /* S390_BFP_ROUND_xyzzy */ /*------------------------------------------------------------*/ @@ -9429,7 +9429,7 @@ s390_irgen_TR_EX(IRTemp length, IRTemp start1, IRTemp start2) static void s390_irgen_EX_SS(UChar r, IRTemp addr2, void (*irgen)(IRTemp length, IRTemp start1, IRTemp start2), - int lensize) + UInt lensize) { struct SS { unsigned int op : 8; @@ -11947,7 +11947,7 @@ s390_irgen_CU21(UChar m3, UChar r1, UChar r2) /* To store the bytes construct 4 dirty helper calls. The helper calls are guarded (num_bytes == 1, num_bytes == 2, etc) such that only one of them will be called at runtime. */ - int i; + UInt i; for (i = 1; i <= 4; ++i) { IRDirty *d; @@ -12243,7 +12243,7 @@ s390_irgen_CU41(UChar r1, UChar r2) /* To store the bytes construct 4 dirty helper calls. The helper calls are guarded (num_bytes == 1, num_bytes == 2, etc) such that only one of them will be called at runtime. */ - int i; + UInt i; for (i = 1; i <= 4; ++i) { IRDirty *d; @@ -12562,8 +12562,8 @@ s390_decode_2byte_and_irgen(UChar *bytes) vassert(sizeof(formats) == 2); - ((char *)(&ovl.value))[0] = bytes[0]; - ((char *)(&ovl.value))[1] = bytes[1]; + ((UChar *)(&ovl.value))[0] = bytes[0]; + ((UChar *)(&ovl.value))[1] = bytes[1]; switch (ovl.value & 0xffff) { case 0x0101: /* PR */ goto unimplemented; @@ -12761,10 +12761,10 @@ s390_decode_4byte_and_irgen(UChar *bytes) vassert(sizeof(formats) == 4); - ((char *)(&ovl.value))[0] = bytes[0]; - ((char *)(&ovl.value))[1] = bytes[1]; - ((char *)(&ovl.value))[2] = bytes[2]; - ((char *)(&ovl.value))[3] = bytes[3]; + ((UChar *)(&ovl.value))[0] = bytes[0]; + ((UChar *)(&ovl.value))[1] = bytes[1]; + ((UChar *)(&ovl.value))[2] = bytes[2]; + ((UChar *)(&ovl.value))[3] = bytes[3]; switch ((ovl.value & 0xff0f0000) >> 16) { case 0xa500: s390_format_RI_RU(s390_irgen_IIHH, ovl.fmt.RI.r1, @@ -13834,14 +13834,14 @@ s390_decode_6byte_and_irgen(UChar *bytes) vassert(sizeof(formats) == 6); - ((char *)(&ovl.value))[0] = bytes[0]; - ((char *)(&ovl.value))[1] = bytes[1]; - ((char *)(&ovl.value))[2] = bytes[2]; - ((char *)(&ovl.value))[3] = bytes[3]; - ((char *)(&ovl.value))[4] = bytes[4]; - ((char *)(&ovl.value))[5] = bytes[5]; - ((char *)(&ovl.value))[6] = 0x0; - ((char *)(&ovl.value))[7] = 0x0; + ((UChar *)(&ovl.value))[0] = bytes[0]; + ((UChar *)(&ovl.value))[1] = bytes[1]; + ((UChar *)(&ovl.value))[2] = bytes[2]; + ((UChar *)(&ovl.value))[3] = bytes[3]; + ((UChar *)(&ovl.value))[4] = bytes[4]; + ((UChar *)(&ovl.value))[5] = bytes[5]; + ((UChar *)(&ovl.value))[6] = 0x0; + ((UChar *)(&ovl.value))[7] = 0x0; switch ((ovl.value >> 16) & 0xff00000000ffULL) { case 0xe30000000002ULL: s390_format_RXY_RRRD(s390_irgen_LTG, ovl.fmt.RXY.r1, diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 28b9cf8c04..dde258934d 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -3986,7 +3986,7 @@ s390_emit_LOCG(UChar *p, UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) static __inline__ Bool uint_fits_signed_16bit(UInt val) { - int v = val & 0xFFFFu; + Int v = val & 0xFFFFu; /* sign extend */ v = (v << 16) >> 16; diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 6d21d08688..c3aacde07e 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -47,8 +47,8 @@ HReg s390_hreg_guest_state_pointer(void); /* Given the index of a function argument, return the number of the general purpose register in which it is being passed. Arguments are counted 0, 1, 2, ... and they are being passed in r2, r3, r4, ... */ -static __inline__ unsigned -s390_gprno_from_arg_index(unsigned ix) +static __inline__ UInt +s390_gprno_from_arg_index(UInt ix) { return ix + 2; } diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c index 246744f58c..f5010a4b1c 100644 --- a/VEX/priv/host_s390_isel.c +++ b/VEX/priv/host_s390_isel.c @@ -405,8 +405,8 @@ s390_opnd_imm(ULong value) } -/* Return 1, if EXPR represents the cosntant 0 */ -static int +/* Return 1, if EXPR represents the constant 0 */ +static Bool s390_expr_is_const_zero(IRExpr *expr) { ULong value; @@ -2968,7 +2968,7 @@ s390_isel_stmt(ISelEnv *env, IRStmt *stmt) /*---------------------------------------------------------*/ static void -iselNext(ISelEnv *env, IRExpr *next, IRJumpKind jk, int offsIP) +iselNext(ISelEnv *env, IRExpr *next, IRJumpKind jk, Int offsIP) { if (vex_traceflags & VEX_TRACE_VCODE) { vex_printf("\n-- PUT(%d) = ", offsIP); diff --git a/VEX/priv/s390_disasm.c b/VEX/priv/s390_disasm.c index dfbb6675a9..66cdbd3723 100644 --- a/VEX/priv/s390_disasm.c +++ b/VEX/priv/s390_disasm.c @@ -279,7 +279,7 @@ void s390_disasm(UInt command, ...) { va_list args; - unsigned argkind; + UInt argkind; HChar buf[128]; /* holds the disassembled insn */ HChar *p; HChar separator;