OSDN Git Service

sbc: added "cc" to the clobber list of mmx inline assembly
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>
Thu, 11 Nov 2010 09:29:42 +0000 (11:29 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 30 Jul 2012 02:48:29 +0000 (19:48 -0700)
commitf0352b9027fa553a6bc83592ece0d1f45b248691
treecca43ccab30f215003f293a58bdfe3b7d5074b82
parentd234952da8effc48c9c6098806ba5df3b93f7394
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.
sbc/sbc_primitives_mmx.c