1 
2 /*---------------------------------------------------------------*/
3 /*--- begin                            host_generic_simd256.c ---*/
4 /*---------------------------------------------------------------*/
5 
6 /*
7    This file is part of Valgrind, a dynamic binary instrumentation
8    framework.
9 
10    Copyright (C) 2012-2013 OpenWorks GbR
11       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 256-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    from IR. */
35 
36 #include "libvex_basictypes.h"
37 #include "host_generic_simd256.h"
38 
39 
40 void VEX_REGPARM(3)
h_generic_calc_Perm32x8(V256 * res,V256 * argL,V256 * argR)41      h_generic_calc_Perm32x8 ( /*OUT*/V256* res,
42                                V256* argL, V256* argR )
43 {
44    res->w32[0] = argL->w32[ argR->w32[0] & 7 ];
45    res->w32[1] = argL->w32[ argR->w32[1] & 7 ];
46    res->w32[2] = argL->w32[ argR->w32[2] & 7 ];
47    res->w32[3] = argL->w32[ argR->w32[3] & 7 ];
48    res->w32[4] = argL->w32[ argR->w32[4] & 7 ];
49    res->w32[5] = argL->w32[ argR->w32[5] & 7 ];
50    res->w32[6] = argL->w32[ argR->w32[6] & 7 ];
51    res->w32[7] = argL->w32[ argR->w32[7] & 7 ];
52 }
53 
54 
55 /*---------------------------------------------------------------*/
56 /*--- end                              host_generic_simd256.c ---*/
57 /*---------------------------------------------------------------*/
58