|
>I just wanted to see what you buffs thought of this
Yeah, looks like you know what you're doing (BTW, I like what you're doing with LAHF- I've done this myself).
>This keeps the code small and simple, since operations are encoded only once.
Sounds like somthing I'll be doing with my clock-cycle based 6502 core :)
>On the other hand, a function may have 3 jumps in one instruction, which is a lot of cycles.
I think you're being to critical about how much time the x86 is going to spend on pipeline flushes. Remember, the slower the x86 CPU (generation-wise), the less overhead those jumps are going to take. Don't worry about it.
>Only using one indirect jump into a HUGE list of operations (INC A, INC B, INC C, INC D...) is A LOT of code and most likely a lot of time would be lost there in moving data in and out of processor cache.
I'd agree with that too. My best advice is to keep things simple. It makes debugging easy, and it also keeps your code simpler.
|