Search code examples
assemblyx86powerpc

How to specify execution time of x86 and PowerPC instructions?


I have to approximate execution time of PowerPC and x86 assembler code.I understand that I cannot compute exact it dependson many problems (current processor state - x86 processor dicides internal instructions in microinstructions, memory access time obtainig code from cache of from slower memory etc.).

I found some information in Intel Optimization reference (APPENDIX C), but it does not provide information about all general purpose instructions. Is there any complete reference about it?

What about PowerPC processors? Where can I find such information?


Solution

  • This must be very hard to do for a modern, general-purpose, OS without either controlling the execution environment extremely tightly, or making assumptions that won't be true at least some of the time.

    For example: If some hardware resource is overloaded either by one very hungry competing process or multiple competing processes, then the elapsed time to execute a given piece of code will depend upon how fairly the OS can share the overloaded resource between the competing processes. Even if the OS can share the resource perfectly fairly, you have to be able to limit the number of competing processes to determine a finite time limit.