diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-07-08 23:10:00 +0300 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-10-16 18:27:45 +0300 |
commit | 90bcafa495c1074b0ea1d35f99aa4837917494bd (patch) | |
tree | 591189385c2fbea4df1a384cbce22c33e87d1fb2 | |
parent | d5f2f39319fc358cccda60abe0bc927bd27131c1 (diff) |
MIPS: skip runtime detection for DSPr2 if -mdspr2 option is in CFLAGS
This provides a way to enable MIPS DSP ASE optimizations if running
under qemu-user (where /proc/cpuinfo contains information about the
host processor instead of the emulated one). Can be used for running
pixman test suite in qemu-user when having no access to real MIPS
hardware.
-rw-r--r-- | pixman/pixman-mips.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/pixman/pixman-mips.c b/pixman/pixman-mips.c index 2b280c6..3048813 100644 --- a/pixman/pixman-mips.c +++ b/pixman/pixman-mips.c @@ -75,9 +75,19 @@ _pixman_mips_get_implementations (pixman_implementation_t *imp) #endif #ifdef USE_MIPS_DSPR2 - /* Only currently available MIPS core that supports DSPr2 is 74K. */ - if (!_pixman_disabled ("mips-dspr2") && have_feature ("MIPS 74K")) - imp = _pixman_implementation_create_mips_dspr2 (imp); + if (!_pixman_disabled ("mips-dspr2")) + { + int already_compiling_everything_for_dspr2 = 0; +#if defined(__mips_dsp) && (__mips_dsp_rev >= 2) + already_compiling_everything_for_dspr2 = 1; +#endif + if (already_compiling_everything_for_dspr2 || + /* Only currently available MIPS core that supports DSPr2 is 74K. */ + have_feature ("MIPS 74K")) + { + imp = _pixman_implementation_create_mips_dspr2 (imp); + } + } #endif return imp; |