From devel-owner@netwinder.org Tue Jan  5 17:52:14 1999
Received: from www.netwinder.org ([209.167.41.106]:11326 "EHLO www.netwinder.org" ident: "NO-IDENT-SERVICE[2]") by ada.ddns.org with ESMTP id <40465-28829>; Tue, 5 Jan 1999 17:52:00 -0500
Received: from localhost (mail@localhost)
	by www.netwinder.org (8.8.5/8.8.5) with SMTP id RAA09919;
	Tue, 5 Jan 1999 17:51:16 -0500
Received: by www.netwinder.org (bulk_mailer v1.11); Tue, 5 Jan 1999 17:51:13 -0500
Received: (from majordomo@localhost)
	by www.netwinder.org (8.8.5/8.8.5) id RAA09900
	for devel-list; Tue, 5 Jan 1999 17:51:12 -0500
X-Authentication-Warning: www.netwinder.org: majordomo set sender to owner-devel@netwinder.org using -f
Received: from tallyho.bc.nu (tallyho.bc.nu [194.168.151.65])
	by www.netwinder.org (8.8.5/8.8.5) with ESMTP id RAA09897
	for <devel@netwinder.org>; Tue, 5 Jan 1999 17:51:10 -0500
Received: from caramon.armlinux.org (galatea-15.cableol.net [194.168.16.15])
	by tallyho.bc.nu (8.8.7/8.8.7) with ESMTP id WAA28036
	for <devel@netwinder.org>; Tue, 5 Jan 1999 22:51:03 GMT
Received: from raistlin.armlinux.org (raistlin [192.168.0.3]) by caramon.armlinux.org (8.7.4/8.7.3) with ESMTP id TAA22495 for <devel@netwinder.org>; Tue, 5 Jan 1999 19:47:20 GMT
From: Russell King <rmk@arm.linux.org.uk>
Received: (from rmk@localhost) by raistlin.armlinux.org (8.7.4/8.7.3) id TAA00484 for devel@netwinder.org; Tue, 5 Jan 1999 19:48:54 GMT
Message-Id: <199901051948.TAA00484@raistlin.armlinux.org>
Subject: Re: Anyone using GMP?
To: devel@netwinder.org
Date: Tue, 5 Jan 1999 19:48:53 +0000 (GMT)
In-Reply-To: <9901059155.AA915551050@smtp.plaintree.com> from "rhatfield@plaintree.com" at Jan 5, 99 10:43:49 am
X-Location: london.england.earth.mulky-way.universe
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-devel@netwinder.org
Reply-To: devel@netwinder.org
Return-Path: <devel-owner@netwinder.org>
X-Orcpt: rfc822;acli@ada.ddns.org
Status: RO
Content-Length: 2799
Lines: 78

rhatfield@plaintree.com writes:
> I have the GMP library compiled for the Netwinder, but it is not working.  Does 
> anyone know of a version of GMP ported for Arm Linux?

The changes I made to gmp for ssh 1.2.26 (& 1.2.20) are:

--- ssh-1.2.20/gmp-2.0.2-ssh-2/gmp-impl.h.rmk   Tue Oct 29 23:01:52 1996
+++ ssh-1.2.20/gmp-2.0.2-ssh-2/gmp-impl.h       Sat Aug  9 20:54:33 1997
@@ -281,7 +281,7 @@

 #if SIZEOF_INT >= 4 /* otherwise fails on 16-bit machines */
 #if defined (__alpha)							\
- || (defined (__arm__) && defined (__ARMWEL__))				\
+ || (defined (__arm__) && defined (__ARMWEL__) && !defined (__linux__))	\
  || defined (__clipper__)						\
  || defined (__cris)							\
  || defined (__i386__) 						\
@@ -304,7 +304,7 @@
 };
 #else /* Need this as an #else since the tests aren't made exclusive.	*/
 #if defined (__a29k__) || defined (_AM29K)				\
- || defined (__arm__)							\
+ || (defined (__arm__) && !defined (__linux__))				\
  || (defined (__convex__) && defined (_IEEE_FLOAT_))			\
  || defined (__i370__) || defined (__mvs__)				\
  || defined (__mc68000__) || defined (__mc68020__) || defined (__NeXT__)\
@@ -330,6 +330,21 @@
     } s;
   double d;
 };
+#else
+#if (defined (__arm__) && defined(__linux__))
+#define _GMP_IEEE_FLOATS 1
+union ieee_double_extract
+{
+  struct
+    {
+      unsigned int manh:20;
+      unsigned int exp:11;
+      unsigned int sig:1;
+      unsigned int manl:32;
+    } s;
+  double d;
+};
+#endif
 #endif
 #endif
 #endif /* SIZEOF_INT >= 4 */
--- ssh-1.2.20/gmp-2.0.2-ssh-2/longlong.h.rmk	Tue Mar 25 06:20:56 1997
+++ ssh-1.2.20/gmp-2.0.2-ssh-2/longlong.h	Sat Aug  9 20:54:33 1997
@@ -193,9 +193,9 @@
 #define umul_ppmm(xh, xl, a, b) \
   __asm__ ("%@ Inlined umul_ppmm
	mov	%|r0, %2, lsr #16
-	mov	%|r2, %3, lsr #16
+	mov	%0, %3, lsr #16
	bic	%|r1, %2, %|r0, lsl #16
-	bic	%|r2, %3, %|r2, lsl #16
+	bic	%|r2, %3, %0, lsl #16
	mul	%1, %|r1, %|r2
	mul	%|r2, %|r0, %|r2
	mul	%|r1, %0, %|r1

This may help you find the problem.  SSH works wonderfully on all ARM platforms
with this patch applied (and a few minor changes to SSH itself).
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |         Russell King        rmk@arm.linux.org.uk      --- ---
  | | | |   http://www.arm.linux.org.uk/~rmk/aboutme.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
--
This list is run automagically by Majordomo 1.94.4
Please send email questions to owner-devel@netwinder.org
To UNSUBSCRIBE: email majordomo@netwinder.org with
"unsubscribe devel" as the body of your message.


