Remove SysRes::_valEx from common code as it is specific to mips.
ifdef'ed accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15117 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_syscall.c b/coregrind/m_syscall.c
index 0d7e1f0..9716a70 100644
--- a/coregrind/m_syscall.c
+++ b/coregrind/m_syscall.c
@@ -62,7 +62,6 @@
 
 SysRes VG_(mk_SysRes_x86_linux) ( Int val ) {
    SysRes res;
-   res._valEx   = 0; /* unused except on mips-linux */
    res._isError = val >= -4095 && val <= -1;
    if (res._isError) {
       res._val = (UInt)(-val);
@@ -75,7 +74,6 @@
 /* Similarly .. */
 SysRes VG_(mk_SysRes_amd64_linux) ( Long val ) {
    SysRes res;
-   res._valEx   = 0; /* unused except on mips-linux */
    res._isError = val >= -4095 && val <= -1;
    if (res._isError) {
       res._val = (ULong)(-val);
@@ -87,7 +85,6 @@
 
 SysRes VG_(mk_SysRes_tilegx_linux) ( Long val ) {
   SysRes res;
-  res._valEx   = 0; /* unused except on mips-linux */
   res._isError = val >= -4095 && val <= -1;
   if (res._isError) {
     res._val = (ULong)(-val);
@@ -101,7 +98,6 @@
 /* Note this must be in the bottom bit of the second arg */
 SysRes VG_(mk_SysRes_ppc32_linux) ( UInt val, UInt cr0so ) {
    SysRes res;
-   res._valEx   = 0; /* unused except on mips-linux */
    res._isError = (cr0so & 1) != 0;
    res._val     = val;
    return res;
@@ -110,7 +106,6 @@
 /* As per ppc32 version, cr0.so must be in l.s.b. of 2nd arg */
 SysRes VG_(mk_SysRes_ppc64_linux) ( ULong val, ULong cr0so ) {
    SysRes res;
-   res._valEx   = 0; /* unused except on mips-linux */
    res._isError = (cr0so & 1) != 0;
    res._val     = val;
    return res;
@@ -118,7 +113,6 @@
 
 SysRes VG_(mk_SysRes_s390x_linux) ( Long val ) {
    SysRes res;
-   res._valEx   = 0; /* unused except on mips-linux */
    res._isError = val >= -4095 && val <= -1;
    if (res._isError) {
       res._val = -val;
@@ -130,7 +124,6 @@
 
 SysRes VG_(mk_SysRes_arm_linux) ( Int val ) {
    SysRes res;
-   res._valEx   = 0; /* unused except on mips-linux */
    res._isError = val >= -4095 && val <= -1;
    if (res._isError) {
       res._val = (UInt)(-val);
@@ -142,7 +135,6 @@
 
 SysRes VG_(mk_SysRes_arm64_linux) ( Long val ) {
    SysRes res;
-   res._valEx   = 0; /* unused except on mips-linux */
    res._isError = val >= -4095 && val <= -1;
    if (res._isError) {
       res._val = (ULong)(-val);
@@ -152,6 +144,7 @@
    return res;
 }
 
+#if defined(VGA_mips64) || defined(VGA_mips32)
 /* MIPS uses a3 != 0 to flag an error */
 SysRes VG_(mk_SysRes_mips32_linux) ( UWord v0, UWord v1, UWord a3 ) {
    SysRes res;
@@ -169,11 +162,14 @@
    res._valEx   = v1;
    return res;
 }
+#endif
 
 /* Generic constructors. */
 SysRes VG_(mk_SysRes_Error) ( UWord err ) {
    SysRes r;
-   r._valEx   = 0; /* unused except on mips-linux */
+#if defined(VGA_mips64) || defined(VGA_mips32)
+   r._valEx   = 0;
+#endif
    r._isError = True;
    r._val     = err;
    return r;
@@ -181,7 +177,9 @@
 
 SysRes VG_(mk_SysRes_Success) ( UWord res ) {
    SysRes r;
-   r._valEx   = 0; /* unused except on mips-linux */
+#if defined(VGA_mips64) || defined(VGA_mips32)
+   r._valEx   = 0;
+#endif
    r._isError = False;
    r._val     = res;
    return r;
diff --git a/include/pub_tool_basics.h b/include/pub_tool_basics.h
index 80d6499..09b89d7 100644
--- a/include/pub_tool_basics.h
+++ b/include/pub_tool_basics.h
@@ -153,9 +153,11 @@
 #if defined(VGO_linux)
 typedef
    struct {
-      UWord _val;
-      UWord _valEx;   // only used on mips-linux
       Bool  _isError;
+      UWord _val;
+#if defined(VGA_mips64) || defined(VGA_mips32)
+      UWord _valEx;
+#endif
    }
    SysRes;
 #elif defined(VGO_darwin)
@@ -189,15 +191,17 @@
 static inline UWord sr_Res ( SysRes sr ) {
    return sr._isError ? 0 : sr._val;
 }
+#if defined(VGA_mips64) || defined(VGA_mips32)
 static inline UWord sr_ResEx ( SysRes sr ) {
    return sr._isError ? 0 : sr._valEx;
 }
+#endif
 static inline UWord sr_Err ( SysRes sr ) {
    return sr._isError ? sr._val : 0;
 }
+// FIXME: this function needs to be fixed for MIPS
 static inline Bool sr_EQ ( SysRes sr1, SysRes sr2 ) {
    return sr1._val == sr2._val
-       && sr1._valEx == sr2._valEx
        && sr1._isError == sr2._isError;
 }