From owner-freebsd-mips@FreeBSD.ORG Mon Jun 15 16:08:14 2015 Return-Path: Delivered-To: freebsd-mips@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13181D51 for ; Mon, 15 Jun 2015 16:08:14 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f170.google.com (mail-ie0-f170.google.com [209.85.223.170]) (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 CF8011FD for ; Mon, 15 Jun 2015 16:08:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by iecrd14 with SMTP id rd14so34200869iec.3 for ; Mon, 15 Jun 2015 09:08:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=hDWpGgx1RbZxJSxp5VjDwCEq0fDF/zwn6TL5yoTubB4=; b=fzyhItz5SBZ9eH2y9zdv+eTlUuiPCFRheRXwdU3Iw2qxgcM4zwmWxtQbqvlP/IyFNH IlSmUQB9FtEh+9ZJEzuNWvTgSEk6sipZOZDtCg1gdMhLC277SI99CZxuXe+vSnIPQtyd ywuOY4jKmiUhwsYJ1jw8me8KWhi7wy0kRSY4a8XoHz+dw6/daj7jWS60HwuL6vAIrJ4W XxGcBUoyGhOQJHdVt5oNJe4KCzZUCz8590oxJ8SRPGW3Bfg7yvK1JtjKQIE1a+M9fcgQ pPyLykANHtt3Yqj6QrECXEkR6XvohLLpCw6cQO0AvwvDdoeCAmEV/2QobslJMk3G3Bem ok+A== X-Gm-Message-State: ALoCoQlp99OlmaCpk/yUf05N+zoQRdPOxsVRnjq4u2dB3v/Gw9gJn8zGkTkIKf2aiMBYMWWp8iiw X-Received: by 10.50.78.232 with SMTP id e8mr11780567igx.32.1434384492804; Mon, 15 Jun 2015 09:08:12 -0700 (PDT) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id p17sm7859620igr.15.2015.06.15.09.08.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Jun 2015 09:08:12 -0700 (PDT) Sender: Warner Losh Subject: Re: [rfc] fix umul_ppmm() in our libgcc Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4879EB78-93CC-45C8-8FEF-B77BC2137A68"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: Date: Mon, 15 Jun 2015 10:08:12 -0600 Cc: "freebsd-mips@freebsd.org" Message-Id: <47D07C4F-1AF3-4AD7-BFAA-76B0FD8BFFC4@bsdimp.com> References: To: Adrian Chadd X-Mailer: Apple Mail (2.2098) 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: Mon, 15 Jun 2015 16:08:14 -0000 --Apple-Mail=_4879EB78-93CC-45C8-8FEF-B77BC2137A68 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 13, 2015, at 4:41 PM, Adrian Chadd wrote: >=20 > Hi, >=20 > our libgcc in -base is very .. old. It chokes when compiling for > mips32. This patch seems to do the right thing. >=20 > Does anyone have any positive/negative feedback? What code does it generate? Something doesn=E2=80=99t look quite right, but I can=E2=80=99t quite = put my finger on it. Warner > Thanks, >=20 >=20 > -adrian >=20 >=20 > Index: contrib/gcc/longlong.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- contrib/gcc/longlong.h (revision 284090) > +++ contrib/gcc/longlong.h (working copy) > @@ -584,11 +584,11 @@ >=20 > #if defined (__mips__) && W_TYPE_SIZE =3D=3D 32 > #define umul_ppmm(w1, w0, u, v) \ > - __asm__ ("multu %2,%3" = \ > - : "=3Dl" ((USItype) (w0)), = \ > - "=3Dh" ((USItype) (w1)) = \ > - : "d" ((USItype) (u)), = \ > - "d" ((USItype) (v))) > + do { = \ > + UDItype __ll =3D (UDItype)(u) * (v); = \ > + w1 =3D __ll >> 32; = \ > + w0 =3D __ll; = \ > + } while (0) > #define UMUL_TIME 10 > #define UDIV_TIME 100 > #endif /* __mips__ */ > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to = "freebsd-mips-unsubscribe@freebsd.org" --Apple-Mail=_4879EB78-93CC-45C8-8FEF-B77BC2137A68 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVfvhsAAoJEGwc0Sh9sBEAE3sP/Ryyiyxg4eN6WMgy1pSy+3xp am4JIA5vPQrgd4kpzryz5Tq5s/uIr3rSOKKyHvFM47PUW5n/lpM08OdYzITR7BzV 0ducAaN9ohnzoG4rTJZH924mm42VHvpF/CgpIeALmZXvQqy9bGJKVQ27KfijD9/6 QE1bMPdzlh0Iuy6iUJsVcS1z0piY+8tDdzIbp8IGa2EHcNoMo9GeVKuiCLq89WHn IT7zJS+u3sCD54EKB24BG3ZL8UmQD8Lb5Qti4xBFmLxs9hdfofevcicZM9BNafAO UOiU3hgMlbb4t99Q+WLncdYg3AsDX5J2J/EJQ3TliYTT6u0jHKyW2e4BKYcsXkc+ yP7e0V1bU9Q15cZUzVT99ygonk9aqwTzroM6RPs2+XY4LDbuSgnSmqHRtEIy/HR3 3i2assbNOUBNh3QFdngNFLuCTmLnLKPWfLZpsOkGDkDnxtYwRbPL+Fy/8r6Bdt3x wYKiZn3bcTfMqrFlXLfyWUB4LCFsJpx5Ta0AJ5OG1RilmM8f8Q/1eOvUhq7YdJcN VYwOSmrCcd71t83HY8Pga3PKovsM+34bNamDlMrr+XMnqBR31v7KdMop898HOyvy j7OWU9otucJ8prgKWNOycN08sovgdsSczjg6KkRhEtlldd3XWviPI+IvOsOFLQ1I K5YNxSSCJUYehIa67xGM =w0mn -----END PGP SIGNATURE----- --Apple-Mail=_4879EB78-93CC-45C8-8FEF-B77BC2137A68--