2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
12 #ifndef AOM_AOM_PORTS_EMMINTRIN_COMPAT_H_
13 #define AOM_AOM_PORTS_EMMINTRIN_COMPAT_H_
15 #if defined(__GNUC__) && __GNUC__ < 4
16 /* From emmintrin.h (gcc 4.5.3) */
17 /* Casts between various SP, DP, INT vector types. Note that these do no
18 conversion of values, they just change the type. */
19 extern __inline __m128
20 __attribute__((__gnu_inline__
, __always_inline__
, __artificial__
))
21 _mm_castpd_ps(__m128d __A
) {
25 extern __inline __m128i
26 __attribute__((__gnu_inline__
, __always_inline__
, __artificial__
))
27 _mm_castpd_si128(__m128d __A
) {
31 extern __inline __m128d
32 __attribute__((__gnu_inline__
, __always_inline__
, __artificial__
))
33 _mm_castps_pd(__m128 __A
) {
37 extern __inline __m128i
38 __attribute__((__gnu_inline__
, __always_inline__
, __artificial__
))
39 _mm_castps_si128(__m128 __A
) {
43 extern __inline __m128
44 __attribute__((__gnu_inline__
, __always_inline__
, __artificial__
))
45 _mm_castsi128_ps(__m128i __A
) {
49 extern __inline __m128d
50 __attribute__((__gnu_inline__
, __always_inline__
, __artificial__
))
51 _mm_castsi128_pd(__m128i __A
) {
56 #endif // AOM_AOM_PORTS_EMMINTRIN_COMPAT_H_