X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=doc%2Fgmqcc.1;h=ed88235ebbf77972405a4f4d91a2eb2b57fa218b;hp=05b5cbc020e66242687caf53b9ffd84db93a8645;hb=52312791130eff70f21c428b23756a1b49e67804;hpb=96126b435ae831d651855d9cf4430c8540ce13b0 diff --git a/doc/gmqcc.1 b/doc/gmqcc.1 index 05b5cbc..ed88235 100644 --- a/doc/gmqcc.1 +++ b/doc/gmqcc.1 @@ -142,6 +142,15 @@ them. .fi .in .TP +.B "--add-info" +Adds compiler information to the generated binary file. Currently +this includes the following globals: +.RS +.IP "reserved:version" +String containing the compiler version as printed by the --version +parameter. +.RE +.TP .B "-dump" DEBUG OPTION. Print the code's intermediate representation before the optimization and finalization passes to stdout before generating the @@ -344,6 +353,7 @@ __TIME__ .fi .in Note that fteqcc also defines __NULL__ which is not implemented yet. +(See -funtyped-nil about gmqcc's alternative to __NULL__). .TP .B -frelaxed-switch Allow switch cases to use non constant variables. @@ -446,6 +456,19 @@ Adds a global named 'nil' which is of no type and can be assigned to anything. No typechecking will be performed on assignments. Assigning to it is forbidden, using it in any other kind of expression is also not allowed. +.sp +Note that this is different from fteqcc's __NULL__: In fteqcc, +__NULL__ maps to the integer written as '0i'. It's can be assigned to +function pointers and integers, but it'll error about invalid +instructions when assigning it to floats without enabling the FTE +instruction set. There's also a bug which allows it to be assigned to +vectors, for which the source will be the global at offset 0, meaning +the vector's y and z components will contain the OFS_RETURN x and y +components. +.sp +In that gmqcc the nil global is an actual global filled with zeroes, +and can be assigned to anything including fields, vectors or function +pointers, and they end up becoming zeroed. .TP .B -fpermissive Various effects, usually to weaken some conditions. @@ -453,6 +476,7 @@ Various effects, usually to weaken some conditions. .IP "with -funtyped-nil" Allow local variables named 'nil'. (This will not allow declaring a global of that name.) +.RE .SH OPTIMIZATIONS .TP .B -Opeephole