Lines 1-29
Link Here
|
1 |
--- src/com/lightcrafts/platform/linux/TestSSE2.java.orig 2015-06-02 13:25:15 UTC |
|
|
2 |
+++ src/com/lightcrafts/platform/linux/TestSSE2.java |
3 |
@@ -29,6 +29,8 @@ class TestSSE2 { |
4 |
regex = "^flags\t\t:.*sse2"; |
5 |
} else if (osname.indexOf("SunOS") >= 0) { |
6 |
regex = "^\t.*sse2"; |
7 |
+ } else if (osname.indexOf("FreeBSD") >= 0) { |
8 |
+ regex = "^hw.instruction_sse: 1"; |
9 |
} else { |
10 |
regex = "^ Features=.*SSE2"; |
11 |
} |
12 |
@@ -42,6 +44,8 @@ class TestSSE2 { |
13 |
cmd = new String[] {"cat", "/proc/cpuinfo"}; |
14 |
} else if (osname.indexOf("SunOS") >= 0) { |
15 |
cmd = new String[] {"sh", "-c", "isainfo -nv ; psrinfo -pv"}; |
16 |
+ } else if (osname.indexOf("FreeBSD") >= 0) { |
17 |
+ cmd = new String[] {"/sbin/sysctl", "hw"}; |
18 |
} else { |
19 |
cmd = new String[] {"dmesg"}; |
20 |
} |
21 |
@@ -68,6 +72,8 @@ class TestSSE2 { |
22 |
regex = getCpuInfoLine("^model name\t: "); |
23 |
} else if (osname.indexOf("SunOS") >= 0) { |
24 |
regex = getCpuInfoLine("^\t"); |
25 |
+ } else if (osname.indexOf("FreeBSD") >= 0) { |
26 |
+ regex = getCpuInfoLine("^hw.model: "); |
27 |
} else { |
28 |
regex = getCpuInfoLine("^CPU: "); |
29 |
} |