
|
[openbeos]
||
[Date Prev]
[08-2004 Date Index]
[Date Next]
||
[Thread Prev]
[08-2004 Thread Index]
[Thread Next]
[openbeos] Re: app_server: MMX/SSE help wanted
- From: Adi Oanca <adioanca@xxxxxxxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Mon, 09 Aug 2004 17:21:21 +0300
Hi,
Christian Packmann wrote:
Now, I have another question(s):
If GCC 3, app_server, media_kit and translators will all use MMX, how
can we be sure they won't collide with each other?
MMX runs in parallel with the CPU, but which thread has access to MMX
registers? The kernel also
manages this? How can MMX be used, do we need a separate thread with MMX
loops only?
MMX uses the FP registers to store data; these are saved when a task switch
occurs. That was the reason to implement MMX this way, so that it would
work with old operating systems without change.
With SSE and its extra registers, you need special OS support so that the
registers are correctly stored and recalled during task switches. As long
as the kernel supports this, no problem.
And if SSE works SSE2 should also work, as it doesn't add new registers,
but only new commands to work on the 128-bit regs.
Aha. OK.
Axel, will our kernel support SSE too? What about HyperThreading(or
this is == dual processor)?
What about the case where app_server_MMX is compiled with GCC3_MMX ?
Should GCC MMX support be disabled in this case?
Hm? MMX is nothing special, just some new x86 instructions. As long as the
compiler/assembler supports translating them, there shouldn't be any
special problems.
OK, then let me ask you something:
- MMX works in parallel with the CPU?
- that means you can have an algorithm running on the CPU and some loops running on MMX unit at the
same time?
- If this is the case, there must be a synchronization mechanism.
This is how I thought MMX is used.
BUT, it seems it is used more like this:
- Enter MMX mode.
- Execute MMX_code_loops (CPU is idle this time. (???)).
- Exit MMX mode.
- Continue execution of my thread.
Is this correct?
I made the wrong assumption that MMX is a... core of its own, and that in the same time the CPU
could process something else. Guess I was wrong!(?)
Adi.
|

|