Bug 1833854 - Part 6: Round requested nursery before checking range when changing...
[gecko.git] / mozglue / build / ppc.h
blob9527d8dadd2b00543a564df5c93783202c1a7bea
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* compile-time and runtime tests for whether to use Power ISA-specific
6 extensions */
8 #ifndef mozilla_ppc_h_
9 #define mozilla_ppc_h_
11 // for definition of MFBT_DATA
12 #include "mozilla/Types.h"
14 namespace mozilla {
15 namespace ppc_private {
16 extern bool MFBT_DATA vmx_enabled;
17 extern bool MFBT_DATA vsx_enabled;
18 extern bool MFBT_DATA vsx3_enabled;
19 } // namespace ppc_private
21 inline bool supports_vmx() {
22 #ifdef __powerpc__
23 return ppc_private::vmx_enabled;
24 #else
25 return false;
26 #endif
29 inline bool supports_vsx() {
30 #ifdef __powerpc__
31 return ppc_private::vsx_enabled;
32 #else
33 return false;
34 #endif
37 inline bool supports_vsx3() {
38 #ifdef __powerpc__
39 return ppc_private::vsx3_enabled;
40 #else
41 return false;
42 #endif
45 } // namespace mozilla
47 #endif /* !defined(mozilla_ppc_h_) */