xpcom/xpcom-config.h.in
author Steve Snyder <swsnyder@snydernet.net>
Thu, 01 Oct 2009 14:19:41 -0400
changeset 33346 8a43f01f1d6478ad072c1f4a41fb633f8a5e3a32
parent 30421 aa85b2f55960cac97780c712fdf05c9e263c2fd8
child 71422 d959aeca8307517e81edca5cba749dfb12b27214
permissions -rw-r--r--
Bug 512865. qcms: Improve SSE2 performance, add SSE support. r=jrmuizel This patch greatly improves the performance of QCMS transformations on x86 & x86_64 systems. Some notes: 0. On 32-bit x86 systems it does runtime selection between non-SIMD, SSE, and SSE2 code paths. 1. On x86_64 systems the SSE2 code path is always taken. The non-SIMD and SSE code paths are left intact, but contemporary versions of the GCC and MSVC compilers will see that they cannot be reached and optimize them away. 2. The execution of the SSE2 code path is reduced by 67%, relative to the original Intel/Microsoft formatted ASM code. The relative performance is seen on a Pentium4 (Northwood) 2.4GHz CPU with DDR1 RAM. 3. The SSE code path provides a 80% reduction in execution time, relative to the non-SIMD code path. The relative performance is seen on a Pentium3 (Coppermine) 1.26GHz CPU with SDRAM. 4. The code has been split out into separate files so that it can be built with different cflags (-msse, and -msse2) when using gcc. 5. Try to land again, this time with __attribute__((__force_align_arg_pointer__)) to avoid crashes on linux.

/* Global defines needed by xpcom clients */

#ifndef _XPCOM_CONFIG_H_
#define _XPCOM_CONFIG_H_

/* Define this to throw() if the compiler complains about 
 * constructors returning NULL
 */
#undef CPP_THROW_NEW

/* Define if the c++ compiler supports a 2-byte wchar_t */
#undef HAVE_CPP_2BYTE_WCHAR_T

/* Define if the c++ compiler supports changing access with |using| */
#undef HAVE_CPP_ACCESS_CHANGING_USING

/* Define if the c++ compiler can resolve ambiguity with |using| */
#undef HAVE_CPP_AMBIGUITY_RESOLVING_USING

/* Define if the c++ compiler has builtin Bool type */
#undef HAVE_CPP_BOOL

/* Define if the c++ compiler supports char16_t */
#undef HAVE_CPP_CHAR16_T

/* Define if a dyanmic_cast to void* gives the most derived object */
#undef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR

/* Define if the c++ compiler supports the |explicit| keyword */
#undef HAVE_CPP_EXPLICIT

/* Define if the c++ compiler supports the modern template 
 * specialization syntax 
 */
#undef HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX

/* Define if the c++ compiler supports the |std| namespace */
#undef HAVE_CPP_NAMESPACE_STD

/* Define if the c++ compiler supports reinterpret_cast */
#undef HAVE_CPP_NEW_CASTS

/* Define if the c++ compiler supports partial template specialization */
#undef HAVE_CPP_PARTIAL_SPECIALIZATION

/* Define if the c++ compiler has trouble comparing a constant
 * reference to a templatized class to zero
 */
#undef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO

/* Define if the c++ compiler supports the |typename| keyword */
#undef HAVE_CPP_TYPENAME

/* Define if the stanard template operator!=() is ambiguous */
#undef HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL

/* Define if statvfs() is available */
#undef HAVE_STATVFS

/* Define if the c++ compiler requires implementations of 
 * unused virtual methods
 */
#undef NEED_CPP_UNUSED_IMPLEMENTATIONS

/* Define to either <new> or <new.h> */
#undef NEW_H

#endif /* _XPCOM_CONFIG_H_ */