[MPlayer-dev-eng] [PATCH] Disable additional optimization if compiler doesn't support __attribute__((used))

Michael Niedermayer michaelni at gmx.at
Sun Jun 10 11:52:19 CEST 2007


Hi

On Sun, Jun 10, 2007 at 11:04:26AM +0200, Reimar Doeffinger wrote:
> Hello,
> On Sun, Jun 10, 2007 at 04:56:47PM +0800, Zuxy Meng wrote:
> [...]
> > Just curious, why use attribute_used and the MANGLE macro instead of
> > mentioning such variables to a constraint? For gcc 2.95 compatibility?
> 
> Because that makes it even more likely that the compiler will not be
> able to compile it because it claims to be out of registers.
> There is one piece of asm code that has 8 "m" constraints, all global
> array with fixed address, but still ICC 9.1 could not compile it because
> it tried to use a register for each!!!!!!
> Or IOW: I see this breaking more than it will fix.

you can add a seperate asm (or c code) which refers to the used variable
or maybe just defining attribute used to volatile would work?

(no iam not arguing in favor of commiting (global) int used=a+b+c; hacks)

or if all attribute used are also static then we could 

#define attribute_used static attriute(used)
#else
#define attribute_used

icc likely cant remove global vars ...



[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070610/293f6b78/attachment.pgp>


More information about the MPlayer-dev-eng mailing list