1
/* detect.c, this file is part of the
2
* AltiVec optimized library for MJPEG tools MPEG-1/2 Video Encoder
3
* Copyright (C) 2002 James Klicman <james@klicman.org>
5
* This library is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
/* include last to ensure AltiVec type semantics, especially for bool. */
30
* Functions containing AltiVec code have additional VRSAVE instructions
31
* at the beginning and end of the function. To avoid executing any AltiVec
32
* instructions before our signal handler is setup the AltiVec code is
33
* encapsulated in a function.
35
* The automatic VRSAVE instructions can be disabled with
36
* #pragma altivec_vrsave off
38
* Storing vector registers to memory shouldn't alter the state of the vectors
39
* or the vector unit. The following function contains a single vector stvx
42
#pragma altivec_vrsave off
45
register vector unsigned int v0 asm ("v0");
47
vector unsigned int align16;
51
vec_st(v0, 0, copy.v0);
56
* detect_altivec() moved to ../cpu_accel.c