This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What about MIPS support?


On 08/05/2015 02:45 PM, Crestez Dan Leonard wrote:
> Hello,
> 
> Those patches were on top of an older version. I just rebased on top of latest release 2.8 and only encountered a minor conflict. There are no further conflicts when rebasing on top of latest master. I pushed the branches here:
> 
>     https://github.com/cdleonard/systemtap/commits/mips-2.8
>     https://github.com/cdleonard/systemtap/commits/mips-master
> 
> Regards,
> Leonard

Hi Leonard,

Thanks for the pointers to current git trees with the patches.  I found that the div instruction for the mips processor is not coded correctly and the "make installcheck" smoke test fails as a result.  Attached is a patch to fix that and allow the systemtap.base/arith.exp test to pass.  With this patch the mips-master branch will run the "make installcheck" testsuite on a 32-bit mips processor

-Will

diff --git a/runtime/linux/arith.c b/runtime/linux/arith.c
index 9f65711..9de9bb6 100644
--- a/runtime/linux/arith.c
+++ b/runtime/linux/arith.c
@@ -252,12 +252,14 @@ typedef union
 
 #elif defined (__mips__)
 
-#define umul_ppmm(w1, w0, u, v)                                        \
-  __asm__ ("multu %2,%3"                                               \
-          : "=l" ((USItype) (w0)),                                     \
-            "=h" ((USItype) (w1))                                      \
-          : "d" ((USItype) (u)),                                       \
-            "d" ((USItype) (v)))
+#define umul_ppmm(w1, w0, u, v)						\
+  __asm__ ("multu %2,%3\n"						\
+	   "mflo %0\n"							\
+	   "mfhi %1\n"							\
+	   : "=d" ((USItype) (w0)),					\
+	     "=d" ((USItype) (w1))					\
+	   : "d" ((USItype) (u)),					\
+	     "d" ((USItype) (v)))
 
 #if !defined (sub_ddmmss)
 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]