* [PATCH] Fix gcc-3.4.x compilation
@ 2004-07-26 10:37 Thomas Koeller
2004-07-27 9:46 ` Richard Sandiford
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Koeller @ 2004-07-26 10:37 UTC (permalink / raw)
To: linux-mips
Hi,
compilation of the kernel with a 3.4.x compiler does not
work, because that compiler does no longer recognize
the 'accum' register pair specifier. This can easily be
fixed (patch attached). Since the meaning of 'accum'
used to be 'hi' and 'lo', all its uses were clearly
redundant.
--- linux-mips/arch/mips/kernel/time.c 2004-07-26 12:15:25.302897080 +0200
+++ linux-mips-work/arch/mips/kernel/time.c 2004-07-15 14:52:18.000000000 +0200
@@ -278,7 +278,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
@@ -333,7 +333,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (quotient)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
@@ -375,7 +375,7 @@
: "r" (timerhi), "m" (timerlo),
"r" (tmp), "r" (USECS_PER_JIFFY),
"r" (USECS_PER_JIFFY_FRAC)
- : "hi", "lo", "accum");
+ : "hi", "lo");
cached_quotient = quotient;
}
}
@@ -389,7 +389,7 @@
__asm__("multu %1,%2"
: "=h" (res)
: "r" (count), "r" (quotient)
- : "lo", "accum");
+ : "lo");
/*
* Due to possible jiffies inconsistencies, we need to check
--
--------------------------------------------------
Thomas Koeller, Software Development
Basler Vision Technologies
thomas dot koeller at baslerweb dot com
http://www.baslerweb.com
==============================
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Fix gcc-3.4.x compilation
2004-07-26 10:37 [PATCH] Fix gcc-3.4.x compilation Thomas Koeller
@ 2004-07-27 9:46 ` Richard Sandiford
0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2004-07-27 9:46 UTC (permalink / raw)
To: Thomas Koeller; +Cc: linux-mips
Thomas Koeller <thomas.koeller@baslerweb.com> writes:
> Since the meaning of 'accum' used to be 'hi' and 'lo', all its uses
> were clearly redundant.
For the record, that isn't quite true. GCC internally treated
"accum" as an entirely separate register (which is why it became
such a headache). In theory, if you have an instruction that
clobbers lo and hi, but doesn't clobber "accum", gcc might think
that a value in "accum" will still be valid.
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-27 9:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-26 10:37 [PATCH] Fix gcc-3.4.x compilation Thomas Koeller
2004-07-27 9:46 ` Richard Sandiford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox