summaryrefslogtreecommitdiffstats
path: root/libavcodec/sparc
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-10-02 18:18:35 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-10-02 18:18:35 +0000
commitd9a5dab2da1220b5bec718d343ecc30e22084676 (patch)
treef5128ae9113732312f748f49749bdd17caf40d1a /libavcodec/sparc
parente0d21bfe835eec87b8c0efe6e9973ae5f588bc07 (diff)
downloadffmpeg-streaming-d9a5dab2da1220b5bec718d343ecc30e22084676.zip
ffmpeg-streaming-d9a5dab2da1220b5bec718d343ecc30e22084676.tar.gz
Remove uses of SIGILL for CPU extension detection, that method is not acceptable
in a library. Should not change anything for PPC, the autodetection is currently pointless due to other code being compiled with -maltivec as well (and detection for OSX and AmigaOS remains in place). SPARC binaries built with VIS support can now only run on systems with VIS. Originally committed as revision 10648 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/sparc')
-rw-r--r--libavcodec/sparc/dsputil_vis.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/libavcodec/sparc/dsputil_vis.c b/libavcodec/sparc/dsputil_vis.c
index 4367b72..374ec8d 100644
--- a/libavcodec/sparc/dsputil_vis.c
+++ b/libavcodec/sparc/dsputil_vis.c
@@ -26,8 +26,6 @@
#include "config.h"
#include <inttypes.h>
-#include <signal.h>
-#include <setjmp.h>
#include "dsputil.h"
@@ -3987,56 +3985,13 @@ static void MC_avg_no_round_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
/* End of no rounding code */
-static sigjmp_buf jmpbuf;
-static volatile sig_atomic_t canjump = 0;
-
-static void sigill_handler (int sig)
-{
- if (!canjump) {
- signal (sig, SIG_DFL);
- raise (sig);
- }
-
- canjump = 0;
- siglongjmp (jmpbuf, 1);
-}
-
#define ACCEL_SPARC_VIS 1
#define ACCEL_SPARC_VIS2 2
static int vis_level ()
{
- int accel = 0;
-
- signal (SIGILL, sigill_handler);
- if (sigsetjmp (jmpbuf, 1)) {
- signal (SIGILL, SIG_DFL);
- return accel;
- }
-
- canjump = 1;
-
- /* pdist %f0, %f0, %f0 */
- __asm__ __volatile__(".word\t0x81b007c0");
-
- canjump = 0;
accel |= ACCEL_SPARC_VIS;
-
- if (sigsetjmp (jmpbuf, 1)) {
- signal (SIGILL, SIG_DFL);
- return accel;
- }
-
- canjump = 1;
-
- /* edge8n %g0, %g0, %g0 */
- __asm__ __volatile__(".word\t0x81b00020");
-
- canjump = 0;
accel |= ACCEL_SPARC_VIS2;
-
- signal (SIGILL, SIG_DFL);
-
return accel;
}
OpenPOWER on IntegriCloud