Messages in this thread Patch in this message | | | Date | Sun, 8 Nov 1998 21:44:40 -0800 | From | Richard Henderson <> | Subject | Re: A patch for linux 2.1.127 |
| |
On Sun, Nov 08, 1998 at 11:28:29AM -0800, H.J. Lu wrote: > I don't know whom to blame. I have to say both. As you can see, > calibrate_tsc is just asm code written in the asm statement.
What are you smoking? Of course it is a compiler problem.
The problem is the sort of general small register class losage that has plagued us for some time, that is, silent failures when we run out of reload registers. Which is thankfully solved now by Bernd's recent herculean efforts.
Unfortunately, those patches are way too massive to go back to the 1.1 branch. For that I don't really know what to do.
I will note that as a workaround, there's no particular reason we need to force this second value into a register at all, since it will just be coped to %edx later.
r~
--- arch/i386/kernel/time.c.orig Sun Nov 8 21:35:18 1998 +++ arch/i386/kernel/time.c Sun Nov 8 21:36:44 1998 @@ -565,10 +565,9 @@ "movl %1, %%edx\n\t" "divl %%ecx\n\t" /* eax= 2^32 / (1 * TSC counts per microsecond) */ /* Return eax for the use of fast_gettimeoffset */ - "movl %%eax, %0\n\t" - : "=r" (retval) - : "r" (5 * 1000020/HZ) - : /* we clobber: */ "ax", "bx", "cx", "dx", "cc", "memory"); + : "=&a" (retval) + : "g" (5 * 1000020/HZ) + : /* we clobber: */ "bx", "cx", "dx", "cc", "memory"); return retval; } - 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/
| |