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

Måns Rullgård mans
Thu Mar 15 01:06:46 CET 2007


"Guillaume POIRIER" <poirierg at gmail.com> writes:

> 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.

That is very hackish.  Given the typical use for ARM processors, I
don't think runtime detection is very important.  You normally know
exactly what you're building for.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list