[Top] [All Lists]

Re: [PATCH] MIPS: Handle removal of 'h' constraint in GCC 4.4

To: "Maciej W. Rozycki" <>
Subject: Re: [PATCH] MIPS: Handle removal of 'h' constraint in GCC 4.4
From: Richard Sandiford <>
Date: Sat, 27 Dec 2008 15:19:40 +0000
Cc: David Daney <>,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:from:to:mail-followup-to:cc :subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=4JbDEwZIkz+nUe0lsVFY4uwQqYFeoWPTEhHYtJ4D4ws=; b=CZaF0HY5GUOxhsHo/ah1vDzGcnqngjNLDYlVl5YlK3qBzdL5TkZjD3f8R/mhY5p5F0 GhYOlSl8jVGoQJ6rv2SyRVkFrElJFYTGBUjMXtoQlMi8y+JvAcI0luHRX7qoto5SKPOg kMvP/oiG0CYJP8jEKBAFvSAfGfOF9V097RXcY=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=from:to:mail-followup-to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=KIGGHB9mZntTOK6Rul6jLQOUI6LM2UnrIiYQZbCn+5Ek5gcdL81yXHqnvZh3pR1S9v nZXgdkD8Sequ2LTIz/6C4nTKMuboq7JobWN0ZyAGWgdjB3t+up7BqpOXG0HwK0osYWG1 0yxmTn0pPueuwv/558F29fT4sQdQqBB8W3W7o=
In-reply-to: <> (Maciej W. Rozycki's message of "Fri\, 19 Dec 2008 00\:46\:11 +0000 \(GMT\)")
Mail-followup-to: "Maciej W. Rozycki" <>,David Daney <>,,
Original-recipient: rfc822;
References: <> <>
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)
"Maciej W. Rozycki" <> writes:
> On Wed, 17 Dec 2008, David Daney wrote:
>> This is an incomplete proof of concept that I applied to be able to
>> build a 64 bit kernel with GCC-4.4.  It doesn't handle the 32 bit case
>> or the R4000_WAR case.
>  The R4000_WAR case can use the same C code -- GCC will adjust code 
> generated as necessary according to the -mfix-r4000 flag.  For the 32-bit 
> case I think the conclusion was the only way to get it working is to use 
> MFHI explicitly in the asm.

No, the same sort of cast, multiply and shift should work for 32-bit
code too.  I.e.:

                usecs = ((uint64_t)usecs * lpj) >> 32;

It should work for both -mfix-r4000 and -mno-fix-r4000.


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