On Mon, Aug 19, 2002 at 03:11:25PM -0500, Branden Robinson wrote: > On Mon, Aug 19, 2002 at 07:22:14PM +0100, Philip Blundell wrote: > > The kernel does have some support for emulating umul in software; see > > arch/sparc/kernel/traps.c::do_illegal_instruction. This code seems to > > only be enabled for sun4c and sun4, whereas the original poster > > mentioned he is using sun4m. > > Thanks, Phil! > > SPARC folks: is there such a thing as a 4m that doesn't implement the > umul instruction?
Alright. Here's the low down. - Yes, the Cypress is a whacky weird CPU. It supports sun4m mmu, but only v7 instructions (which excludes muldiv). - No, the kernel does not trap and patchup non-existent muldiv support. This is handled in libc. - Yes, this is a bug in xfree86. The dynamic loader in xfree86 tries to detect this. It used to work, but no longer does because glibc switched the _dl_hwcap symbol to be private (which means nothing outside of libc can access it). So, the xfree86 code would fall through on failing to read _dl_hwcap, and try to best guess the muldiv support via /proc/cpuinfo. It assumed that sun4m meant "yes, we have hw muldiv", which of course is wrong for Cypress. DaveM provided a quick patch that detects a "Cypress" MMU in /proc/cpuinfo and does not try to use hw muldiv in that case. I've sent that patch to Branden. -- Debian - http://www.debian.org/ Linux 1394 - http://linux1394.sourceforge.net/ Subversion - http://subversion.tigris.org/ Deqo - http://www.deqo.com/

