Revision b8659d94 libavcodec/ppc/check_altivec.c

View differences:

libavcodec/ppc/check_altivec.c
54 54

  
55 55
    if (err == 0) return (has_vu != 0);
56 56
    return 0;
57
#elif defined(RUNTIME_CPUDETECT)
58
    int proc_ver;
59
    // support of mfspr PVR emulation added in Linux 2.6.17
60
    asm volatile("mfspr %0, 287" : "=r" (proc_ver));
61
    proc_ver >>= 16;
62
    if (proc_ver  & 0x8000 ||
63
        proc_ver == 0x000c ||
64
        proc_ver == 0x0039 || proc_ver == 0x003c ||
65
        proc_ver == 0x0044 || proc_ver == 0x0045 ||
66
        proc_ver == 0x0070)
67
        return 1;
68
    return 0;
57 69
#else
58 70
    // since we were compiled for altivec, just assume we have it
59 71
    // until someone comes up with a proper way (not involving signal hacks).

Also available in: Unified diff