From owner-freebsd-mips@FreeBSD.ORG Thu Jun 18 04:01:00 2015 Return-Path: Delivered-To: freebsd-mips@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 286B1591 for ; Thu, 18 Jun 2015 04:01:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5443E12 for ; Thu, 18 Jun 2015 04:00:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iesa3 with SMTP id a3so47221759ies.2 for ; Wed, 17 Jun 2015 21:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=r/nh/5JaqUe9WyD/Vdnp3ynwnHczvpAeAPA83pHu+OA=; b=PTjnqva1FHWyao5FLYi/VnQHgi0KrvnV73SigktgdMiwJL5ZKV77lERYYbVmlJvvhE GaAvsYA+2jPhbFwohfK/Z2HI/zUMPJt4JPpJX/1HXPntuk9CjBZa92ognWeQrbHACHRs EFIoK9bbY8K8DM2lhIeZY6JdFms2JDN22Y0HkNnhdcZKBj4++d37Y3LPrPYvmUsHV69l DNngVEPgeRx4UUMAZaXiRxt+ar6mhzLmmIy/I655sKSpeYZpnBFEp6uiiBdsfH0T4OPj 6hb+rDFdxbPv35NW2yhKbGYjFDtb+ijmZsxErCI5wSLB40e3txb0+8gLqDA5VeG6VZcf BYmA== MIME-Version: 1.0 X-Received: by 10.107.5.210 with SMTP id 201mr8193338iof.88.1434600059310; Wed, 17 Jun 2015 21:00:59 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Wed, 17 Jun 2015 21:00:59 -0700 (PDT) In-Reply-To: <20150617235934.3d2c4c95@kan> References: <20150616011832.146e0f0e@kan> <20150617235934.3d2c4c95@kan> Date: Thu, 18 Jun 2015 00:00:59 -0400 X-Google-Sender-Auth: fNX7dLCi0J29OOV9DBuAlrLjOjw Message-ID: Subject: Re: [rfc] fix umul_ppmm() in our libgcc From: Adrian Chadd To: Alexander Kabaev Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2015 04:01:00 -0000 ok, i'm building a test image. (my kingdom for being able to run the freebsd unit tests with what's in src..) -a On 17 June 2015 at 23:59, Alexander Kabaev wrote: > On Wed, 17 Jun 2015 19:57:35 -0700 > Adrian Chadd wrote: > >> Ok, so this: >> >> adrian@lucy-11i386:~/work/freebsd/head-embedded-2/src/contrib/gcc % >> svn diff longlong.h >> Index: longlong.h >> =================================================================== >> --- longlong.h (revision 284394) >> +++ longlong.h (working copy) >> @@ -584,11 +584,11 @@ >> >> #if defined (__mips__) && W_TYPE_SIZE == 32 >> #define umul_ppmm(w1, w0, u, v) \ >> - __asm__ ("multu %2,%3" \ >> - : "=l" ((USItype) (w0)), \ >> - "=h" ((USItype) (w1)) \ >> - : "d" ((USItype) (u)), \ >> - "d" ((USItype) (v))) >> + do { \ >> + UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \ >> + w1 = __x >> 32; \ >> + w0 = __x; \ >> + } while (0) >> #define UMUL_TIME 10 >> #define UDIV_TIME 100 >> #endif /* __mips__ */ >> >> >> ? >> >> >> >> -a > > Looks good to me. > > -- > Alexander Kabaev