X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=gmqcc.ini.example;h=5c1ad3777a8c999ad7815492da0fec9f0ba3d927;hp=9dbb6fbbc91d2a74ab4edf9c1b484e6646fb2064;hb=dac058107a33615a9279ed0ab73dadfc2fea5fd1;hpb=f4f805f4c980f5e509447a965b4ef811c0741581 diff --git a/gmqcc.ini.example b/gmqcc.ini.example index 9dbb6fb..5c1ad37 100644 --- a/gmqcc.ini.example +++ b/gmqcc.ini.example @@ -31,7 +31,7 @@ #write a ticket. FTEPP = true - + #Enable some predefined macros. This only works in combination #with '-fftepp' and is currently not included by '-std=fteqcc'. @@ -62,6 +62,47 @@ FTEPP_PREDEFS = false + #Enable math constant definitions. This only works in combination + #with '-fftepp' and is currently not included by '-std=fteqcc'. + #The following macros will be added: + # + # M_E + # M_LOG2E + # M_LOG10E + # M_LN2 + # M_LN10 + # M_PI + # M_PI_2 + # M_PI_4 + # M_1_PI + # M_2_PI + # M_2_SQRTPI + # M_SQRT2 + # M_SQRT1_2 + # M_TAU + + FTEPP_MATHDEFS = false + + + #Enable indirect macro expansion. This only works in combination + #with '-fftepp' and is currently not included by '-std=fteqcc'. + #Enabling this behavior will allow the preprocessor to operate more + #like the standard C preprocessor in that it will allow arguments + #of macros which are macro-expanded to be substituted into the + #definition of the macro. As an example: + # + # #define STR1(x) #x + # #define STR2(x) STR1(x) + # #define THE_ANSWER 42 + # #define THE_ANSWER_STR STR2(THE_ANSWER) /* "42" */ + # + #With this enabled, an expansion of THE_ANSWER_STR will yield + #the string "42". With this disabled an expansion of THE_ANSWER_STR + #will yield "THE_ANSWER" + + FTEPP_INDIRECT_EXPANSION = false + + #Allow switch cases to use non constant variables. RELAXED_SWITCH = true @@ -288,10 +329,26 @@ SORT_OPERANDS = false + #Emulate OP_STATE operations in code rather than using the instruction. + #The desired fps can be set via -state-fps=NUM, defaults to 10. + + EMULATE_STATE = false + + + #Turn on arithmetic exception tests in the compiler. In constant expressions + #which trigger exceptions like division by zero, overflow, underflow, etc, + #the following flag will produce diagnostics for what triggered that + #exception. + ARITHMETIC_EXCEPTIONS = false + + #Split vector-literals which are only used dirctly as function parameters + #into 3 floats stored separately to reduce the number of globals at the + #expense of additional instructions. + SPLIT_VECTOR_PARAMETERS = false [warnings] #Generate a warning about variables which are declared but never - #used. This can be avoided by adding the ‘noref’ keyword in front + #used. This can be avoided by adding the ‘noref’ keyword in front #of the variable declaration. Additionally a complete section of #unreferenced variables can be opened using ‘#pragma noref 1’ and #closed via ‘#pragma noref 0’. @@ -299,6 +356,11 @@ UNUSED_VARIABLE = false + #Generate a warning about vector variables which are declared but + #components of it are never used. + + UNUSED_COMPONENT = false + #Generate a warning if it is possible that a variable can be used #without prior initialization. Note that this warning is not nec‐ #essarily reliable if the initialization happens only under cer‐ @@ -516,13 +578,42 @@ UNSAFE_TYPES = true - #When compiling original id1 QC, there is a definition for `break` + #When compiling original id1 QC there is a definition for `break` #which conflicts with the 'break' keyword in GMQCC. Enabling this - #warning will print a warning when the definition occurs. The - #definition is ignored for both cases. + #print a warning when the definition occurs. The definition is + #ignored for both cases. BREAKDEF = true + + #When compiling original QuakeWorld QC there are instances where + #code overwrites constants. This is considered an error, however + #for QuakeWorld to compile it needs to be treated as a warning + #instead, as such this warning only works when -std=qcc. + + CONST_OVERWRITE = true + + + #Warn about the use of preprocessor directives inside macros. + + DIRECTIVE_INMACRO = true + + + #When using a function that is not explicitly defined, the compiler + #will search its intrinsics table for something that matches that + #function name by appending "__builtin_" to it. This behaviour may + #be unexpected, so enabling this will produce a diagnostic when + #such a function is resolved to a builtin. + + BUILTINS = true + + + #When comparing an inexact value such as `1.0/3.0' the result is + #pathologically wrong. Enabling this will trigger a compiler warning + #on such expressions. + INEXACT_COMPARES = true + + [optimizations] #Some general peephole optimizations. For instance the code `a = b #+ c` typically generates 2 instructions, an ADD and a STORE. This @@ -553,7 +644,6 @@ OVERLAP_LOCALS = true - #This promotes locally declared variables to "temps". Meaning when #a temporary result of an operation has to be stored somewhere, a #local variable which is not 'alive' at that point can be used to @@ -563,7 +653,7 @@ LOCAL_TEMPS = true - + #Causes temporary values which do not need to be backed up on a #CALL to not be stored in the function's locals-area. With this, a #CALL to a function may need to back up fewer values and thus exe‐ @@ -636,6 +726,7 @@ CONST_FOLD_DCE = true + #For constant expressions we can fold them to immediate values. #this option cannot be disabled or enabled, the compiler forces #it to stay enabled by ignoring the value entierly. There are