Skip to content

add pushfd, popfd, bt, cpuid - #22

Merged
evmar merged 3 commits into
evmar:mainfrom
LinusU:lu-cpuid
Sep 16, 2026
Merged

evmar merged 3 commits into
evmar:mainfrom
LinusU:lu-cpuid

Conversation

@LinusU

@LinusU LinusU commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

From Claude Fable 5.1 (high):

Four entries off the todo list in the misc codegen, one commit each.

pushfd/popfd round-trip the flags word, keeping bits we don't model such as ID so the usual toggle-ID probe for cpuid support works. bt handles the register and immediate forms; the memory-operand-with-register-index form can address bits outside the operand, so it stays a todo. cpuid describes a plain Pentium with an FPU and nothing else, so programs probing for TSC or MMX take the paths the runtime implements.

Together these are the CPU-detection sequence MSVC-era games run at startup.

LinusU and others added 3 commits September 12, 2026 13:32
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
It describes a plain Pentium with an FPU and nothing else, so programs
probing for TSC or MMX take the paths we implement.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@evmar
evmar merged commit bb981b7 into evmar:main Sep 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants