123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690 |
- /* Intrinsics for ST Microelectronics Loongson-2E/2F SIMD operations.
- Copyright (C) 2008-2015 Free Software Foundation, Inc.
- Contributed by CodeSourcery.
- 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 3, 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.
- Under Section 7 of GPL version 3, you are granted additional
- permissions described in the GCC Runtime Library Exception, version
- 3.1, as published by the Free Software Foundation.
- You should have received a copy of the GNU General Public License and
- a copy of the GCC Runtime Library Exception along with this program;
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
- #ifndef _GCC_LOONGSON_H
- #define _GCC_LOONGSON_H
- #if !defined(__mips_loongson_vector_rev)
- # error "You must select -march=loongson2e or -march=loongson2f to use loongson.h"
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <stdint.h>
- /* Vectors of unsigned bytes, halfwords and words. */
- typedef uint8_t uint8x8_t __attribute__((vector_size (8)));
- typedef uint16_t uint16x4_t __attribute__((vector_size (8)));
- typedef uint32_t uint32x2_t __attribute__((vector_size (8)));
- /* Vectors of signed bytes, halfwords and words. */
- typedef int8_t int8x8_t __attribute__((vector_size (8)));
- typedef int16_t int16x4_t __attribute__((vector_size (8)));
- typedef int32_t int32x2_t __attribute__((vector_size (8)));
- /* SIMD intrinsics.
- Unless otherwise noted, calls to the functions below will expand into
- precisely one machine instruction, modulo any moves required to
- satisfy register allocation constraints. */
- /* Pack with signed saturation. */
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- packsswh (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_packsswh (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- packsshb (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_packsshb (s, t);
- }
- /* Pack with unsigned saturation. */
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- packushb (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_packushb (s, t);
- }
- /* Vector addition, treating overflow by wraparound. */
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- paddw_u (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_paddw_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- paddh_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_paddh_u (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- paddb_u (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_paddb_u (s, t);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- paddw_s (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_paddw_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- paddh_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_paddh_s (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- paddb_s (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_paddb_s (s, t);
- }
- /* Addition of doubleword integers, treating overflow by wraparound. */
- __extension__ static __inline uint64_t __attribute__ ((__always_inline__))
- paddd_u (uint64_t s, uint64_t t)
- {
- return __builtin_loongson_paddd_u (s, t);
- }
- __extension__ static __inline int64_t __attribute__ ((__always_inline__))
- paddd_s (int64_t s, int64_t t)
- {
- return __builtin_loongson_paddd_s (s, t);
- }
- /* Vector addition, treating overflow by signed saturation. */
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- paddsh (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_paddsh (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- paddsb (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_paddsb (s, t);
- }
- /* Vector addition, treating overflow by unsigned saturation. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- paddush (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_paddush (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- paddusb (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_paddusb (s, t);
- }
- /* Logical AND NOT. */
- __extension__ static __inline uint64_t __attribute__ ((__always_inline__))
- pandn_ud (uint64_t s, uint64_t t)
- {
- return __builtin_loongson_pandn_ud (s, t);
- }
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- pandn_uw (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_pandn_uw (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pandn_uh (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pandn_uh (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pandn_ub (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_pandn_ub (s, t);
- }
- __extension__ static __inline int64_t __attribute__ ((__always_inline__))
- pandn_sd (int64_t s, int64_t t)
- {
- return __builtin_loongson_pandn_sd (s, t);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- pandn_sw (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_pandn_sw (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pandn_sh (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pandn_sh (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- pandn_sb (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_pandn_sb (s, t);
- }
- /* Average. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pavgh (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pavgh (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pavgb (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_pavgb (s, t);
- }
- /* Equality test. */
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- pcmpeqw_u (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_pcmpeqw_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pcmpeqh_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pcmpeqh_u (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pcmpeqb_u (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_pcmpeqb_u (s, t);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- pcmpeqw_s (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_pcmpeqw_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pcmpeqh_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pcmpeqh_s (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- pcmpeqb_s (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_pcmpeqb_s (s, t);
- }
- /* Greater-than test. */
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- pcmpgtw_u (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_pcmpgtw_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pcmpgth_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pcmpgth_u (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pcmpgtb_u (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_pcmpgtb_u (s, t);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- pcmpgtw_s (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_pcmpgtw_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pcmpgth_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pcmpgth_s (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- pcmpgtb_s (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_pcmpgtb_s (s, t);
- }
- /* Extract halfword. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pextrh_u (uint16x4_t s, int field /* 0--3 */)
- {
- return __builtin_loongson_pextrh_u (s, field);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pextrh_s (int16x4_t s, int field /* 0--3 */)
- {
- return __builtin_loongson_pextrh_s (s, field);
- }
- /* Insert halfword. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pinsrh_0_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pinsrh_0_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pinsrh_1_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pinsrh_1_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pinsrh_2_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pinsrh_2_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pinsrh_3_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pinsrh_3_u (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pinsrh_0_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pinsrh_0_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pinsrh_1_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pinsrh_1_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pinsrh_2_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pinsrh_2_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pinsrh_3_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pinsrh_3_s (s, t);
- }
- /* Multiply and add. */
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- pmaddhw (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pmaddhw (s, t);
- }
- /* Maximum of signed halfwords. */
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pmaxsh (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pmaxsh (s, t);
- }
- /* Maximum of unsigned bytes. */
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pmaxub (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_pmaxub (s, t);
- }
- /* Minimum of signed halfwords. */
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pminsh (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pminsh (s, t);
- }
- /* Minimum of unsigned bytes. */
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pminub (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_pminub (s, t);
- }
- /* Move byte mask. */
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pmovmskb_u (uint8x8_t s)
- {
- return __builtin_loongson_pmovmskb_u (s);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- pmovmskb_s (int8x8_t s)
- {
- return __builtin_loongson_pmovmskb_s (s);
- }
- /* Multiply unsigned integers and store high result. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pmulhuh (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_pmulhuh (s, t);
- }
- /* Multiply signed integers and store high result. */
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pmulhh (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pmulhh (s, t);
- }
- /* Multiply signed integers and store low result. */
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pmullh (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_pmullh (s, t);
- }
- /* Multiply unsigned word integers. */
- __extension__ static __inline int64_t __attribute__ ((__always_inline__))
- pmuluw (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_pmuluw (s, t);
- }
- /* Absolute difference. */
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- pasubub (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_pasubub (s, t);
- }
- /* Sum of unsigned byte integers. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- biadd (uint8x8_t s)
- {
- return __builtin_loongson_biadd (s);
- }
- /* Sum of absolute differences.
- Note that this intrinsic expands into two machine instructions:
- PASUBUB followed by BIADD. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- psadbh (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_psadbh (s, t);
- }
- /* Shuffle halfwords. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- pshufh_u (uint16x4_t dest, uint16x4_t s, uint8_t order)
- {
- return __builtin_loongson_pshufh_u (s, order);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- pshufh_s (int16x4_t dest, int16x4_t s, uint8_t order)
- {
- return __builtin_loongson_pshufh_s (s, order);
- }
- /* Shift left logical. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- psllh_u (uint16x4_t s, uint8_t amount)
- {
- return __builtin_loongson_psllh_u (s, amount);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- psllh_s (int16x4_t s, uint8_t amount)
- {
- return __builtin_loongson_psllh_s (s, amount);
- }
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- psllw_u (uint32x2_t s, uint8_t amount)
- {
- return __builtin_loongson_psllw_u (s, amount);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- psllw_s (int32x2_t s, uint8_t amount)
- {
- return __builtin_loongson_psllw_s (s, amount);
- }
- /* Shift right logical. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- psrlh_u (uint16x4_t s, uint8_t amount)
- {
- return __builtin_loongson_psrlh_u (s, amount);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- psrlh_s (int16x4_t s, uint8_t amount)
- {
- return __builtin_loongson_psrlh_s (s, amount);
- }
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- psrlw_u (uint32x2_t s, uint8_t amount)
- {
- return __builtin_loongson_psrlw_u (s, amount);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- psrlw_s (int32x2_t s, uint8_t amount)
- {
- return __builtin_loongson_psrlw_s (s, amount);
- }
- /* Shift right arithmetic. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- psrah_u (uint16x4_t s, uint8_t amount)
- {
- return __builtin_loongson_psrah_u (s, amount);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- psrah_s (int16x4_t s, uint8_t amount)
- {
- return __builtin_loongson_psrah_s (s, amount);
- }
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- psraw_u (uint32x2_t s, uint8_t amount)
- {
- return __builtin_loongson_psraw_u (s, amount);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- psraw_s (int32x2_t s, uint8_t amount)
- {
- return __builtin_loongson_psraw_s (s, amount);
- }
- /* Vector subtraction, treating overflow by wraparound. */
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- psubw_u (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_psubw_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- psubh_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_psubh_u (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- psubb_u (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_psubb_u (s, t);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- psubw_s (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_psubw_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- psubh_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_psubh_s (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- psubb_s (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_psubb_s (s, t);
- }
- /* Subtraction of doubleword integers, treating overflow by wraparound. */
- __extension__ static __inline uint64_t __attribute__ ((__always_inline__))
- psubd_u (uint64_t s, uint64_t t)
- {
- return __builtin_loongson_psubd_u (s, t);
- }
- __extension__ static __inline int64_t __attribute__ ((__always_inline__))
- psubd_s (int64_t s, int64_t t)
- {
- return __builtin_loongson_psubd_s (s, t);
- }
- /* Vector subtraction, treating overflow by signed saturation. */
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- psubsh (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_psubsh (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- psubsb (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_psubsb (s, t);
- }
- /* Vector subtraction, treating overflow by unsigned saturation. */
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- psubush (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_psubush (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- psubusb (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_psubusb (s, t);
- }
- /* Unpack high data. */
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- punpckhwd_u (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_punpckhwd_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- punpckhhw_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_punpckhhw_u (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- punpckhbh_u (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_punpckhbh_u (s, t);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- punpckhwd_s (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_punpckhwd_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- punpckhhw_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_punpckhhw_s (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- punpckhbh_s (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_punpckhbh_s (s, t);
- }
- /* Unpack low data. */
- __extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
- punpcklwd_u (uint32x2_t s, uint32x2_t t)
- {
- return __builtin_loongson_punpcklwd_u (s, t);
- }
- __extension__ static __inline uint16x4_t __attribute__ ((__always_inline__))
- punpcklhw_u (uint16x4_t s, uint16x4_t t)
- {
- return __builtin_loongson_punpcklhw_u (s, t);
- }
- __extension__ static __inline uint8x8_t __attribute__ ((__always_inline__))
- punpcklbh_u (uint8x8_t s, uint8x8_t t)
- {
- return __builtin_loongson_punpcklbh_u (s, t);
- }
- __extension__ static __inline int32x2_t __attribute__ ((__always_inline__))
- punpcklwd_s (int32x2_t s, int32x2_t t)
- {
- return __builtin_loongson_punpcklwd_s (s, t);
- }
- __extension__ static __inline int16x4_t __attribute__ ((__always_inline__))
- punpcklhw_s (int16x4_t s, int16x4_t t)
- {
- return __builtin_loongson_punpcklhw_s (s, t);
- }
- __extension__ static __inline int8x8_t __attribute__ ((__always_inline__))
- punpcklbh_s (int8x8_t s, int8x8_t t)
- {
- return __builtin_loongson_punpcklbh_s (s, t);
- }
- #ifdef __cplusplus
- }
- #endif
- #endif
|