Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2001 02:10:38 -0700
From:      Michel LESPINASSE <walken@zoy.org>
To:        Guenter Bartsch <bartscgr@studbox.uni-stuttgart.de>, H}kan Hjort <d95hjort@dtek.chalmers.se>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, xine-dev <xine-devel@lists.sourceforge.net>
Subject:   Re: [xine-devel] FreeBSD 4.3 pthread implementation and FPU code
Message-ID:  <20010620021038.B7068@zoy.org>
In-Reply-To: <Pine.LNX.4.33.0106191431510.28949-100000@goofy.disney.gb>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010620021038.B7068>