Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 2015 10:08:12 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: [rfc] fix umul_ppmm() in our libgcc
Message-ID:  <47D07C4F-1AF3-4AD7-BFAA-76B0FD8BFFC4@bsdimp.com>
In-Reply-To: <CAJ-Vmonsmu5dGtWKhJchzZfSsVUjtwEVSEij4u6kwk64E0ZOXw@mail.gmail.com>
References:  <CAJ-Vmonsmu5dGtWKhJchzZfSsVUjtwEVSEij4u6kwk64E0ZOXw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <adrian@freebsd.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47D07C4F-1AF3-4AD7-BFAA-76B0FD8BFFC4>