Home | History | Annotate | Download | only in priv
      1 
      2 /*---------------------------------------------------------------*/
      3 /*--- begin                             host_generic_simd128.h ---*/
      4 /*---------------------------------------------------------------*/
      5 
      6 /*
      7    This file is part of Valgrind, a dynamic binary instrumentation
      8    framework.
      9 
     10    Copyright (C) 2010-2015 OpenWorks GbR
     11       info (at) open-works.net
     12 
     13    This program is free software; you can redistribute it and/or
     14    modify it under the terms of the GNU General Public License as
     15    published by the Free Software Foundation; either version 2 of the
     16    License, or (at your option) any later version.
     17 
     18    This program is distributed in the hope that it will be useful, but
     19    WITHOUT ANY WARRANTY; without even the implied warranty of
     20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     21    General Public License for more details.
     22 
     23    You should have received a copy of the GNU General Public License
     24    along with this program; if not, write to the Free Software
     25    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     26    02110-1301, USA.
     27 
     28    The GNU General Public License is contained in the file COPYING.
     29 */
     30 
     31 /* Generic helper functions for doing 128-bit SIMD arithmetic in cases
     32    where the instruction selectors cannot generate code in-line.
     33    These are purely back-end entities and cannot be seen/referenced
     34    as clean helper functions from IR.
     35 
     36    These will get called from generated code and therefore should be
     37    well behaved -- no floating point or mmx insns, just straight
     38    integer code.
     39 
     40    Each function implements the correspondingly-named IR primop.
     41 */
     42 
     43 #ifndef __VEX_HOST_GENERIC_SIMD128_H
     44 #define __VEX_HOST_GENERIC_SIMD128_H
     45 
     46 #include "libvex_basictypes.h"
     47 
     48 extern VEX_REGPARM(3)
     49        void h_generic_calc_Mul32x4    ( /*OUT*/V128*, V128*, V128* );
     50 extern VEX_REGPARM(3)
     51        void h_generic_calc_Max32Sx4   ( /*OUT*/V128*, V128*, V128* );
     52 extern VEX_REGPARM(3)
     53        void h_generic_calc_Min32Sx4   ( /*OUT*/V128*, V128*, V128* );
     54 extern VEX_REGPARM(3)
     55        void h_generic_calc_Max32Ux4   ( /*OUT*/V128*, V128*, V128* );
     56 extern VEX_REGPARM(3)
     57        void h_generic_calc_Min32Ux4   ( /*OUT*/V128*, V128*, V128* );
     58 extern VEX_REGPARM(3)
     59        void h_generic_calc_Max16Ux8   ( /*OUT*/V128*, V128*, V128* );
     60 extern VEX_REGPARM(3)
     61        void h_generic_calc_Min16Ux8   ( /*OUT*/V128*, V128*, V128* );
     62 extern VEX_REGPARM(3)
     63        void h_generic_calc_Max8Sx16   ( /*OUT*/V128*, V128*, V128* );
     64 extern VEX_REGPARM(3)
     65        void h_generic_calc_Min8Sx16   ( /*OUT*/V128*, V128*, V128* );
     66 extern VEX_REGPARM(3)
     67        void h_generic_calc_CmpEQ64x2  ( /*OUT*/V128*, V128*, V128* );
     68 extern VEX_REGPARM(3)
     69        void h_generic_calc_CmpGT64Sx2 ( /*OUT*/V128*, V128*, V128* );
     70 
     71 extern /*not-regparm*/
     72        void h_generic_calc_SarN64x2   ( /*OUT*/V128*, V128*, UInt );
     73 extern /*not-regparm*/
     74        void h_generic_calc_SarN8x16   ( /*OUT*/V128*, V128*, UInt );
     75 
     76 extern VEX_REGPARM(3)
     77        void h_generic_calc_QNarrowBin32Sto16Ux8
     78                                       ( /*OUT*/V128*, V128*, V128* );
     79 extern VEX_REGPARM(3)
     80        void h_generic_calc_NarrowBin16to8x16
     81                                       ( /*OUT*/V128*, V128*, V128* );
     82 extern VEX_REGPARM(3)
     83        void h_generic_calc_NarrowBin32to16x8
     84                                       ( /*OUT*/V128*, V128*, V128* );
     85 
     86 extern VEX_REGPARM(3)
     87        void h_generic_calc_Perm32x4   ( /*OUT*/V128*, V128*, V128* );
     88 
     89 extern /*not-regparm*/
     90        UInt  h_generic_calc_GetMSBs8x16 ( ULong w64hi, ULong w64lo );
     91 
     92 #endif /* ndef __VEX_HOST_GENERIC_SIMD128_H */
     93 
     94 /*---------------------------------------------------------------*/
     95 /*--- end                              host_generic_simd128.h ---*/
     96 /*---------------------------------------------------------------*/
     97