blob: 0b63ab36426b98666c1a84a029d521764a48cc93 [file] [log] [blame]
sewardj69d98e32010-06-18 08:17:41 +00001
2/*---------------------------------------------------------------*/
3/*--- begin host_generic_simd128.h ---*/
4/*---------------------------------------------------------------*/
5
6/*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
9
Elliott Hughesed398002017-06-21 14:41:24 -070010 Copyright (C) 2010-2017 OpenWorks GbR
sewardj69d98e32010-06-18 08:17:41 +000011 info@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
sewardj69d98e32010-06-18 08:17:41 +000046#include "libvex_basictypes.h"
47
sewardjad2c9ea2011-10-22 09:32:16 +000048extern VEX_REGPARM(3)
49 void h_generic_calc_Mul32x4 ( /*OUT*/V128*, V128*, V128* );
50extern VEX_REGPARM(3)
51 void h_generic_calc_Max32Sx4 ( /*OUT*/V128*, V128*, V128* );
52extern VEX_REGPARM(3)
53 void h_generic_calc_Min32Sx4 ( /*OUT*/V128*, V128*, V128* );
54extern VEX_REGPARM(3)
55 void h_generic_calc_Max32Ux4 ( /*OUT*/V128*, V128*, V128* );
56extern VEX_REGPARM(3)
57 void h_generic_calc_Min32Ux4 ( /*OUT*/V128*, V128*, V128* );
58extern VEX_REGPARM(3)
59 void h_generic_calc_Max16Ux8 ( /*OUT*/V128*, V128*, V128* );
60extern VEX_REGPARM(3)
61 void h_generic_calc_Min16Ux8 ( /*OUT*/V128*, V128*, V128* );
62extern VEX_REGPARM(3)
63 void h_generic_calc_Max8Sx16 ( /*OUT*/V128*, V128*, V128* );
64extern VEX_REGPARM(3)
65 void h_generic_calc_Min8Sx16 ( /*OUT*/V128*, V128*, V128* );
66extern VEX_REGPARM(3)
67 void h_generic_calc_CmpEQ64x2 ( /*OUT*/V128*, V128*, V128* );
68extern VEX_REGPARM(3)
69 void h_generic_calc_CmpGT64Sx2 ( /*OUT*/V128*, V128*, V128* );
sewardj69d98e32010-06-18 08:17:41 +000070
sewardjad2c9ea2011-10-22 09:32:16 +000071extern /*not-regparm*/
72 void h_generic_calc_SarN64x2 ( /*OUT*/V128*, V128*, UInt );
73extern /*not-regparm*/
74 void h_generic_calc_SarN8x16 ( /*OUT*/V128*, V128*, UInt );
sewardj69d98e32010-06-18 08:17:41 +000075
sewardjad2c9ea2011-10-22 09:32:16 +000076extern VEX_REGPARM(3)
77 void h_generic_calc_QNarrowBin32Sto16Ux8
sewardj2260b992011-06-15 16:05:07 +000078 ( /*OUT*/V128*, V128*, V128* );
sewardjad2c9ea2011-10-22 09:32:16 +000079extern VEX_REGPARM(3)
80 void h_generic_calc_NarrowBin16to8x16
81 ( /*OUT*/V128*, V128*, V128* );
82extern VEX_REGPARM(3)
83 void h_generic_calc_NarrowBin32to16x8
84 ( /*OUT*/V128*, V128*, V128* );
sewardj69d98e32010-06-18 08:17:41 +000085
sewardjd8bca7e2012-06-20 11:46:19 +000086extern VEX_REGPARM(3)
87 void h_generic_calc_Perm32x4 ( /*OUT*/V128*, V128*, V128* );
88
sewardj78a20592012-12-13 18:29:56 +000089extern /*not-regparm*/
90 UInt h_generic_calc_GetMSBs8x16 ( ULong w64hi, ULong w64lo );
91
sewardj69d98e32010-06-18 08:17:41 +000092#endif /* ndef __VEX_HOST_GENERIC_SIMD128_H */
93
94/*---------------------------------------------------------------*/
95/*--- end host_generic_simd128.h ---*/
96/*---------------------------------------------------------------*/