This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patches] Re: Recognize cpu varaints take III



> OK, probably useable trick can be to introduce -mextensions=
> where possible choices are comma sepparated list of sse/nosse/mmx/nommx etc.
> 
> Does that sound sane? If so I can prepare patch early tomorrow.

Use the strings as flags, for the -m options that have no -mno-
variant.  Here you don't care about the value of the string, just the
fact that it's been set (it will be "" vs NULL).  It allows stupid
things like "-mdebug-addr8alc4eq" but who cares as long as it's not
actually a prefix of some other option.

Example:

-- i386.h

extern char *ix86_debug_addr;
#define TARGET_DEBUG_ADDR (ix86_debug_addr != 0)

#define TARGET_OPTIONS					\
{ { "debug_addr",		&ix86_debug_addr,	\
    N_("Debug addresses")},				\

-- i386.c

char *ix86_debug_addr = 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]