1 /**************************************************************************
3 * Copyright 2010 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 * USE OR OTHER DEALINGS IN THE SOFTWARE.
22 * The above copyright notice and this permission notice (including the
23 * next paragraph) shall be included in all copies or substantial portions
26 **************************************************************************/
28 #ifndef _LP_DEBUG_INTRIN_H_
29 #define _LP_DEBUG_INTRIN_H_
31 #include "pipe/p_config.h"
33 #if defined(PIPE_ARCH_SSE)
35 #include <emmintrin.h>
37 static INLINE
void print_epi8(const char *name
, __m128i r
)
39 union { __m128i m
; ubyte ub
[16]; } u
;
60 u
.ub
[0], u
.ub
[1], u
.ub
[2], u
.ub
[3],
61 u
.ub
[4], u
.ub
[5], u
.ub
[6], u
.ub
[7],
62 u
.ub
[8], u
.ub
[9], u
.ub
[10], u
.ub
[11],
63 u
.ub
[12], u
.ub
[13], u
.ub
[14], u
.ub
[15]);
66 static INLINE
void print_epi16(const char *name
, __m128i r
)
68 union { __m128i m
; ushort us
[8]; } u
;
81 u
.us
[0], u
.us
[1], u
.us
[2], u
.us
[3],
82 u
.us
[4], u
.us
[5], u
.us
[6], u
.us
[7]);
85 static INLINE
void print_epi32(const char *name
, __m128i r
)
87 union { __m128i m
; uint ui
[4]; } u
;
96 u
.ui
[0], u
.ui
[1], u
.ui
[2], u
.ui
[3]);
99 static INLINE
void print_ps(const char *name
, __m128 r
)
101 union { __m128 m
; float f
[4]; } u
;
110 u
.f
[0], u
.f
[1], u
.f
[2], u
.f
[3]);