?? mmintrin.h
字號:
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *//* As a special exception, if you include this header file into source files compiled by GCC, this header file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */#ifndef _MMINTRIN_H_INCLUDED#define _MMINTRIN_H_INCLUDED/* The data type intended for user use. */typedef unsigned long long __m64, __int64;/* Internal data types for implementing the intrinsics. */typedef int __v2si __attribute__ ((__mode__ (__V2SI__)));typedef int __v4hi __attribute__ ((__mode__ (__V4HI__)));typedef int __v8qi __attribute__ ((__mode__ (__V8QI__)));/* "Convert" __m64 and __int64 into each other. */static __inline __m64 _mm_cvtsi64_m64 (__int64 __i){ return __i;}static __inline __int64_mm_cvtm64_si64 (__m64 __i){ return __i;}static __inline int_mm_cvtsi64_si32 (__int64 __i){ return __i;}static __inline __int64_mm_cvtsi32_si64 (int __i){ return __i;}/* Pack the four 16-bit values from M1 into the lower four 8-bit values of the result, and the four 16-bit values from M2 into the upper four 8-bit values of the result, all with signed saturation. */static __inline __m64_mm_packs_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wpackhss ((__v4hi)__m1, (__v4hi)__m2);}/* Pack the two 32-bit values from M1 in to the lower two 16-bit values of the result, and the two 32-bit values from M2 into the upper two 16-bit values of the result, all with signed saturation. */static __inline __m64_mm_packs_pi32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wpackwss ((__v2si)__m1, (__v2si)__m2);}/* Copy the 64-bit value from M1 into the lower 32-bits of the result, and the 64-bit value from M2 into the upper 32-bits of the result, all with signed saturation for values that do not fit exactly into 32-bits. */static __inline __m64_mm_packs_pi64 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wpackdss ((long long)__m1, (long long)__m2);}/* Pack the four 16-bit values from M1 into the lower four 8-bit values of the result, and the four 16-bit values from M2 into the upper four 8-bit values of the result, all with unsigned saturation. */static __inline __m64_mm_packs_pu16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wpackhus ((__v4hi)__m1, (__v4hi)__m2);}/* Pack the two 32-bit values from M1 into the lower two 16-bit values of the result, and the two 32-bit values from M2 into the upper two 16-bit values of the result, all with unsigned saturation. */static __inline __m64_mm_packs_pu32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wpackwus ((__v2si)__m1, (__v2si)__m2);}/* Copy the 64-bit value from M1 into the lower 32-bits of the result, and the 64-bit value from M2 into the upper 32-bits of the result, all with unsigned saturation for values that do not fit exactly into 32-bits. */static __inline __m64_mm_packs_pu64 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wpackdus ((long long)__m1, (long long)__m2);}/* Interleave the four 8-bit values from the high half of M1 with the four 8-bit values from the high half of M2. */static __inline __m64_mm_unpackhi_pi8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wunpckihb ((__v8qi)__m1, (__v8qi)__m2);}/* Interleave the two 16-bit values from the high half of M1 with the two 16-bit values from the high half of M2. */static __inline __m64_mm_unpackhi_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wunpckihh ((__v4hi)__m1, (__v4hi)__m2);}/* Interleave the 32-bit value from the high half of M1 with the 32-bit value from the high half of M2. */static __inline __m64_mm_unpackhi_pi32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wunpckihw ((__v2si)__m1, (__v2si)__m2);}/* Interleave the four 8-bit values from the low half of M1 with the four 8-bit values from the low half of M2. */static __inline __m64_mm_unpacklo_pi8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wunpckilb ((__v8qi)__m1, (__v8qi)__m2);}/* Interleave the two 16-bit values from the low half of M1 with the two 16-bit values from the low half of M2. */static __inline __m64_mm_unpacklo_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wunpckilh ((__v4hi)__m1, (__v4hi)__m2);}/* Interleave the 32-bit value from the low half of M1 with the 32-bit value from the low half of M2. */static __inline __m64_mm_unpacklo_pi32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wunpckilw ((__v2si)__m1, (__v2si)__m2);}/* Take the four 8-bit values from the low half of M1, sign extend them, and return the result as a vector of four 16-bit quantities. */static __inline __m64_mm_unpackel_pi8 (__m64 __m1){ return (__m64) __builtin_arm_wunpckelsb ((__v8qi)__m1);}/* Take the two 16-bit values from the low half of M1, sign extend them, and return the result as a vector of two 32-bit quantities. */static __inline __m64_mm_unpackel_pi16 (__m64 __m1){ return (__m64) __builtin_arm_wunpckelsh ((__v4hi)__m1);}/* Take the 32-bit value from the low half of M1, and return it sign extended to 64 bits. */static __inline __m64_mm_unpackel_pi32 (__m64 __m1){ return (__m64) __builtin_arm_wunpckelsw ((__v2si)__m1);}/* Take the four 8-bit values from the high half of M1, sign extend them, and return the result as a vector of four 16-bit quantities. */static __inline __m64_mm_unpackeh_pi8 (__m64 __m1){ return (__m64) __builtin_arm_wunpckehsb ((__v8qi)__m1);}/* Take the two 16-bit values from the high half of M1, sign extend them, and return the result as a vector of two 32-bit quantities. */static __inline __m64_mm_unpackeh_pi16 (__m64 __m1){ return (__m64) __builtin_arm_wunpckehsh ((__v4hi)__m1);}/* Take the 32-bit value from the high half of M1, and return it sign extended to 64 bits. */static __inline __m64_mm_unpackeh_pi32 (__m64 __m1){ return (__m64) __builtin_arm_wunpckehsw ((__v2si)__m1);}/* Take the four 8-bit values from the low half of M1, zero extend them, and return the result as a vector of four 16-bit quantities. */static __inline __m64_mm_unpackel_pu8 (__m64 __m1){ return (__m64) __builtin_arm_wunpckelub ((__v8qi)__m1);}/* Take the two 16-bit values from the low half of M1, zero extend them, and return the result as a vector of two 32-bit quantities. */static __inline __m64_mm_unpackel_pu16 (__m64 __m1){ return (__m64) __builtin_arm_wunpckeluh ((__v4hi)__m1);}/* Take the 32-bit value from the low half of M1, and return it zero extended to 64 bits. */static __inline __m64_mm_unpackel_pu32 (__m64 __m1){ return (__m64) __builtin_arm_wunpckeluw ((__v2si)__m1);}/* Take the four 8-bit values from the high half of M1, zero extend them, and return the result as a vector of four 16-bit quantities. */static __inline __m64_mm_unpackeh_pu8 (__m64 __m1){ return (__m64) __builtin_arm_wunpckehub ((__v8qi)__m1);}/* Take the two 16-bit values from the high half of M1, zero extend them, and return the result as a vector of two 32-bit quantities. */static __inline __m64_mm_unpackeh_pu16 (__m64 __m1){ return (__m64) __builtin_arm_wunpckehuh ((__v4hi)__m1);}/* Take the 32-bit value from the high half of M1, and return it zero extended to 64 bits. */static __inline __m64_mm_unpackeh_pu32 (__m64 __m1){ return (__m64) __builtin_arm_wunpckehuw ((__v2si)__m1);}/* Add the 8-bit values in M1 to the 8-bit values in M2. */static __inline __m64_mm_add_pi8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddb ((__v8qi)__m1, (__v8qi)__m2);}/* Add the 16-bit values in M1 to the 16-bit values in M2. */static __inline __m64_mm_add_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddh ((__v4hi)__m1, (__v4hi)__m2);}/* Add the 32-bit values in M1 to the 32-bit values in M2. */static __inline __m64_mm_add_pi32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddw ((__v2si)__m1, (__v2si)__m2);}/* Add the 8-bit values in M1 to the 8-bit values in M2 using signed saturated arithmetic. */static __inline __m64_mm_adds_pi8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddbss ((__v8qi)__m1, (__v8qi)__m2);}/* Add the 16-bit values in M1 to the 16-bit values in M2 using signed saturated arithmetic. */static __inline __m64_mm_adds_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddhss ((__v4hi)__m1, (__v4hi)__m2);}/* Add the 32-bit values in M1 to the 32-bit values in M2 using signed saturated arithmetic. */static __inline __m64_mm_adds_pi32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddwss ((__v2si)__m1, (__v2si)__m2);}/* Add the 8-bit values in M1 to the 8-bit values in M2 using unsigned saturated arithmetic. */static __inline __m64_mm_adds_pu8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddbus ((__v8qi)__m1, (__v8qi)__m2);}/* Add the 16-bit values in M1 to the 16-bit values in M2 using unsigned saturated arithmetic. */static __inline __m64_mm_adds_pu16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddhus ((__v4hi)__m1, (__v4hi)__m2);}/* Add the 32-bit values in M1 to the 32-bit values in M2 using unsigned saturated arithmetic. */static __inline __m64_mm_adds_pu32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_waddwus ((__v2si)__m1, (__v2si)__m2);}/* Subtract the 8-bit values in M2 from the 8-bit values in M1. */static __inline __m64_mm_sub_pi8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubb ((__v8qi)__m1, (__v8qi)__m2);}/* Subtract the 16-bit values in M2 from the 16-bit values in M1. */static __inline __m64_mm_sub_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubh ((__v4hi)__m1, (__v4hi)__m2);}/* Subtract the 32-bit values in M2 from the 32-bit values in M1. */static __inline __m64_mm_sub_pi32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubw ((__v2si)__m1, (__v2si)__m2);}/* Subtract the 8-bit values in M2 from the 8-bit values in M1 using signed saturating arithmetic. */static __inline __m64_mm_subs_pi8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubbss ((__v8qi)__m1, (__v8qi)__m2);}/* Subtract the 16-bit values in M2 from the 16-bit values in M1 using signed saturating arithmetic. */static __inline __m64_mm_subs_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubhss ((__v4hi)__m1, (__v4hi)__m2);}/* Subtract the 32-bit values in M2 from the 32-bit values in M1 using signed saturating arithmetic. */static __inline __m64_mm_subs_pi32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubwss ((__v2si)__m1, (__v2si)__m2);}/* Subtract the 8-bit values in M2 from the 8-bit values in M1 using unsigned saturating arithmetic. */static __inline __m64_mm_subs_pu8 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubbus ((__v8qi)__m1, (__v8qi)__m2);}/* Subtract the 16-bit values in M2 from the 16-bit values in M1 using unsigned saturating arithmetic. */static __inline __m64_mm_subs_pu16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubhus ((__v4hi)__m1, (__v4hi)__m2);}/* Subtract the 32-bit values in M2 from the 32-bit values in M1 using unsigned saturating arithmetic. */static __inline __m64_mm_subs_pu32 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wsubwus ((__v2si)__m1, (__v2si)__m2);}/* Multiply four 16-bit values in M1 by four 16-bit values in M2 producing four 32-bit intermediate results, which are then summed by pairs to produce two 32-bit results. */static __inline __m64_mm_madd_pi16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wmadds ((__v4hi)__m1, (__v4hi)__m2);}/* Multiply four 16-bit values in M1 by four 16-bit values in M2 producing four 32-bit intermediate results, which are then summed by pairs to produce two 32-bit results. */static __inline __m64_mm_madd_pu16 (__m64 __m1, __m64 __m2){ return (__m64) __builtin_arm_wmaddu ((__v4hi)__m1, (__v4hi)__m2);}/* Multiply four signed 16-bit values in M1 by four signed 16-bit values in M2 and produce the high 16 bits of the 32-bit results. */static __inline __m64_mm_mulhi_pi16 (__m64 __m1, __m64 __m2)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -