Skip to content

Commit

Permalink
cpu: fix SSE3 detection on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchang committed Jul 5, 2017
1 parent b552908 commit 5ab7455
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Library/Homebrew/extend/os/linux/hardware/cpu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,14 @@ def features
@features ||= flags[1..-1].map(&:intern)
end

%w[aes altivec avx avx2 lm sse3 ssse3 sse4 sse4_2].each do |flag|
%w[aes altivec avx avx2 lm ssse3 sse4 sse4_2].each do |flag|
define_method(flag + "?") { flags.include? flag }
end

def sse3?
flags.include?("pni") || flags.include?("sse3")
end

alias is_64_bit? lm?

def bits
Expand Down

0 comments on commit 5ab7455

Please sign in to comment.