mozilla-ppc.patch
changeset 507 d51ca95a9f7a
child 515 0f6539389500
equal deleted inserted replaced
506:f02147953485 507:d51ca95a9f7a
       
     1 # HG changeset patch
       
     2 # Parent 0f6722dd9d75458124795d22e9240887c9b4aeca
       
     3 # User Wolfgang Rosenauer <wr@rosenauer.org>
       
     4 Bug 746112 - RegExp hang on ppc64 in execute.
       
     5 Bug 750620 - Make double-conversion portable to exotic architectures. TM: mozilla15
       
     6 
       
     7 diff --git a/js/src/yarr/YarrInterpreter.h b/js/src/yarr/YarrInterpreter.h
       
     8 --- a/js/src/yarr/YarrInterpreter.h
       
     9 +++ b/js/src/yarr/YarrInterpreter.h
       
    10 @@ -162,17 +162,17 @@ struct ByteTerm {
       
    11          , m_invert(invert)
       
    12      {
       
    13          atom.characterClass = characterClass;
       
    14          atom.quantityType = QuantifierFixedCount;
       
    15          atom.quantityCount = 1;
       
    16          inputPosition = inputPos;
       
    17      }
       
    18  
       
    19 -    ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos)
       
    20 +    ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline))
       
    21          : type(type)
       
    22          , m_capture(capture)
       
    23          , m_invert(false)
       
    24      {
       
    25          atom.subpatternId = subpatternId;
       
    26          atom.parenthesesDisjunction = parenthesesInfo;
       
    27          atom.quantityType = QuantifierFixedCount;
       
    28          atom.quantityCount = 1;
       
    29 @@ -183,17 +183,17 @@ struct ByteTerm {
       
    30          : type(type)
       
    31          , m_capture(false)
       
    32          , m_invert(invert)
       
    33      {
       
    34          atom.quantityType = QuantifierFixedCount;
       
    35          atom.quantityCount = 1;
       
    36      }
       
    37  
       
    38 -    ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos)
       
    39 +    ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline))
       
    40          : type(type)
       
    41          , m_capture(capture)
       
    42          , m_invert(invert)
       
    43      {
       
    44          atom.subpatternId = subpatternId;
       
    45          atom.quantityType = QuantifierFixedCount;
       
    46          atom.quantityCount = 1;
       
    47          inputPosition = inputPos;
       
    48 diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h
       
    49 --- a/js/src/yarr/YarrPattern.h
       
    50 +++ b/js/src/yarr/YarrPattern.h
       
    51 @@ -166,17 +166,17 @@ struct PatternTerm {
       
    52          , m_capture(false)
       
    53          , m_invert(invert)
       
    54      {
       
    55          characterClass = charClass;
       
    56          quantityType = QuantifierFixedCount;
       
    57          quantityCount = 1;
       
    58      }
       
    59  
       
    60 -    PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false)
       
    61 +    PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline))
       
    62          : type(type)
       
    63          , m_capture(capture)
       
    64          , m_invert(invert)
       
    65      {
       
    66          parentheses.disjunction = disjunction;
       
    67          parentheses.subpatternId = subpatternId;
       
    68          parentheses.isCopy = false;
       
    69          parentheses.isTerminal = false;
       
    70 diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
       
    71 --- a/memory/jemalloc/jemalloc.c
       
    72 +++ b/memory/jemalloc/jemalloc.c
       
    73 @@ -1086,17 +1086,19 @@ struct arena_s {
       
    74  static unsigned		ncpus;
       
    75  #endif
       
    76  
       
    77  /*
       
    78   * When MALLOC_STATIC_SIZES is defined most of the parameters
       
    79   * controlling the malloc behavior are defined as compile-time constants
       
    80   * for best performance and cannot be altered at runtime.
       
    81   */
       
    82 +#if !(defined(__powerpc__))
       
    83  #define MALLOC_STATIC_SIZES 1
       
    84 +#endif
       
    85  
       
    86  #ifdef MALLOC_STATIC_SIZES
       
    87  
       
    88  /*
       
    89   * VM page size. It must divide the runtime CPU page size or the code
       
    90   * will abort.
       
    91   */
       
    92  #define pagesize_2pow			((size_t) 12)
       
    93 diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
       
    94 --- a/mfbt/double-conversion/utils.h
       
    95 +++ b/mfbt/double-conversion/utils.h
       
    96 @@ -50,17 +50,17 @@
       
    97  // the result is equal to 89255e-22.
       
    98  // The best way to test this, is to create a division-function and to compare
       
    99  // the output of the division with the expected result. (Inlining must be
       
   100  // disabled.)
       
   101  // On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
       
   102  #if defined(_M_X64) || defined(__x86_64__) || \
       
   103      defined(__ARMEL__) || defined(__avr32__) || \
       
   104      defined(__hppa__) || defined(__ia64__) || \
       
   105 -    defined(__mips__) || defined(__powerpc__) || \
       
   106 +    defined(__mips__) || defined(__powerpc__) || defined(__powerpc64__) || \
       
   107      defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
       
   108      defined(__SH4__) || defined(__alpha__) || \
       
   109      defined(_MIPS_ARCH_MIPS32R2)
       
   110  #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
       
   111  #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
       
   112  #if defined(_WIN32)
       
   113  // Windows uses a 64bit wide floating point stack.
       
   114  #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1