[Patch] CMPXCHG8B for the IDT WinChip

Post Reply
nerd73
Posts: 116
Joined: Wed 24 Sep, 2014 11:16 pm

[Patch] CMPXCHG8B for the IDT WinChip

Post by nerd73 »

This was something I brought up a little bit back in 2014 before the Pentium emulation was added.
Well, it's been three and a half years since then, and with the people who would use CMPXCHG8B requiring applications on PCem just using the Pentium, the issue fell to the wayside.

So then, is there CMPXCHG8B on the IDT WinChip? As it turns out, yes.

Obviously I implemented the instructions, but then came the CPUID part. CX8, or the CPUID identifier for CMPXCHG8B, is disabled by default on the WinChip. The main way to remedy that is by setting a bit on the feature control register, which is allowed in the patch. But if you enable it by default on non-Intel/AMD/Cyrix CPUs, that breaks NT4 below SP4 due to conflicting installation tests. So then, this patch only enables CX8 if the proper WRMSR bit is set.

This patch also disables CX8 on soft reset.
winchip.patch
(35.41 KiB) Downloaded 441 times
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Patch] CMPXCHG8B for the IDT WinChip

Post by SarahWalker »

Committed at rev 1090.
Post Reply