On Wed, Jan 17, 2007 at 06:03:08PM +0000, Andrew Haley wrote: > Gabriel Dos Reis writes: > > On Wed, 17 Jan 2007, Andrew Haley wrote: > > > > | > > | From a performance/convenience angle, the best place to handle this is > > | either libc or the kernel. > > > > Hmm, that is predicated on assumptions not convenient to users > > on targets that are not glibc-based or GNU/Linux-based. > > Well, if GNU libc/Linux/whatever can fix this bug in libc or the > kernel, so can anyone else.
If GCC winds up having to fix the bug in the compiler itself for PPC, then everyone could have the option of using a kernel fix or a compiler fix. But how are you going to do the kernel fix? What if the user did an integer divide and not a modulo? I suppose you could just say the result is undefined and patch up the quotient too.