Skip to content

Commit cbb9fe6

Browse files
committed
cpu::intel: Make SSE4.1 conditional on SSSE3, clarify SSE3 comments.
1 parent c835846 commit cbb9fe6

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/cpu/intel.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -267,20 +267,15 @@ fn cpuid_to_caps_and_set_c_flags(r: CpuidSummary) -> u32 {
267267
// Intel: "12.7.2 Checking for SSSE3 Support"
268268
// If/when we support dynamic detection of SSE/SSE2, make this conditional
269269
// on SSE/SSE2.
270+
// TODO: Make this conditional on SSE3.
270271
if check(leaf1_ecx, 9) {
271272
set(&mut caps, Shift::Ssse3);
272-
}
273273

274-
// Intel: "12.12.2 Checking for Intel SSE4.1 Support"
275-
// If/when we support dynamic detection of SSE/SSE2, make this conditional
276-
// on SSE/SSE2.
277-
// XXX: We don't check for SSE3 and we're not sure if it is compatible for
278-
// us to do so; does AMD advertise SSE3? TODO: address this.
279-
// XXX: We don't condition this on SSSE3 being available. TODO: address
280-
// this.
281-
#[cfg(target_arch = "x86_64")]
282-
if check(leaf1_ecx, 19) {
283-
set(&mut caps, Shift::Sse41);
274+
// Intel: "12.12.2 Checking for Intel SSE4.1 Support"
275+
#[cfg(target_arch = "x86_64")]
276+
if check(leaf1_ecx, 19) {
277+
set(&mut caps, Shift::Sse41);
278+
}
284279
}
285280

286281
// AMD: "The extended SSE instructions include [...]."

0 commit comments

Comments
 (0)