2 /*---------------------------------------------------------------*/
3 /*--- begin host_generic_simd128.h ---*/
4 /*---------------------------------------------------------------*/
7 This file is part of Valgrind, a dynamic binary instrumentation
10 Copyright (C) 2010-2017 OpenWorks GbR
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.
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.
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
28 The GNU General Public License is contained in the file COPYING.
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.
36 These will get called from generated code and therefore should be
37 well behaved -- no floating point or mmx insns, just straight
40 Each function implements the correspondingly-named IR primop.
43 #ifndef __VEX_HOST_GENERIC_SIMD128_H
44 #define __VEX_HOST_GENERIC_SIMD128_H
46 #include "libvex_basictypes.h"
49 void h_generic_calc_Mul32x4 ( /*OUT*/V128
*, V128
*, V128
* );
51 void h_generic_calc_Max32Sx4 ( /*OUT*/V128
*, V128
*, V128
* );
53 void h_generic_calc_Min32Sx4 ( /*OUT*/V128
*, V128
*, V128
* );
55 void h_generic_calc_Max32Ux4 ( /*OUT*/V128
*, V128
*, V128
* );
57 void h_generic_calc_Min32Ux4 ( /*OUT*/V128
*, V128
*, V128
* );
59 void h_generic_calc_Max16Ux8 ( /*OUT*/V128
*, V128
*, V128
* );
61 void h_generic_calc_Min16Ux8 ( /*OUT*/V128
*, V128
*, V128
* );
63 void h_generic_calc_Max8Sx16 ( /*OUT*/V128
*, V128
*, V128
* );
65 void h_generic_calc_Min8Sx16 ( /*OUT*/V128
*, V128
*, V128
* );
67 void h_generic_calc_CmpEQ64x2 ( /*OUT*/V128
*, V128
*, V128
* );
69 void h_generic_calc_CmpGT64Sx2 ( /*OUT*/V128
*, V128
*, V128
* );
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
);
77 void h_generic_calc_QNarrowBin32Sto16Ux8
78 ( /*OUT*/V128
*, V128
*, V128
* );
80 void h_generic_calc_NarrowBin16to8x16
81 ( /*OUT*/V128
*, V128
*, V128
* );
83 void h_generic_calc_NarrowBin32to16x8
84 ( /*OUT*/V128
*, V128
*, V128
* );
87 void h_generic_calc_Perm32x4 ( /*OUT*/V128
*, V128
*, V128
* );
89 extern /*not-regparm*/
90 UInt
h_generic_calc_GetMSBs8x16 ( ULong w64hi
, ULong w64lo
);
92 #endif /* ndef __VEX_HOST_GENERIC_SIMD128_H */
94 /*---------------------------------------------------------------*/
95 /*--- end host_generic_simd128.h ---*/
96 /*---------------------------------------------------------------*/