[PATCH] iWMMXt support was Re: [Ffmpeg-devel] iWMMXt support

Guillaume POIRIER poirierg
Thu Mar 15 00:10:56 CET 2007


Hi,

On 3/15/07, M?ns Rullg?rd <mans at mansr.com> wrote:
> Tim Chick <chick at computergeek.freeserve.co.uk> writes:
>
> > On Wednesday 14 March 2007 22:52, M?ns Rullg?rd wrote:

> >> Why not get rid of that function completely?
> >
> > 'Cause it's not "my code" and I was trying to change it as little as
> > possible :-) Also, it's a good placeholder for where the run-time
> > checking might one day go? The other architectures have a similar
> > function to do run time checking. If you think it's best to get rid
> > of it I'll happily generate another patch.
>
> Feature detection can only be done with privileged instructions on
> ARM.  As OS might provide some facility to determine CPU features, but
> it would be non-standard.  Until such facilities exist, and we want to
> use them, we might as well keep the code clean from placeholders like
> this.  It's simple enough to add it back later should the need arise.

Couldn't be done in the same way as we do Altivec support detection on Linux?

The idea is simple: install a signal handler for SIGILL, try to
exectute an iWMMXt instruction, and if it triggers a SIGILL, then that
means that no support is there, otherwise, iWMMXt is available.

Guillaume



More information about the ffmpeg-devel mailing list