|
From: <sv...@va...> - 2012-12-09 02:06:38
|
florian 2012-12-09 02:06:29 +0000 (Sun, 09 Dec 2012)
New Revision: 2584
Log:
Use VEX types.
Modified files:
trunk/priv/guest_s390_helpers.c
trunk/priv/guest_s390_toIR.c
trunk/priv/host_s390_defs.c
trunk/priv/host_s390_defs.h
trunk/priv/host_s390_isel.c
trunk/priv/s390_disasm.c
Modified: trunk/priv/guest_s390_helpers.c (+4 -4)
===================================================================
--- trunk/priv/guest_s390_helpers.c 2012-12-07 04:42:53 +00:00 (rev 2583)
+++ trunk/priv/guest_s390_helpers.c 2012-12-09 02:06:29 +00:00 (rev 2584)
@@ -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 @@
ULong
s390x_dirtyhelper_STCK(ULong *addr)
{
- int cc;
+ UInt cc;
asm volatile("stck %0\n"
"ipm %1\n"
@@ -263,7 +263,7 @@
ULong
s390x_dirtyhelper_STCKE(ULong *addr)
{
- int cc;
+ UInt cc;
asm volatile("stcke %0\n"
"ipm %1\n"
@@ -274,7 +274,7 @@
ULong s390x_dirtyhelper_STCKF(ULong *addr)
{
- int cc;
+ UInt cc;
asm volatile(".insn s,0xb27c0000,%0\n"
"ipm %1\n"
Modified: trunk/priv/host_s390_isel.c (+3 -3)
===================================================================
--- trunk/priv/host_s390_isel.c 2012-12-07 04:42:53 +00:00 (rev 2583)
+++ trunk/priv/host_s390_isel.c 2012-12-09 02:06:29 +00:00 (rev 2584)
@@ -405,8 +405,8 @@
}
-/* 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 @@
/*---------------------------------------------------------*/
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);
Modified: trunk/priv/guest_s390_toIR.c (+18 -18)
===================================================================
--- trunk/priv/guest_s390_toIR.c 2012-12-07 04:42:53 +00:00 (rev 2583)
+++ trunk/priv/guest_s390_toIR.c 2012-12-09 02:06:29 +00:00 (rev 2584)
@@ -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 @@
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 @@
/* 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 @@
/* 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 @@
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 @@
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 @@
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,
Modified: trunk/priv/s390_disasm.c (+1 -1)
===================================================================
--- trunk/priv/s390_disasm.c 2012-12-07 04:42:53 +00:00 (rev 2583)
+++ trunk/priv/s390_disasm.c 2012-12-09 02:06:29 +00:00 (rev 2584)
@@ -279,7 +279,7 @@
s390_disasm(UInt command, ...)
{
va_list args;
- unsigned argkind;
+ UInt argkind;
HChar buf[128]; /* holds the disassembled insn */
HChar *p;
HChar separator;
Modified: trunk/priv/host_s390_defs.h (+2 -2)
===================================================================
--- trunk/priv/host_s390_defs.h 2012-12-07 04:42:53 +00:00 (rev 2583)
+++ trunk/priv/host_s390_defs.h 2012-12-09 02:06:29 +00:00 (rev 2584)
@@ -47,8 +47,8 @@
/* 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;
}
Modified: trunk/priv/host_s390_defs.c (+1 -1)
===================================================================
--- trunk/priv/host_s390_defs.c 2012-12-07 04:42:53 +00:00 (rev 2583)
+++ trunk/priv/host_s390_defs.c 2012-12-09 02:06:29 +00:00 (rev 2584)
@@ -3986,7 +3986,7 @@
static __inline__ Bool
uint_fits_signed_16bit(UInt val)
{
- int v = val & 0xFFFFu;
+ Int v = val & 0xFFFFu;
/* sign extend */
v = (v << 16) >> 16;
|