firefix: add 3.5.5
[vuplus_openembedded] / recipes / mozilla / firefox-3.5.5 / 010_FPU_IS_ARM_FPA_xslt.diff
1 # Bug 369722 – prdtoa.c jsnum.h txDouble.h not required IEEE_ARM define on Codesourcery EABI gcc3.4.4 compiler
2 #
3 --- mozilla/content/xslt/public/txDouble.h.orig 2006-07-13 17:21:52.000000000 +0300
4 +++ mozilla/content/xslt/public/txDouble.h      2007-10-25 15:01:25.000000000 +0300
5 @@ -58,46 +58,48 @@ fp_except_t oldmask = fpsetmask(~allmask
6  /**
7   * Stefan Hanske <sh990154@mail.uni-greifswald.de> reports:
8   *  ARM is a little endian architecture but 64 bit double words are stored
9   * differently: the 32 bit words are in little endian byte order, the two words
10   * are stored in big endian`s way.
11   */
12  
13  #if defined(__arm) || defined(__arm32__) || defined(__arm26__) || defined(__arm__)
14 -#define CPU_IS_ARM
15 +#if !defined(__VFP_FP__)
16 +#define FPU_IS_ARM_FPA
17 +#endif
18  #endif
19  
20  #if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
21  /**
22   * This version of the macros is safe for the alias optimizations
23   * that gcc does, but uses gcc-specific extensions.
24   */
25  
26  typedef union txdpun {
27      PRFloat64 d;
28      struct {
29 -#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
30 +#if defined(IS_LITTLE_ENDIAN) && !defined(FPU_IS_ARM_FPA)
31          PRUint32 lo, hi;
32  #else
33          PRUint32 hi, lo;
34  #endif
35      } s;
36  } txdpun;
37  
38  #define TX_DOUBLE_HI32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.hi; }))
39  #define TX_DOUBLE_LO32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.lo; }))
40  
41  #else // __GNUC__
42  
43  /* We don't know of any non-gcc compilers that perform alias optimization,
44   * so this code should work.
45   */
46  
47 -#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
48 +#if defined(IS_LITTLE_ENDIAN) && !defined(FPU_IS_ARM_FPA)
49  #define TX_DOUBLE_HI32(x)        (((PRUint32 *)&(x))[1])
50  #define TX_DOUBLE_LO32(x)        (((PRUint32 *)&(x))[0])
51  #else
52  #define TX_DOUBLE_HI32(x)        (((PRUint32 *)&(x))[0])
53  #define TX_DOUBLE_LO32(x)        (((PRUint32 *)&(x))[1])
54  #endif
55  
56  #endif // __GNUC__