Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2016 08:57:17 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r428550 - in branches/2016Q4: mail/thunderbird mail/thunderbird/files www/firefox www/firefox-esr www/firefox-esr/files www/firefox/files www/libxul www/libxul/files
Message-ID:  <201612140857.uBE8vHkT015773@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Wed Dec 14 08:57:17 2016
New Revision: 428550
URL: https://svnweb.freebsd.org/changeset/ports/428550

Log:
  MFH: r428395
  
  gecko: apply some sparc64 crashfixes
  
  Obtained from:	upstream
  Approved by:	ports-secteam (junovitch)

Added:
  branches/2016Q4/mail/thunderbird/files/patch-bug1232150
     - copied unchanged from r428395, head/mail/thunderbird/files/patch-bug1232150
  branches/2016Q4/mail/thunderbird/files/patch-bug1321877
     - copied unchanged from r428395, head/mail/thunderbird/files/patch-bug1321877
  branches/2016Q4/www/firefox-esr/files/patch-bug1232150
     - copied unchanged from r428395, head/www/firefox-esr/files/patch-bug1232150
  branches/2016Q4/www/firefox-esr/files/patch-bug1321877
     - copied unchanged from r428395, head/www/firefox-esr/files/patch-bug1321877
  branches/2016Q4/www/firefox/files/patch-bug1321877
     - copied unchanged from r428395, head/www/firefox/files/patch-bug1321877
  branches/2016Q4/www/firefox/files/patch-bug1322112
     - copied unchanged from r428395, head/www/firefox/files/patch-bug1322112
  branches/2016Q4/www/firefox/files/patch-bug1322660
     - copied unchanged from r428395, head/www/firefox/files/patch-bug1322660
  branches/2016Q4/www/libxul/files/patch-bug1232150
     - copied unchanged from r428395, head/www/libxul/files/patch-bug1232150
  branches/2016Q4/www/libxul/files/patch-bug1321877
     - copied unchanged from r428395, head/www/libxul/files/patch-bug1321877
Modified:
  branches/2016Q4/mail/thunderbird/Makefile
  branches/2016Q4/www/firefox-esr/Makefile
  branches/2016Q4/www/firefox/Makefile
  branches/2016Q4/www/libxul/Makefile
Directory Properties:
  branches/2016Q4/   (props changed)

Modified: branches/2016Q4/mail/thunderbird/Makefile
==============================================================================
--- branches/2016Q4/mail/thunderbird/Makefile	Wed Dec 14 08:50:00 2016	(r428549)
+++ branches/2016Q4/mail/thunderbird/Makefile	Wed Dec 14 08:57:17 2016	(r428550)
@@ -3,7 +3,7 @@
 
 PORTNAME=	thunderbird
 DISTVERSION=	45.5.1
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	mail news net-im ipv6
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
 		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source

Copied: branches/2016Q4/mail/thunderbird/files/patch-bug1232150 (from r428395, head/mail/thunderbird/files/patch-bug1232150)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/mail/thunderbird/files/patch-bug1232150	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/mail/thunderbird/files/patch-bug1232150)
@@ -0,0 +1,280 @@
+commit 9a18802e82c7
+Author: Martin Husemann <martin>
+Date:   Fri Jan 22 00:09:00 2016 +0100
+
+    Bug 1232150 - "Atomic operations for PPC/PPC64". r=lhansen
+---
+ js/src/jit/AtomicOperations.h            |   2 +
+ js/src/jit/none/AtomicOperations-sparc.h | 251 +++++++++++++++++++++++++++++++
+ 2 files changed, 253 insertions(+)
+
+diff --git js/src/jit/AtomicOperations.h js/src/jit/AtomicOperations.h
+index 16196342a282..42aee72eb879 100644
+--- mozilla/js/src/jit/AtomicOperations.h
++++ mozilla/js/src/jit/AtomicOperations.h
+@@ -328,6 +328,8 @@ AtomicOperations::isLockfree(int32_t size)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+ #elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
++#elif defined(__sparc__)
++# include "jit/none/AtomicOperations-sparc.h"
+ #elif defined(JS_CODEGEN_NONE)
+   // You can disable the JIT with --disable-ion but you must still
+   // provide the atomic operations that will be used by the JS engine.
+diff --git js/src/jit/none/AtomicOperations-sparc.h js/src/jit/none/AtomicOperations-sparc.h
+new file mode 100644
+index 000000000000..706ada86241b
+--- /dev/null
++++ mozilla/js/src/jit/none/AtomicOperations-sparc.h
+@@ -0,0 +1,251 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ * vim: set ts=8 sts=4 et sw=4 tw=99:
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/* For documentation, see jit/AtomicOperations.h */
++
++#ifndef jit_sparc_AtomicOperations_sparc_h
++#define jit_sparc_AtomicOperations_sparc_h
++
++#include "mozilla/Assertions.h"
++#include "mozilla/Types.h"
++
++#if defined(__clang__) || defined(__GNUC__)
++
++// The default implementation tactic for gcc/clang is to use the newer
++// __atomic intrinsics added for use in C++11 <atomic>.  Where that
++// isn't available, we use GCC's older __sync functions instead.
++//
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
++// compatible option for older compilers: enable this to use GCC's old
++// __sync functions instead of the newer __atomic functions.  This
++// will be required for GCC 4.6.x and earlier, and probably for Clang
++// 3.1, should we need to use those versions.
++
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++inline bool
++js::jit::AtomicOperations::isLockfree8()
++{
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
++#  if defined(__LP64__)
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
++#  endif
++    return true;
++# else
++    return false;
++# endif
++}
++
++inline void
++js::jit::AtomicOperations::fenceSeqCst()
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++# else
++    __atomic_thread_fence(__ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSeqCst(T* addr)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++    T v = *addr;
++    __sync_synchronize();
++# else
++    T v;
++    __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
++# endif
++    return v;
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++    *addr = val;
++    __sync_synchronize();
++# else
++    __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_val_compare_and_swap(addr, oldval, newval);
++# else
++    __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++    return oldval;
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_add(addr, val);
++# else
++    return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_sub(addr, val);
++# else
++    return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_and(addr, val);
++# else
++    return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_or(addr, val);
++# else
++    return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_xor(addr, val);
++# else
++    return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
++{
++    return *addr;               // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
++{
++    *addr = val;                // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++    ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++    ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    T v;
++    __sync_synchronize();
++    do {
++	v = *addr;
++    } while (__sync_val_compare_and_swap(addr, v, val) != v);
++    return v;
++# else
++    T v;
++    __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
++    return v;
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::acquire(void* addr)
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
++        ;
++# else
++    uint32_t zero = 0;
++    uint32_t one = 1;
++    while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
++        zero = 0;
++        continue;
++    }
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::release(void* addr)
++{
++    MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_sub_and_fetch(&spinlock, 1);
++# else
++    uint32_t zero = 0;
++    __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
++# endif
++}
++
++# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
++
++# error "Either disable JS shared memory, use GCC or Clang, or add code here"
++
++#endif
++
++#endif // jit_sparc_AtomicOperations_sparc_h

Copied: branches/2016Q4/mail/thunderbird/files/patch-bug1321877 (from r428395, head/mail/thunderbird/files/patch-bug1321877)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/mail/thunderbird/files/patch-bug1321877	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/mail/thunderbird/files/patch-bug1321877)
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author:  <tharvik@gmail.com>
+Date:   Thu Dec 8 18:20:12 2016 -0600
+
+    Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- mozilla/image/Downscaler.h
++++ mozilla/image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+-  explicit Downscaler(const nsIntSize&)
++  explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+   {
+     MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+   }
+ 
+-  const nsIntSize& OriginalSize() const { return nsIntSize(); }
+-  const nsIntSize& TargetSize() const { return nsIntSize(); }
+-  const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++  const nsIntSize& OriginalSize() const { return mSize; }
++  const nsIntSize& TargetSize() const { return mSize; }
++  const gfxSize& Scale() const { return mScale; }
+ 
+   nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+   {
+@@ -177,6 +177,9 @@ public:
+   DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+   void ResetForNextProgressivePass() { }
+   const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++  nsIntSize mSize;
++  gfxSize mScale;
+ };
+ 
+ #endif // MOZ_ENABLE_SKIA

Modified: branches/2016Q4/www/firefox-esr/Makefile
==============================================================================
--- branches/2016Q4/www/firefox-esr/Makefile	Wed Dec 14 08:50:00 2016	(r428549)
+++ branches/2016Q4/www/firefox-esr/Makefile	Wed Dec 14 08:57:17 2016	(r428550)
@@ -4,6 +4,7 @@
 PORTNAME=	firefox
 DISTVERSION=	45.6.0
 DISTVERSIONSUFFIX=esr.source
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \

Copied: branches/2016Q4/www/firefox-esr/files/patch-bug1232150 (from r428395, head/www/firefox-esr/files/patch-bug1232150)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/www/firefox-esr/files/patch-bug1232150	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/www/firefox-esr/files/patch-bug1232150)
@@ -0,0 +1,280 @@
+commit 9a18802e82c7
+Author: Martin Husemann <martin>
+Date:   Fri Jan 22 00:09:00 2016 +0100
+
+    Bug 1232150 - "Atomic operations for PPC/PPC64". r=lhansen
+---
+ js/src/jit/AtomicOperations.h            |   2 +
+ js/src/jit/none/AtomicOperations-sparc.h | 251 +++++++++++++++++++++++++++++++
+ 2 files changed, 253 insertions(+)
+
+diff --git js/src/jit/AtomicOperations.h js/src/jit/AtomicOperations.h
+index 16196342a282..42aee72eb879 100644
+--- js/src/jit/AtomicOperations.h
++++ js/src/jit/AtomicOperations.h
+@@ -328,6 +328,8 @@ AtomicOperations::isLockfree(int32_t size)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+ #elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
++#elif defined(__sparc__)
++# include "jit/none/AtomicOperations-sparc.h"
+ #elif defined(JS_CODEGEN_NONE)
+   // You can disable the JIT with --disable-ion but you must still
+   // provide the atomic operations that will be used by the JS engine.
+diff --git js/src/jit/none/AtomicOperations-sparc.h js/src/jit/none/AtomicOperations-sparc.h
+new file mode 100644
+index 000000000000..706ada86241b
+--- /dev/null
++++ js/src/jit/none/AtomicOperations-sparc.h
+@@ -0,0 +1,251 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ * vim: set ts=8 sts=4 et sw=4 tw=99:
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/* For documentation, see jit/AtomicOperations.h */
++
++#ifndef jit_sparc_AtomicOperations_sparc_h
++#define jit_sparc_AtomicOperations_sparc_h
++
++#include "mozilla/Assertions.h"
++#include "mozilla/Types.h"
++
++#if defined(__clang__) || defined(__GNUC__)
++
++// The default implementation tactic for gcc/clang is to use the newer
++// __atomic intrinsics added for use in C++11 <atomic>.  Where that
++// isn't available, we use GCC's older __sync functions instead.
++//
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
++// compatible option for older compilers: enable this to use GCC's old
++// __sync functions instead of the newer __atomic functions.  This
++// will be required for GCC 4.6.x and earlier, and probably for Clang
++// 3.1, should we need to use those versions.
++
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++inline bool
++js::jit::AtomicOperations::isLockfree8()
++{
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
++#  if defined(__LP64__)
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
++#  endif
++    return true;
++# else
++    return false;
++# endif
++}
++
++inline void
++js::jit::AtomicOperations::fenceSeqCst()
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++# else
++    __atomic_thread_fence(__ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSeqCst(T* addr)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++    T v = *addr;
++    __sync_synchronize();
++# else
++    T v;
++    __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
++# endif
++    return v;
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++    *addr = val;
++    __sync_synchronize();
++# else
++    __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_val_compare_and_swap(addr, oldval, newval);
++# else
++    __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++    return oldval;
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_add(addr, val);
++# else
++    return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_sub(addr, val);
++# else
++    return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_and(addr, val);
++# else
++    return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_or(addr, val);
++# else
++    return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_xor(addr, val);
++# else
++    return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
++{
++    return *addr;               // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
++{
++    *addr = val;                // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++    ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++    ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    T v;
++    __sync_synchronize();
++    do {
++	v = *addr;
++    } while (__sync_val_compare_and_swap(addr, v, val) != v);
++    return v;
++# else
++    T v;
++    __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
++    return v;
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::acquire(void* addr)
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
++        ;
++# else
++    uint32_t zero = 0;
++    uint32_t one = 1;
++    while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
++        zero = 0;
++        continue;
++    }
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::release(void* addr)
++{
++    MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_sub_and_fetch(&spinlock, 1);
++# else
++    uint32_t zero = 0;
++    __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
++# endif
++}
++
++# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
++
++# error "Either disable JS shared memory, use GCC or Clang, or add code here"
++
++#endif
++
++#endif // jit_sparc_AtomicOperations_sparc_h

Copied: branches/2016Q4/www/firefox-esr/files/patch-bug1321877 (from r428395, head/www/firefox-esr/files/patch-bug1321877)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/www/firefox-esr/files/patch-bug1321877	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/www/firefox-esr/files/patch-bug1321877)
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author:  <tharvik@gmail.com>
+Date:   Thu Dec 8 18:20:12 2016 -0600
+
+    Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- image/Downscaler.h
++++ image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+-  explicit Downscaler(const nsIntSize&)
++  explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+   {
+     MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+   }
+ 
+-  const nsIntSize& OriginalSize() const { return nsIntSize(); }
+-  const nsIntSize& TargetSize() const { return nsIntSize(); }
+-  const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++  const nsIntSize& OriginalSize() const { return mSize; }
++  const nsIntSize& TargetSize() const { return mSize; }
++  const gfxSize& Scale() const { return mScale; }
+ 
+   nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+   {
+@@ -177,6 +177,9 @@ public:
+   DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+   void ResetForNextProgressivePass() { }
+   const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++  nsIntSize mSize;
++  gfxSize mScale;
+ };
+ 
+ #endif // MOZ_ENABLE_SKIA

Modified: branches/2016Q4/www/firefox/Makefile
==============================================================================
--- branches/2016Q4/www/firefox/Makefile	Wed Dec 14 08:50:00 2016	(r428549)
+++ branches/2016Q4/www/firefox/Makefile	Wed Dec 14 08:57:17 2016	(r428550)
@@ -4,7 +4,7 @@
 PORTNAME=	firefox
 DISTVERSION=	50.1.0
 DISTVERSIONSUFFIX=.source
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \

Copied: branches/2016Q4/www/firefox/files/patch-bug1321877 (from r428395, head/www/firefox/files/patch-bug1321877)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/www/firefox/files/patch-bug1321877	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/www/firefox/files/patch-bug1321877)
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author:  <tharvik@gmail.com>
+Date:   Thu Dec 8 18:20:12 2016 -0600
+
+    Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- image/Downscaler.h
++++ image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+-  explicit Downscaler(const nsIntSize&)
++  explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+   {
+     MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+   }
+ 
+-  const nsIntSize& OriginalSize() const { return nsIntSize(); }
+-  const nsIntSize& TargetSize() const { return nsIntSize(); }
+-  const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++  const nsIntSize& OriginalSize() const { return mSize; }
++  const nsIntSize& TargetSize() const { return mSize; }
++  const gfxSize& Scale() const { return mScale; }
+ 
+   nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+   {
+@@ -177,6 +177,9 @@ public:
+   DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+   void ResetForNextProgressivePass() { }
+   const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++  nsIntSize mSize;
++  gfxSize mScale;
+ };
+ 
+ #endif // MOZ_ENABLE_SKIA

Copied: branches/2016Q4/www/firefox/files/patch-bug1322112 (from r428395, head/www/firefox/files/patch-bug1322112)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/www/firefox/files/patch-bug1322112	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/www/firefox/files/patch-bug1322112)
@@ -0,0 +1,23 @@
+--- image/decoders/nsIconDecoder.cpp
++++ image/decoders/nsIconDecoder.cpp
+@@ -89,17 +89,18 @@ nsIconDecoder::ReadRowOfPixels(const cha
+ {
+   MOZ_ASSERT(aLength % 4 == 0, "Rows should contain a multiple of four bytes");
+ 
+   auto result = mPipe.WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> {
+     if (aLength == 0) {
+       return AsVariant(WriteState::NEED_MORE_DATA);  // Done with this row.
+     }
+ 
+-    uint32_t pixel = *reinterpret_cast<const uint32_t*>(aData);
++    uint32_t pixel;
++    memcpy(&pixel, aData, 4);
+     aData += 4;
+     aLength -= 4;
+ 
+     return AsVariant(pixel);
+   });
+ 
+   MOZ_ASSERT(result != WriteState::FAILURE);
+ 
+

Copied: branches/2016Q4/www/firefox/files/patch-bug1322660 (from r428395, head/www/firefox/files/patch-bug1322660)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/www/firefox/files/patch-bug1322660	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/www/firefox/files/patch-bug1322660)
@@ -0,0 +1,80 @@
+--- modules/woff2/src/store_bytes.h
++++ modules/woff2/src/store_bytes.h
+@@ -29,41 +29,44 @@ inline size_t StoreU32(uint8_t* dst, size_t offset, uint32_t x) {
+   dst[offset + 1] = x >> 16;
+   dst[offset + 2] = x >> 8;
+   dst[offset + 3] = x;
+   return offset + 4;
+ }
+ 
+ inline size_t Store16(uint8_t* dst, size_t offset, int x) {
+ #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+-  *reinterpret_cast<uint16_t*>(dst + offset) =
+-      ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
++  uint16_t v = ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
++  memcpy(dst + offset, &v, 2);
+ #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
+-  *reinterpret_cast<uint16_t*>(dst + offset) = static_cast<uint16_t>(x);
++  uint16_t v = static_cast<uint16_t>(x);
++  memcpy(dst + offset, &v, 2);
+ #else
+   dst[offset] = x >> 8;
+   dst[offset + 1] = x;
+ #endif
+   return offset + 2;
+ }
+ 
+ inline void StoreU32(uint32_t val, size_t* offset, uint8_t* dst) {
+   dst[(*offset)++] = val >> 24;
+   dst[(*offset)++] = val >> 16;
+   dst[(*offset)++] = val >> 8;
+   dst[(*offset)++] = val;
+ }
+ 
+ inline void Store16(int val, size_t* offset, uint8_t* dst) {
+ #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+-  *reinterpret_cast<uint16_t*>(dst + *offset) =
++  uint16_t v = ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
++  memcpy(dst + *offset, &v, 2);
+       ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
+   *offset += 2;
+ #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
+-  *reinterpret_cast<uint16_t*>(dst + *offset) = static_cast<uint16_t>(val);
++  uint16_t v = static_cast<uint16_t>(val);
++  memcpy(dst + *offset, &v, 2);
+   *offset += 2;
+ #else
+   dst[(*offset)++] = val >> 8;
+   dst[(*offset)++] = val;
+ #endif
+ }
+ 
+ inline void StoreBytes(const uint8_t* data, size_t len,
+--- modules/woff2/src/woff2_common.cc
++++ modules/woff2/src/woff2_common.cc
+@@ -20,22 +20,23 @@
+ 
+ namespace woff2 {
+ 
+ 
+ uint32_t ComputeULongSum(const uint8_t* buf, size_t size) {
+   uint32_t checksum = 0;
+   size_t aligned_size = size & ~3;
+   for (size_t i = 0; i < aligned_size; i += 4) {
++    uint32_t v;
++    memcpy(&v, buf + i, 4);
+ #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+-    uint32_t v = *reinterpret_cast<const uint32_t*>(buf + i);
+     checksum += (((v & 0xFF) << 24) | ((v & 0xFF00) << 8) |
+       ((v & 0xFF0000) >> 8) | ((v & 0xFF000000) >> 24));
+ #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
+-    checksum += *reinterpret_cast<const uint32_t*>(buf + i);
++    checksum += v;
+ #else
+     checksum += (buf[i] << 24) | (buf[i + 1] << 16) |
+       (buf[i + 2] << 8) | buf[i + 3];
+ #endif
+   }
+ 
+   // treat size not aligned on 4 as if it were padded to 4 with 0's
+   if (size != aligned_size) {

Modified: branches/2016Q4/www/libxul/Makefile
==============================================================================
--- branches/2016Q4/www/libxul/Makefile	Wed Dec 14 08:50:00 2016	(r428549)
+++ branches/2016Q4/www/libxul/Makefile	Wed Dec 14 08:57:17 2016	(r428550)
@@ -3,6 +3,7 @@
 
 PORTNAME=	libxul
 DISTVERSION=	45.6.0
+PORTREVISION=	1
 CATEGORIES?=	www devel
 MASTER_SITES=	MOZILLA/firefox/releases/${DISTVERSION}esr/source \
 		MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build1/source

Copied: branches/2016Q4/www/libxul/files/patch-bug1232150 (from r428395, head/www/libxul/files/patch-bug1232150)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q4/www/libxul/files/patch-bug1232150	Wed Dec 14 08:57:17 2016	(r428550, copy of r428395, head/www/libxul/files/patch-bug1232150)
@@ -0,0 +1,280 @@
+commit 9a18802e82c7
+Author: Martin Husemann <martin>
+Date:   Fri Jan 22 00:09:00 2016 +0100
+
+    Bug 1232150 - "Atomic operations for PPC/PPC64". r=lhansen
+---
+ js/src/jit/AtomicOperations.h            |   2 +
+ js/src/jit/none/AtomicOperations-sparc.h | 251 +++++++++++++++++++++++++++++++
+ 2 files changed, 253 insertions(+)
+
+diff --git js/src/jit/AtomicOperations.h js/src/jit/AtomicOperations.h
+index 16196342a282..42aee72eb879 100644
+--- js/src/jit/AtomicOperations.h
++++ js/src/jit/AtomicOperations.h
+@@ -328,6 +328,8 @@ AtomicOperations::isLockfree(int32_t size)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+ #elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
++#elif defined(__sparc__)
++# include "jit/none/AtomicOperations-sparc.h"
+ #elif defined(JS_CODEGEN_NONE)
+   // You can disable the JIT with --disable-ion but you must still
+   // provide the atomic operations that will be used by the JS engine.
+diff --git js/src/jit/none/AtomicOperations-sparc.h js/src/jit/none/AtomicOperations-sparc.h
+new file mode 100644
+index 000000000000..706ada86241b
+--- /dev/null
++++ js/src/jit/none/AtomicOperations-sparc.h
+@@ -0,0 +1,251 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ * vim: set ts=8 sts=4 et sw=4 tw=99:
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/* For documentation, see jit/AtomicOperations.h */
++
++#ifndef jit_sparc_AtomicOperations_sparc_h
++#define jit_sparc_AtomicOperations_sparc_h
++
++#include "mozilla/Assertions.h"
++#include "mozilla/Types.h"
++
++#if defined(__clang__) || defined(__GNUC__)
++
++// The default implementation tactic for gcc/clang is to use the newer
++// __atomic intrinsics added for use in C++11 <atomic>.  Where that
++// isn't available, we use GCC's older __sync functions instead.
++//
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
++// compatible option for older compilers: enable this to use GCC's old
++// __sync functions instead of the newer __atomic functions.  This
++// will be required for GCC 4.6.x and earlier, and probably for Clang
++// 3.1, should we need to use those versions.
++
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++inline bool
++js::jit::AtomicOperations::isLockfree8()
++{
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
++#  if defined(__LP64__)
++    MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
++#  endif
++    return true;
++# else
++    return false;
++# endif
++}
++
++inline void
++js::jit::AtomicOperations::fenceSeqCst()
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++# else
++    __atomic_thread_fence(__ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSeqCst(T* addr)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++    T v = *addr;
++    __sync_synchronize();
++# else
++    T v;
++    __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
++# endif
++    return v;
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    __sync_synchronize();
++    *addr = val;
++    __sync_synchronize();
++# else
++    __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
++{
++    MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_val_compare_and_swap(addr, oldval, newval);
++# else
++    __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++    return oldval;
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++    static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++    return __sync_fetch_and_add(addr, val);
++# else
++    return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612140857.uBE8vHkT015773>