summaryrefslogtreecommitdiffstats
path: root/browser/app/nsBrowserApp.cpp
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-05-28 07:42:21 +0200
committerGitHub <noreply@github.com>2018-05-28 07:42:21 +0200
commitbee00a4a3db557ffd950c9704558e8c7ef89b6dd (patch)
tree5de690c4db2bd97f5a9d07d2a0c2b5b446645600 /browser/app/nsBrowserApp.cpp
parent10623b2a31db629e42e9519c8428c5f6f23c8203 (diff)
parenta147b682697db1ce8e11010c72a19edb7eb7c213 (diff)
downloadUXP-bee00a4a3db557ffd950c9704558e8c7ef89b6dd.tar
UXP-bee00a4a3db557ffd950c9704558e8c7ef89b6dd.tar.gz
UXP-bee00a4a3db557ffd950c9704558e8c7ef89b6dd.tar.lz
UXP-bee00a4a3db557ffd950c9704558e8c7ef89b6dd.tar.xz
UXP-bee00a4a3db557ffd950c9704558e8c7ef89b6dd.zip
Merge pull request #399 from MoonchildProductions/revert-395-buildsystem-work
Revert "Always build with SSE2 support & display an error if not available"
Diffstat (limited to 'browser/app/nsBrowserApp.cpp')
-rw-r--r--browser/app/nsBrowserApp.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/browser/app/nsBrowserApp.cpp b/browser/app/nsBrowserApp.cpp
index fc5ea8785..66ea8aed5 100644
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -35,51 +35,6 @@
#include "mozilla/Telemetry.h"
#include "mozilla/WindowsDllBlocklist.h"
-#ifdef MOZ_LINUX_SSE2_STARTUP_ERROR
-#include <cpuid.h>
-#include "mozilla/Unused.h"
-
-static bool
-IsSSE2Available()
-{
- // The rest of the app has been compiled to assume that SSE2 is present
- // unconditionally, so we can't use the normal copy of SSE.cpp here.
- // Since SSE.cpp caches the results and we need them only transiently,
- // instead of #including SSE.cpp here, let's just inline the specific check
- // that's needed.
- unsigned int level = 1u;
- unsigned int eax, ebx, ecx, edx;
- unsigned int bits = (1u<<26);
- unsigned int max = __get_cpuid_max(0, nullptr);
- if (level > max) {
- return false;
- }
- __cpuid_count(level, 0, eax, ebx, ecx, edx);
- return (edx & bits) == bits;
-}
-
-static const char sSSE2Message[] =
- "This browser version requires a processor with the SSE2 instruction "
- "set extension.\n";
-
-__attribute__((constructor))
-static void
-SSE2Check()
-{
- if (IsSSE2Available()) {
- return;
- }
- // Using write() in order to avoid jemalloc-based buffering. Ignoring return
- // values, since there isn't much we could do on failure and there is no
- // point in trying to recover from errors.
- MOZ_UNUSED(write(STDERR_FILENO,
- sSSE2Message,
- MOZ_ARRAY_LENGTH(sSSE2Message) - 1));
- // _exit() instead of exit() to avoid running the usual "at exit" code.
- _exit(255);
-}
-#endif
-
#if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_ANDROID)
#define MOZ_BROWSER_CAN_BE_CONTENTPROC
#include "../../ipc/contentproc/plugin-container.cpp"