michael@0: /* michael@0: * Copyright (c) 2012 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: #ifndef VPX_PORTS_EMMINTRIN_COMPAT_H michael@0: #define VPX_PORTS_EMMINTRIN_COMPAT_H michael@0: michael@0: #if defined(__GNUC__) && __GNUC__ < 4 michael@0: /* From emmintrin.h (gcc 4.5.3) */ michael@0: /* Casts between various SP, DP, INT vector types. Note that these do no michael@0: conversion of values, they just change the type. */ michael@0: extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) michael@0: _mm_castpd_ps(__m128d __A) michael@0: { michael@0: return (__m128) __A; michael@0: } michael@0: michael@0: extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) michael@0: _mm_castpd_si128(__m128d __A) michael@0: { michael@0: return (__m128i) __A; michael@0: } michael@0: michael@0: extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) michael@0: _mm_castps_pd(__m128 __A) michael@0: { michael@0: return (__m128d) __A; michael@0: } michael@0: michael@0: extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) michael@0: _mm_castps_si128(__m128 __A) michael@0: { michael@0: return (__m128i) __A; michael@0: } michael@0: michael@0: extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) michael@0: _mm_castsi128_ps(__m128i __A) michael@0: { michael@0: return (__m128) __A; michael@0: } michael@0: michael@0: extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) michael@0: _mm_castsi128_pd(__m128i __A) michael@0: { michael@0: return (__m128d) __A; michael@0: } michael@0: #endif michael@0: michael@0: #endif