Am Freitag 13 Februar 2009 13:42:15 schrieb Carl-Daniel Hailfinger:
This is absolutely awesome! Not only did you manage to keep the code readable, you also have kept the changes localized and really minimal. Although I had something similar (untested, unfinished) on disk, your solution is clearly the way to go. No doubt about that.
Thank you!
I'd ack straight away, but there is one thing I couldn't figure out immediately from the code: Can the code handle Fam11h processors? AFAIK they have to be treated like Fam10h.
Right. A better way would be to compare against the K8 CPUID, and switch the jump direction in jmp_if_k8. That should be enough, until AMD decides to devise a new scheme for future CPU generations.
Attached patch does that, but is totally untested (in fact, I patched the patch directly)
Regards, Patrick