X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=doc.html;h=352171fa4e43a037fd5d6ce97b522dd197f0eae5;hp=e5b768252c831db0fa5cf7f96c3d7cb8d679decd;hb=refs%2Fheads%2Fgraphitemaster%2Fgh-pages;hpb=bcfc9390ac7e98b26cdc6980682264b834844af2;ds=sidebyside
diff --git a/doc.html b/doc.html
index e5b7682..352171f 100644
--- a/doc.html
+++ b/doc.html
@@ -21,7 +21,6 @@
- Index
- - Download v0.1
- Issues
- Documentation
- View On GitHub
@@ -78,10 +77,21 @@
-O<level> |
Specfies the optimization level: highest being 3, lowest being 0 (no optimization). |
+
+ -g |
+ Enables generation of debug info for engine backtraces (turns on -flno) |
+
-E |
Instructs the compiler to only preprocess the input, writing the preprocessed output to stdout |
+
+ -D |
+
+ "define" a macro. Optionally you may supply
+ a value to the macro with "=". Implicitally turns on -fftepp
+ |
+
-Wall |
Enables all compiled warnings for the selcted standard |
@@ -125,6 +135,30 @@
__STD_VERSION_MAJOR__ |
Specifies the current selected stanadards major version number. |
+
+ __FILE__ |
+ Expands to a const string literal of the current file (requires -fftepp-predef) |
+
+
+ __LINE__ |
+ Expands to the current line number (requires -fftepp-predef) |
+
+
+ __RANDOM__ |
+ Expands to a random number between [0, 256) (requires -fftepp-predef) |
+
+
+ __COUNTER__ |
+ Expands to a unique number, each expansion causes it to increment (requires -fftepp-predef) |
+
+
+ __RANDOM_LAST__ |
+ Expands to the last random number (requires -fftepp-predef) |
+
+
+ __COUNTER_LAST__ |
+ Expands to the last counter number (requires -fftepp-predef) |
+
Unsupported compatability options
@@ -169,6 +203,10 @@
-fftepp |
Enables FTEQ preprocessor |
+
+ -fftepp-predef |
+ Enables additional predefined macros for the FTEQ preprocessor |
+
-frelaxted-switch |
Relaxes switch statement semantics |
@@ -195,7 +233,47 @@
-flno |
- Enables generation of progs.lno for engine VM backtraces |
+ Enables generation of progs.lno for engine VM backtraces (enabled with -g as well) |
+
+
+ -fcorrect-ternary |
+ Enabling this corrects the ternary percedecce bugs present in fteqcc |
+
+
+ -fsingle-vector-defs |
+ Prevents the creation of progdefs for vectors |
+
+
+ -fcorrect-logic |
+ Use cast vector to real booleans when used in logic expressions |
+
+
+ -ftrue-empty-strings |
+ Always treat empty strings as true |
+
+
+ -ffalse-empty-strings |
+ Opposite of above, empty strings always false |
+
+
+ -futf8 |
+ Recognize utf-8 characters in character constants, and encode codepoint escape sequences in strings as utf-8 |
+
+
+ -fbail-on-werror |
+ When a warning is printed and it is set to be treated as error via -Werror, compilation will be stopped. |
+
+
+ -floop-labels |
+ Allow loops and switches to be labeled and break and continue to take optional label to target it. |
+
+
+ -funtyped-nil |
+ Enable the 'nil' null constant, which has no type. It can be used as the right hand of any assignment. |
+
+
+ -fpermissive |
+ Be "permissive", e.g with -funtyped-nil, this will allow local variables with the name 'nil' |
Warning options
@@ -288,13 +366,89 @@
-Wternary-precedence |
Enables warnings about ternary expressions whos precedence may be not what expected |
+
+ -Wunknown-pragmas |
+ Enables warnings about unknown pragmas |
+
+
+ -Wunreachable-code |
+ Enables warnings about unreachable code |
+
+
+ -Wcpp |
+ Enables warnings about the preprocessor |
+
+
+ Wunknown-attribute |
+ Enables warnings for when an unknown attribute is encountered. |
+
+
+ -Wreserved-names |
+ Enables warnings for variables or fields that are named with a reserved name |
+
+
+ -Wuninitialized-constant |
+ Enables warnings about const global variables with no initializing value |
+
+
+ -Wuninitialized-global |
+ Enables warnings about non-const gloal variable with no initializing value |
+
+
+ -Wdeprecated |
+ Enables warnings about calls to functions marked deprecated |
+
Options | What it does |
+
+ -Opeephole |
+ Enables peephole optimizations |
+
+
+ -Olocal-temps |
+ Enables local-temp omission optimizations |
+
+
+ -Oglobal-temps |
+ Enables global-temp omission optimizations |
+
-Otail-recursion |
Enables tail recursion optimization |
+
+ -Otail-calls |
+ Enables tail-call optimizations |
+
+
+ -Ooverlap-locals |
+
+ Every function where it's safe to do so will share its local
+ section with others. The critera being that the function must
+ have any possibly uninitialized locals, or local arrays regardless
+ of how they are initialized.
+ |
+
+
+ -Ostrip-constant-names |
+ Strip the names of constants |
+
+
+ -Ooverlap-strings |
+ Agressivly reuse strings in the string-section. |
+
+
+ -Ocall-stores |
+
+ Have expressions which are used as function parameters evaluate directly
+ into the parameter-globals if possible. This avoids copying.
+ |
+
+
+ -Ovoid-return |
+ Do not create a return instruction at the end of return-type void functions |
+
Individual warnings may be disabled with -Wno-<warning>
@@ -318,6 +472,14 @@
-memchk |
Turns on compiler memory leak checker |
+
+ -dump |
+ Dump IR before optimizing and finalizing |
+
+
+ -dumpfin |
+ Dump IR after optimizing and finalizing |
+
-Whelp or -W? |
Lists all warning options |
@@ -338,6 +500,15 @@
-nocolor |
Turn off colored stdout/stderr. |
+
+ -config=<file> |
+
+ Supply a configuration file to set options.
+ Note: If a file named gmqcc.ini or
+ gmqcc.cfg is found it will be loaded
+ implicitally.
+ |
+
@@ -379,13 +550,41 @@ $ cd gmqcc
testsuite |
Builds the testsuite for GMQCC |
+
+ check, test |
+ Build and executes the testsuite for GMQCC |
+
+
+ pak |
+ Builds the pak utility |
+
+
+ splint |
+ Runs splint (static analysis) on the source |
+
+
+ gource |
+ Runs gource visualization on the source |
+
+
+ gource-record |
+ Runs gource visualization and produces a rendered mp4 |
+
+
+ depend |
+ Builds dependinces into the Makefile |
+
all |
- Builds gmqcc, qcvm, and testsuite |
+ Builds gmqcc, qcvm, pak, and testsuite |
install |
- Installs gmqcc to /usr/local/ |
+ Installs gmqcc, qcvm, and documentaion |
+
+
+ uninstall |
+ Uninstalls gmqcc, qcvm, and documentation |
check |
@@ -483,24 +682,25 @@ $ cd gmqcc
F: |
- Used to set a failure message, this message will be displayed
- if the test fails, this tag is optional. |
-
-
- S: |
- Used to set a success message, this message will be displayed
- if the test succeeds, this tag is optional.
- |
+ Used to set test-suite specific flags, currently
+ the only supported flag is -no-defs which tells the
+ testsuite to exclude defs.qh.
+ |
T: |
- Used to set the procedure for the given task, there are two
+ | Used to set the procedure for the given task, there are four
options for this:
- -compile
This simply performs compilation only
- -execute
This will perform compilation and execution
+ - -fail
+ This will perform compilation on the requirement it fails, otherwise
+ the test fails
+ - -pp
+ This will perform preprocessing only
This tag must be provided, this tag is NOT optional.
@@ -522,7 +722,7 @@ $ cd gmqcc
| Used to describe a string of text that should be matched from
the output of executing the task. If this doesn't match the
task fails. This tag must be provided at least once if
- T == -execute, otherwise it's erroneous as compilation only
+ T == -execute or T == -pp, otherwise it's erroneous as compilation only
takes place. Multiple M tags are required for multi-line comparision
|
@@ -598,6 +798,10 @@ $ cd gmqcc
Argument |
What it does |
+
+ -h, --help |
+ Print help message |
+
-trace |
Trace the execution call hierarchy. |
@@ -614,6 +818,10 @@ $ cd gmqcc
-disasm |
Dissasemble the bytecode into assembly. |
+
+ -diasm-func |
+ Dissasmble function |
+
-printdefs |
Prints all definitions for the bytecode running. |
@@ -622,6 +830,22 @@ $ cd gmqcc
-printfields |
Prints all fields for the bytecode running. |
+
+ -printfuns |
+ Prints all functions for the bytecode running. |
+
+
+ -v |
+ Be verbose |
+
+
+ -v |
+ Be even more verbose |
+
+
+ -version, --version |
+ Print version information |
+
Builtins
@@ -640,6 +864,11 @@ $ cd gmqcc
vlen | 7 |
etos | 8 |
stof | 9 |
+ strcat | 10 |
+ strcmp | 11 |
+ normalize | 12 |
+ sqrt | 13 |
+ floor | 14 |
Support or Contact