From: "Bradley D. LaRonde" <brad@laronde.org>
To: <linux-mips@linux-mips.org>
Cc: "Eric Christopher" <echristo@redhat.com>,
"Daniel Jacobowitz" <dan@debian.org>
Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c
Date: Mon, 12 Apr 2004 21:23:27 -0400 [thread overview]
Message-ID: <053c01c420f5$ec230190$8d01010a@prefect> (raw)
In-Reply-To: 04f501c420f4$5563f620$8d01010a@prefect
OK, so this patch actually builds, and it sounds like it will do the job,
since "accum" means "hi and low", "lo" is already clobbered in all cases,
and either "hi" is the output and doesn't need clobbering (hunks 1, 2, and
4), or "hi" is already clobbered (hunk 3).
Regards,
Brad
diff -u -r1.1.1.1 time.c
--- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1
+++ arch/mips/kernel/time.c 13 Apr 2004 01:19:15 -0000
@@ -242,7 +242,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (sll32_usecs_per_cycle)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
@@ -297,7 +297,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (quotient)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
@@ -339,7 +339,7 @@
: "r" (timerhi), "m" (timerlo),
"r" (tmp), "r" (USECS_PER_JIFFY),
"r" (USECS_PER_JIFFY_FRAC)
- : "hi", "lo", "accum");
+ : "hi", "lo");
cached_quotient = quotient;
}
}
@@ -353,7 +353,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (quotient)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
----- Original Message -----
From: "Bradley D. LaRonde" <brad@laronde.org>
To: "Daniel Jacobowitz" <dan@debian.org>
Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com>
Sent: Monday, April 12, 2004 9:12 PM
Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi"
intime.c
> ----- Original Message -----
> From: "Daniel Jacobowitz" <dan@debian.org>
> To: "Bradley D. LaRonde" <brad@laronde.org>
> Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com>
> Sent: Monday, April 12, 2004 9:07 PM
> Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi"
> intime.c
>
>
> > On Mon, Apr 12, 2004 at 09:05:34PM -0400, Bradley D. LaRonde wrote:
> > > ----- Original Message -----
> > > From: "Eric Christopher" <echristo@redhat.com>
> > > To: "Bradley D. LaRonde" <brad@laronde.org>
> > > Cc: <linux-mips@linux-mips.org>
> > > Sent: Monday, April 12, 2004 9:02 PM
> > > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi"
> > > intime.c
> > >
> > >
> > > > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote:
> > > > > Uh oh, with this patch:
> > > > >
> > > > > ...
> > > > > time.c: In function `fixed_rate_gettimeoffset':
> > > > > time.c:242: error: can't find a register in class `HI_REG' while
> > > reloading
> > > > > `asm'
> > > > > ...
> > > >
> > > > > >
> > > > > > /*
> > > > > > * Due to possible jiffies inconsistencies, we need to
> check
> > > > > > @@ -339,7 +339,7 @@
> > > > > > : "r" (timerhi), "m" (timerlo),
> > > > > > "r" (tmp), "r"
> (USECS_PER_JIFFY),
> > > > > > "r" (USECS_PER_JIFFY_FRAC)
> > > > > > - : "hi", "lo", "accum");
> > > > > > + : "hi", "lo", "hi");
> > > > > > cached_quotient = quotient;
> > > >
> > > >
> > > > Maybe this hunk where you use "hi" twice for the same asm statement?
> > >
> > > Yeah, that's messed up, but it fails here too:
> > >
> > > @@ -242,7 +242,7 @@
> > > __asm__("multu %1,%2"
> > > : "=h" (res)
> > > : "r" (count), "r" (sll32_usecs_per_cycle)
> > > - : "lo", "accum");
> > > + : "lo", "hi");
> >
> > Because the asm is outputting something in HI - see the =h?
>
> Oh... yeah, I guess gcc knows that the output is clobbered. :-P
>
> So just remove the accum clobbers?
>
> Regards,
> Brad
>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: "Bradley D. LaRonde" <brad@laronde.org>
To: linux-mips@linux-mips.org
Cc: Eric Christopher <echristo@redhat.com>,
Daniel Jacobowitz <dan@debian.org>
Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c
Date: Mon, 12 Apr 2004 21:23:27 -0400 [thread overview]
Message-ID: <053c01c420f5$ec230190$8d01010a@prefect> (raw)
Message-ID: <20040413012327.4LMwhiOQdCpQdhA9fU1-o0ssopUS-vgwos391xaW9rY@z> (raw)
In-Reply-To: 04f501c420f4$5563f620$8d01010a@prefect
OK, so this patch actually builds, and it sounds like it will do the job,
since "accum" means "hi and low", "lo" is already clobbered in all cases,
and either "hi" is the output and doesn't need clobbering (hunks 1, 2, and
4), or "hi" is already clobbered (hunk 3).
Regards,
Brad
diff -u -r1.1.1.1 time.c
--- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1
+++ arch/mips/kernel/time.c 13 Apr 2004 01:19:15 -0000
@@ -242,7 +242,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (sll32_usecs_per_cycle)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
@@ -297,7 +297,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (quotient)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
@@ -339,7 +339,7 @@
: "r" (timerhi), "m" (timerlo),
"r" (tmp), "r" (USECS_PER_JIFFY),
"r" (USECS_PER_JIFFY_FRAC)
- : "hi", "lo", "accum");
+ : "hi", "lo");
cached_quotient = quotient;
}
}
@@ -353,7 +353,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (quotient)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
----- Original Message -----
From: "Bradley D. LaRonde" <brad@laronde.org>
To: "Daniel Jacobowitz" <dan@debian.org>
Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com>
Sent: Monday, April 12, 2004 9:12 PM
Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi"
intime.c
> ----- Original Message -----
> From: "Daniel Jacobowitz" <dan@debian.org>
> To: "Bradley D. LaRonde" <brad@laronde.org>
> Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com>
> Sent: Monday, April 12, 2004 9:07 PM
> Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi"
> intime.c
>
>
> > On Mon, Apr 12, 2004 at 09:05:34PM -0400, Bradley D. LaRonde wrote:
> > > ----- Original Message -----
> > > From: "Eric Christopher" <echristo@redhat.com>
> > > To: "Bradley D. LaRonde" <brad@laronde.org>
> > > Cc: <linux-mips@linux-mips.org>
> > > Sent: Monday, April 12, 2004 9:02 PM
> > > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi"
> > > intime.c
> > >
> > >
> > > > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote:
> > > > > Uh oh, with this patch:
> > > > >
> > > > > ...
> > > > > time.c: In function `fixed_rate_gettimeoffset':
> > > > > time.c:242: error: can't find a register in class `HI_REG' while
> > > reloading
> > > > > `asm'
> > > > > ...
> > > >
> > > > > >
> > > > > > /*
> > > > > > * Due to possible jiffies inconsistencies, we need to
> check
> > > > > > @@ -339,7 +339,7 @@
> > > > > > : "r" (timerhi), "m" (timerlo),
> > > > > > "r" (tmp), "r"
> (USECS_PER_JIFFY),
> > > > > > "r" (USECS_PER_JIFFY_FRAC)
> > > > > > - : "hi", "lo", "accum");
> > > > > > + : "hi", "lo", "hi");
> > > > > > cached_quotient = quotient;
> > > >
> > > >
> > > > Maybe this hunk where you use "hi" twice for the same asm statement?
> > >
> > > Yeah, that's messed up, but it fails here too:
> > >
> > > @@ -242,7 +242,7 @@
> > > __asm__("multu %1,%2"
> > > : "=h" (res)
> > > : "r" (count), "r" (sll32_usecs_per_cycle)
> > > - : "lo", "accum");
> > > + : "lo", "hi");
> >
> > Because the asm is outputting something in HI - see the =h?
>
> Oh... yeah, I guess gcc knows that the output is clobbered. :-P
>
> So just remove the accum clobbers?
>
> Regards,
> Brad
>
>
>
next prev parent reply other threads:[~2004-04-13 1:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-12 20:51 Work on IP30 Stanislaw Skowronek
2004-04-12 23:13 ` Ralf Baechle
2004-04-12 23:42 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c Bradley D. LaRonde
2004-04-12 23:42 ` Bradley D. LaRonde
2004-04-13 0:53 ` Bradley D. LaRonde
2004-04-13 0:53 ` Bradley D. LaRonde
2004-04-13 1:02 ` Eric Christopher
2004-04-13 1:05 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c Bradley D. LaRonde
2004-04-13 1:05 ` Bradley D. LaRonde
2004-04-13 1:07 ` Daniel Jacobowitz
2004-04-13 1:12 ` Bradley D. LaRonde
2004-04-13 1:12 ` Bradley D. LaRonde
2004-04-13 1:23 ` Bradley D. LaRonde [this message]
2004-04-13 1:23 ` Bradley D. LaRonde
2004-04-13 12:57 ` Maciej W. Rozycki
2004-04-18 2:39 ` Steven J. Hill
2004-04-19 11:50 ` Maciej W. Rozycki
2004-04-18 13:00 ` Ralf Baechle
2004-04-18 13:00 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='053c01c420f5$ec230190$8d01010a@prefect' \
--to=brad@laronde.org \
--cc=dan@debian.org \
--cc=echristo@redhat.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox