From owner-freebsd-hackers Wed Jun 20 2:10:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from c1583255-a.smateo1.sfba.home.com (c1583255-a.smateo1.sfba.home.com [24.176.233.236]) by hub.freebsd.org (Postfix) with ESMTP id C0FF337B407 for ; Wed, 20 Jun 2001 02:10:38 -0700 (PDT) (envelope-from walken@c1583255-a.smateo1.sfba.home.com) Received: by c1583255-a.smateo1.sfba.home.com (Postfix, from userid 10000) id 95EB01ACFE; Wed, 20 Jun 2001 02:10:38 -0700 (PDT) Date: Wed, 20 Jun 2001 02:10:38 -0700 From: Michel LESPINASSE To: Guenter Bartsch , H}kan Hjort Cc: FreeBSD Hackers , xine-dev Subject: Re: [xine-devel] FreeBSD 4.3 pthread implementation and FPU code Message-ID: <20010620021038.B7068@zoy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.18i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Guenter, This code flips one bit in the eflags register, checking for the presense of the cpuid instruction. I'm not sure at all why this would have any side effects on any processor/OS combination - theorically there should be none... However H}kan had (if I remember right) already reported a problem with this cpu detection routine too. Can you try the updated code I put in mpeg2dec-cvs (basically I added one pushfl/popfl combo to avoid the bit change) and see if it helps ? Also H}kan can you refresh me on the problem you had with this routine and does the code update fix it ? On Tue, Jun 19, 2001 at 02:36:36PM +0200, Guenter Bartsch wrote: > while trying to get xine 0.5 (xine.sf.net) to work on freebsd I ran into > this problem: > > Thread has returned from sigreturn or longjmp > > after some debugging I found that disabling this part of the MMX-detection > code: > > asm ("pushfl\n\t" > "popl %0\n\t" > "movl %0,%1\n\t" > "xorl $0x200000,%0\n\t" > "pushl %0\n\t" > "popfl\n\t" > "pushfl\n\t" > "popl %0" > : "=a" (eax), > "=b" (ebx) > : > : "cc"); > > solved the problem. So, I was wondering if there's any known problem about > FPU code and freebsd's pthread implementation, is there maybe a problem > with fpu-registers/status that is not being safed on context-switching? > > Any comments on this would be appreciated. -- Michel "Walken" LESPINASSE Of course I think I'm right. If I thought I was wrong, I'd change my mind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message