Fix PSHUFLW instruction feature gate #843
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 247 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.330
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #843"
general
weight: 0.35
stlintel
Problem
Legacy
PSHUFLWis an SSE2 instruction whose availability is indicatedby CPUID.01H:EDX.SSE2[26].
Its opcode declaration currently uses
BX_ISA_SSEas the feature guard.As a result, decoder initialization enables
PSHUFLWon processors thatsupport SSE but not SSE2.
The built-in Pentium III Katmai model demonstrates this feature
combination. It enables
BX_ISA_SSE, does not enableBX_ISA_SSE2, andreports SSE=1 and SSE2=0 through CPUID. Before this fix, it nevertheless
executes
PSHUFLWinstead of raising #UD.For example:
Fix
Use
BX_ISA_SSE2as the feature guard for the legacyPSHUFLWopcodedeclaration.
This makes instruction decoding agree with the SSE2 feature reported by
the selected CPU model.
Architectural reference
The Intel® 64 and IA-32 Architectures Software Developer’s Manual,
Volume 2B, section “PSHUFLW—Shuffle Packed Low Words,” identifies
F2 0F 70 /r ibas an SSE2 instruction and specifies #UD whenCPUID.01H:EDX.SSE2[26] is clear.
Validation
Bochs was rebuilt successfully after rebuilding the affected decoder
object:
A temporary real-mode boot probe selected
p3_katmai, confirmedCPUID.01H:EDX.SSE=1 and SSE2=0, enabled SSE state use, and executed
F2 0F 70 C0 00.Before the fix:
After the fix: