media/libvpx/vpx_ports/emmintrin_compat.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /*
michael@0 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license
michael@0 5 * that can be found in the LICENSE file in the root of the source
michael@0 6 * tree. An additional intellectual property rights grant can be found
michael@0 7 * in the file PATENTS. All contributing project authors may
michael@0 8 * be found in the AUTHORS file in the root of the source tree.
michael@0 9 */
michael@0 10
michael@0 11 #ifndef VPX_PORTS_EMMINTRIN_COMPAT_H
michael@0 12 #define VPX_PORTS_EMMINTRIN_COMPAT_H
michael@0 13
michael@0 14 #if defined(__GNUC__) && __GNUC__ < 4
michael@0 15 /* From emmintrin.h (gcc 4.5.3) */
michael@0 16 /* Casts between various SP, DP, INT vector types. Note that these do no
michael@0 17 conversion of values, they just change the type. */
michael@0 18 extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
michael@0 19 _mm_castpd_ps(__m128d __A)
michael@0 20 {
michael@0 21 return (__m128) __A;
michael@0 22 }
michael@0 23
michael@0 24 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
michael@0 25 _mm_castpd_si128(__m128d __A)
michael@0 26 {
michael@0 27 return (__m128i) __A;
michael@0 28 }
michael@0 29
michael@0 30 extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
michael@0 31 _mm_castps_pd(__m128 __A)
michael@0 32 {
michael@0 33 return (__m128d) __A;
michael@0 34 }
michael@0 35
michael@0 36 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
michael@0 37 _mm_castps_si128(__m128 __A)
michael@0 38 {
michael@0 39 return (__m128i) __A;
michael@0 40 }
michael@0 41
michael@0 42 extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
michael@0 43 _mm_castsi128_ps(__m128i __A)
michael@0 44 {
michael@0 45 return (__m128) __A;
michael@0 46 }
michael@0 47
michael@0 48 extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
michael@0 49 _mm_castsi128_pd(__m128i __A)
michael@0 50 {
michael@0 51 return (__m128d) __A;
michael@0 52 }
michael@0 53 #endif
michael@0 54
michael@0 55 #endif

mercurial