other frontends.
git-svn-id: svn://svn.valgrind.org/vex/trunk@2434
#define S390X_GUEST_OFFSET(x) offsetof(VexGuestS390XState, x)
/*------------------------------------------------------------*/
-/*--- Dirty Helper functions. ---*/
+/*--- Helper functions. ---*/
/*------------------------------------------------------------*/
void s390x_dirtyhelper_00(VexGuestS390XState *guest_state);
void s390x_dirtyhelper_EX(ULong torun);
ULong s390x_dirtyhelper_STCKE(ULong *addr);
ULong s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, HWord addr);
+UInt s390_do_cvb(ULong decimal);
+ULong s390_do_cvd(ULong binary);
+
/* The various ways to compute the condition code. */
enum {
S390_CC_OP_BITWISE = 0,
}
#endif /* VGA_s390x */
+
+/*------------------------------------------------------------*/
+/*--- Clean helper for "convert to binary". ---*/
+/*------------------------------------------------------------*/
+#if defined(VGA_s390x)
+UInt
+s390_do_cvb(ULong decimal)
+{
+ UInt binary;
+
+ __asm__ volatile (
+ "cvb %[result],%[input]\n\t"
+ : [result] "=d"(binary)
+ : [input] "m"(decimal)
+ );
+
+ return binary;
+}
+
+#else
+UInt s390_do_cvb(ULong decimal) { return 0; }
+#endif
+
+
+/*------------------------------------------------------------*/
+/*--- Clean helper for "convert to decimal". ---*/
+/*------------------------------------------------------------*/
+#if defined(VGA_s390x)
+ULong
+s390_do_cvd(ULong binary_in)
+{
+ UInt binary = binary_in & 0xffffffffULL;
+ ULong decimal;
+
+ __asm__ volatile (
+ "cvd %[input],%[result]\n\t"
+ : [result] "=m"(decimal)
+ : [input] "d"(binary)
+ );
+
+ return decimal;
+}
+
+#else
+ULong s390_do_cvd(ULong binary) { return 0; }
+#endif
+
+
/*------------------------------------------------------------*/
/*--- Helper for condition code. ---*/
/*------------------------------------------------------------*/
}
-static UInt
-s390_do_cvb(ULong decimal)
-{
-#if defined(VGA_s390x)
- UInt binary;
-
- __asm__ volatile (
- "cvb %[result],%[input]\n\t"
- : [result] "=d"(binary)
- : [input] "m"(decimal)
- );
-
- return binary;
-#else
- return 0;
-#endif
-}
-
static IRExpr *
s390_call_cvb(IRExpr *in)
{
}
-static ULong
-s390_do_cvd(ULong binary_in)
-{
-#if defined(VGA_s390x)
- UInt binary = binary_in & 0xffffffffULL;
- ULong decimal;
-
- __asm__ volatile (
- "cvd %[input],%[result]\n\t"
- : [result] "=m"(decimal)
- : [input] "d"(binary)
- );
-
- return decimal;
-#else
- return 0;
-#endif
-}
-
static IRExpr *
s390_call_cvd(IRExpr *in)
{