Investigate libav inline assembly

Registered by Michael Hope

libav uses inline assembly for a range of basic operations including:
 * MULH (smmul)
 * MUL16 (smulbb)
 * MAC16 (smlabb)
 * av_clip_{u,}int{8,16} (usat and similar)
 * av_bswap{16,32} (rev16, rev)

and some mildly more involved operations:
 * av_clipl_int32
 * FASTDIV

Some helpers are used for unaligned access:
 * AV_{R,W}N{16,32,64} (ldr, str)

Shifting these out of inline assembly lets the compiler perform more optimisations and gives the vectoriser more to work with.

Investigate these, how well GCC does with plain C, and spawn into blueprints covering the improvements to be done.

Blueprint information

Status:
Not started
Approver:
Michael Hope
Priority:
High
Drafter:
Michael Hope
Direction:
Approved
Assignee:
None
Definition:
Discussion
Series goal:
Accepted for 4.6
Implementation:
Informational Informational
Milestone target:
milestone icon backlog

Related branches

Sprints

Whiteboard

We at least don't recognise MULH and bswap16.

2012-04-23 michaelh1:
Checked av_bswap32. GCC recognises the C version and converts it to rev. libav only uses the inline assembly version for GCC 4.4 and earlier.
GCC detects 32 and 64 bit swaps but not 16 bit. 4.8 adds a __builtin_bswap16().

74bdbe96e400ab62151c5e9bad64093fe02fa938 by ebotcazou adds bswap16 to trunk.

[2013-05-21 matthew-gretton-dann] Card has been superseded by http://cards.linaro.org/browse/TCWG-67

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.