X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=doc%2Fgmqcc.1;h=66d2e4e4e14e3b50779e9f7f6bdb641c74ca1281;hp=f3f6517550a043a1a77164b9153fd49dbf692b26;hb=05b349c72f622292703f301c410704c2320382f4;hpb=1b3d5157770f4faa5e1dd60250eb9f413cd9c501 diff --git a/doc/gmqcc.1 b/doc/gmqcc.1 index f3f6517..66d2e4e 100644 --- a/doc/gmqcc.1 +++ b/doc/gmqcc.1 @@ -153,7 +153,7 @@ Adds compiler information to the generated binary file. Currently this includes the following globals: .Bl -tag -width indent -compact .It Li reserved:version -String containing the compiler version as printed by the --version +String containing the compiler version as printed by the \-\-version parameter. .El .It Fl -correct , Fl -no-correct @@ -168,6 +168,11 @@ DEBUG OPTION. Print the code's intermediate representation after the optimization and finalization passes to stdout before generating the binary. The instructions will be enumerated, and values will contain a list of liferanges. +.It Fl force-crc= Ns Ar CRC +Force the produced progs file to use the specified CRC. +.It Fl state-fps= Ns Ar NUM +Activate \-femulate-state and set the emulated FPS to +.Ar NUM Ns . .El .Sh COMPILE WARNINGS .Bl -tag -width Ds @@ -327,10 +332,23 @@ it can happen that incompatible types are passed to functions. This enables several warnings when static typechecking cannot guarantee consistent behavior. .It Fl W Ns Cm breakdef -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. +will print a warning when the definition occurs. The definition is +ignored for both cases. +.It Fl W Ns Cm const-overwrite +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. +.It Fl W Ns Cm directive-inmacro +Warn about the use of preprocessor directives inside macros. +.It Fl W Ns Cm builtins +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. .El .Sh COMPILE FLAGS .Bl -tag -width Ds @@ -351,7 +369,7 @@ features used in the Xonotic codebase. If you need more, write a ticket. .It Fl f Ns Cm ftepp-predefs Enable some predefined macros. This only works in combination with -\'-fftepp' and is currently not included by '-std=fteqcc'. The +\'\-fftepp' and is currently not included by '\-std=fteqcc'. The following macros will be added: .Bd -literal -offset indent __LINE__ @@ -384,6 +402,26 @@ only the first component will be 0, while the other two will become the first to of the global return value. This behavior is odd and relying on it should be discouraged, and thus is not supported by gmqcc. +.It Fl f Ns Cm ftepp-mathdefs +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: +.Bd -literal -offset indent +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 +.Ed .It Fl f Ns Cm relaxed-switch Allow switch cases to use non constant variables. .It Fl f Ns Cm short-logic @@ -544,6 +582,11 @@ breaks decompilers, but causes the output file to be better compressible. In commutative instructions, always put the lower-numbered operand first. This shaves off 1 byte of entropy from all these instructions, reducing compressed size of the output file. +.It Fl f Ns Cm emulate-state +Emulate OP_STATE operations in code rather than using the instruction. +The desired fps can be set via -state-fps=NUM, defaults to 10. +Specifying \-state-fps implicitly sets this flag. Defaults to off in all +standards. .El .Sh OPTIMIZATIONS .Bl -tag -width Ds @@ -673,7 +716,7 @@ A documented example for a gmqcc.ini file. .Sh AUTHOR See . .Sh BUGS -Currently the '-fftepp-predefs' flag is not included by '-std=fteqcc', +Currently the '\-fftepp-predefs' flag is not included by '\-std=fteqcc', partially because it is not entirely conformant to fteqcc. .Pp Please report bugs on ,