linux-mips
[Top] [All Lists]

Re: [patch] MIPS/gcc: Revert removal of DImode shifts for 32-bit targets

To: Richard Sandiford <rsandifo@redhat.com>
Subject: Re: [patch] MIPS/gcc: Revert removal of DImode shifts for 32-bit targets
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Mon, 19 Jul 2004 19:33:14 +0200 (CEST)
Cc: Ralf Baechle <ralf@linux-mips.org>, gcc-patches@gcc.gnu.org, linux-mips@linux-mips.org
In-reply-to: <87hds49bmo.fsf@redhat.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.55.0407191648451.3667@jurand.ds.pg.gda.pl> <87hds49bmo.fsf@redhat.com>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 19 Jul 2004, Richard Sandiford wrote:

> > Linux relies on simple operations (addition/subtraction and shifts) on
> > "long long" variables being implemented inline without a call to
> > libgcc, which isn't linked in.
> 
> Sorry, but I don't think this is a reasonable expection for 64-bit
> shifts on 32-bit targets.  If linux insists on not using libgcc,

 See e.g: "http://www.ussg.iu.edu/hypermail/linux/kernel/0009.2/0655.html";  
for a rationale behind that.

> it should provide:
> 
> > After your change Linux has unresolved references to external __ashldi3(),
> > __ashrdi3() and __lshrdi3() functions at the final link.
> 
> ...these functions itself.

 Well, other targets, like the i386 (which didn't even have a 64-bit
variation till recently), do not force Linux to go through such
contortions.  I can't see a reason why MIPS should be different -- it's
not any harder to implement shifts for this processor than for an average
other platform.  Anyway, the patch works for me and it has been published
so that others can use it, thus I have no incentive to do anything else,
sorry.

  Maciej

<Prev in Thread] Current Thread [Next in Thread>