sbc: added "cc" to the clobber list of mmx inline assembly
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>
Mon, 14 Mar 2011 18:36:07 +0000 (15:36 -0300)
committerLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Mon, 14 Mar 2011 18:44:47 +0000 (15:44 -0300)
commit51d5f3c9fda454e78e87e05029a34b56b0815186
tree85f2e188e577413b7bce59a28d172115fe140d0d
parent5423dc16449306ad429580faa4652b35dd82ff55
sbc: added "cc" to the clobber list of mmx inline assembly

In the case of scale factors calculation optimizations, the inline
assembly code has instructions which update flags register, but
"cc" was not mentioned in the clobber list. When optimizing code,
gcc theoretically is allowed to do a comparison before the inline
assembly block, and a conditional branch after it which would lead
to a problem if the flags register gets clobbered. While this is
apparently not happening in practice with the current versions of
gcc, the clobber list needs to be corrected.

Regarding the other inline assembly blocks. While most likely it
is actually unnecessary based on quick review, "cc" is also added
there to the clobber list because it should have no impact on
performance in practice. It's kind of cargo cult, but relieves
us from the need to track the potential updates of flags register
in all these places.
src/modules/bluetooth/sbc/sbc_primitives_mmx.c