Messages in this thread Patch in this message | | | Date | Fri, 3 Dec 1999 08:18:04 +0100 (CET) | From | Mike Galbraith <> | Subject | Re: Breakage in arch/i386/kernel/time.c |
| |
On Thu, 2 Dec 1999, Richard Gooch wrote:
> Hi, all. I've just grabbed 2.3.30-pre4 (and -pre5 and -pre3) and got > the following rude shock: > gcc -D__KERNEL__ -I/home/kernel/v2.3/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -D__SMP__ -pipe -fno-strength-reduce -DCPU=586 -c -o time.o time.c > time.c: In function `do_gettimeofday': > time.c:262: fixed or forbidden register was spilled. > This may be due to a compiler bug or to impossible asm > statements or clauses. > cpp: output pipe has been closed > make[1]: *** [time.o] Error 1 > make[1]: Leaving directory `/home/kernel/v2.3/linux-2.3.30-pre5+devfs/arch/i386/kernel' > make: *** [_dir_arch/i386/kernel] Error 2 > > Relevant config section appended. I'm using gcc 2.7.2.f.1 (I've been > using this compiler for years). The problem appears in pre3 through > pre5. I didn't check earlier pre-patches. 2.3.28 doesn't have this > problem.
Yes, gcc-2.7.2.3 and gcc-2.8.1 also get into trouble. With the below, it will _compile_. (danger: I don't have an smp box to find out if it will actually _work_ too) Newer compilers don't have a problem with the original register selection.
-Mike
--- include/asm-i386/rwlock.h.org Fri Dec 3 07:55:43 1999 +++ include/asm-i386/rwlock.h Fri Dec 3 07:54:19 1999 @@ -31,7 +31,7 @@ "2:\tcall " helper "\n\t" \ "jmp 1b\n" \ ".previous" \ - ::"a" (rw) : "memory") + ::"r" (rw) : "memory") #define __build_read_lock_const(rw, helper) \ asm volatile(LOCK "subl $1,%0\n\t" \ @@ -61,7 +61,7 @@ "2:\tcall " helper "\n\t" \ "jmp 1b\n" \ ".previous" \ - ::"a" (rw) : "memory") + ::"r" (rw) : "memory") #define __build_write_lock_const(rw, helper) \ asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |