[Web] Analysis: x86 Vs PPC | ANN.lu |
Posted on 09-Jul-2003 21:21 GMT by Hagge | 38 comments View flat View list |
It's up, created by Nicholas Blachford, read it all on osnews.
|
|
List of all comments to this article |
Analysis: x86 Vs PPC : Comment 25 of 38 | ANN.lu |
Posted by Megol on 10-Jul-2003 19:23 GMT | In reply to Comment 14 (Chain|Q): "Anyway, the most painful part of the x86 architecture is the FPU, since the x86 has no linear address space, but it's some weird kind of a stack. So on x86, you just can't fmove.l (a0),fp3, and then fmul fp2,fp3, because you only can move values to the top of the stack (all values moves down then) and you can only make operations on the value currently at the top of the stack. Of course there is an instruction, which swaps two values in the stack, but this makes overhead simply not exists on architectures using linear FPU register set."
The overhead is not that great in practice as (using Athlon as an example) the swap instruction is treated as a FNOP(==Floating point No OPeration) and the x86 can use memory operands to replace register accesses.
So your code above would translate to (if 'fp2's value is first on the stack):
fmul dword ptr [eax]
"Other difference, compared to the 68k for example, that you cannot move values directly between the CPU and the FPU, you have to store the value to the memory first, and then move to the FPU."
I thought most "RISC" architectures required this too?
"So this makes FPU coding on x86 difficult, and also makes the FPU unnecessarily complex, and ineffective."
Well the x86 FPUs still are among the most effective for microprocessors. But it really is a PITA to code floating point routines in asm :-/
"And yes, i'm playing the smart-ass, hehe... ;] But hope this makes the picture more clear for ppl. has no or few programming experiences with 32bit x86. (I've some 10 years or so, but i'm not proud for it, hehe.:)"
Be proud ;-) |
|
List of all comments to this article (continued) |
|
- User Menu
-
- About ANN archives
- The ANN archives is powered by #AmigaZeux. It was updated daily (news last: 22-Oct-2004; comments last: 18-May-2005).
ANN.lu was created, previously owned and maintained by Christian Kemp, www.ckemp.com.
- Contribute
- Not possible at this time!
- Search ANN archives
- Advanced search
- Hosting
- ANN.lu was hosted by Dreamhost. Sign up through this link, mention "ckemp" as referrer and he will get a 10% commission on any account you purchase.
Please show your appreciation for any past, present and future work on ANN.lu by making a contribution via PayPal.
|