This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: What about MIPS support?
- From: William Cohen <wcohen at redhat dot com>
- To: Crestez Dan Leonard <cdleonard at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 5 Aug 2015 21:30:51 -0400
- Subject: Re: What about MIPS support?
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot GSO dot 4 dot 64 dot 1208221222170 dot 28511 at infra-view11 dot cisco dot com> <5036AA9A dot 2010706 at redhat dot com> <Pine dot GSO dot 4 dot 64 dot 1210151336490 dot 19319 at infra-view11 dot cisco dot com> <55C204AC dot 4080106 at redhat dot com> <CAJdmCr+1s6JLW3DsGxbdqPcpnD1+wNo5VwAifm6UN-SWE+PKmw at mail dot gmail dot com> <55C23910 dot 4060707 at redhat dot com> <CAJdmCrLN3w6J3XHTCx0uMDQDAc6LB+5qC3o7Rr+KABAriwNATg at mail dot gmail dot com>
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) \