xonotic/gmqcc.git
6 years agomanpage: -Wuninitialized-constant -Wuninitialized-global
Wolfgang Bumiller [Fri, 28 Dec 2012 18:11:29 +0000 (19:11 +0100)]
manpage: -Wuninitialized-constant -Wuninitialized-global

6 years agonoref testcase must use -Wno-uninitialized-global
Wolfgang Bumiller [Fri, 28 Dec 2012 18:09:06 +0000 (19:09 +0100)]
noref testcase must use -Wno-uninitialized-global

6 years ago-Wuninitialized-const, -Wuninitialized-global
Wolfgang Bumiller [Fri, 28 Dec 2012 18:07:43 +0000 (19:07 +0100)]
-Wuninitialized-const, -Wuninitialized-global

6 years agomanpage: -Wreserved-names, -funtyped-nil, -fpermissive
Wolfgang Bumiller [Fri, 28 Dec 2012 17:27:34 +0000 (18:27 +0100)]
manpage: -Wreserved-names, -funtyped-nil, -fpermissive

6 years ago-Wreserved-names, -fpermissive allows local variables named 'nil' to be created even...
Wolfgang Bumiller [Fri, 28 Dec 2012 17:22:09 +0000 (18:22 +0100)]
-Wreserved-names, -fpermissive allows local variables named 'nil' to be created even with -funtyped-nil, they supersede the global untyped 'nil'

6 years ago'nil' global with -funtyped-nil
Wolfgang Bumiller [Fri, 28 Dec 2012 17:16:19 +0000 (18:16 +0100)]
'nil' global with -funtyped-nil

6 years agoTYPE_NIL, builder->nil, ast_value_codegen for TYPE_NIL
Wolfgang Bumiller [Fri, 28 Dec 2012 17:05:28 +0000 (18:05 +0100)]
TYPE_NIL, builder->nil, ast_value_codegen for TYPE_NIL

6 years agoFix teh paren!
Dale Weiler [Fri, 28 Dec 2012 15:19:19 +0000 (15:19 +0000)]
Fix teh paren!

6 years agoadded util_vasprintf/util_asprintf .. so we can stop assuming a certian static array...
Dale Weiler [Fri, 28 Dec 2012 15:02:53 +0000 (15:02 +0000)]
added util_vasprintf/util_asprintf .. so we can stop assuming a certian static array size for formatting strings ... I expect to see full migration to this before the next release for protection of over/under flows. As well as identifers >= 1024 bytes :)

6 years agomemleak
Dale Weiler [Fri, 28 Dec 2012 14:47:27 +0000 (14:47 +0000)]
memleak

6 years agos/\t/ /g - utf8.c
Dale Weiler [Fri, 28 Dec 2012 12:57:41 +0000 (12:57 +0000)]
s/\t/    /g - utf8.c

6 years agoFix another Blub bug .. learn to use comments properly :P
Dale Weiler [Fri, 28 Dec 2012 12:54:20 +0000 (12:54 +0000)]
Fix another Blub bug .. learn to use comments properly :P

6 years agoFix a very possible bug
Dale Weiler [Fri, 28 Dec 2012 12:50:37 +0000 (12:50 +0000)]
Fix a very possible bug

6 years agoFixed another possible implementation specific bug thanks to this progressive splint...
Dale Weiler [Fri, 28 Dec 2012 12:43:08 +0000 (12:43 +0000)]
Fixed another possible implementation specific bug thanks to this progressive splint idea :)

6 years agoFix another warning
Dale Weiler [Fri, 28 Dec 2012 12:40:00 +0000 (12:40 +0000)]
Fix another warning

6 years agoFix another warning
Dale Weiler [Fri, 28 Dec 2012 12:36:15 +0000 (12:36 +0000)]
Fix another warning

6 years agoFix one warning
Dale Weiler [Fri, 28 Dec 2012 12:33:10 +0000 (12:33 +0000)]
Fix one warning

6 years agoAdded splint.sh (a progressive way to fix some possible bugs)
Dale Weiler [Fri, 28 Dec 2012 12:29:46 +0000 (12:29 +0000)]
Added splint.sh (a progressive way to fix some possible bugs)

6 years agoSo why doesn't any popular compiler complain about this
Wolfgang Bumiller [Fri, 28 Dec 2012 10:50:03 +0000 (11:50 +0100)]
So why doesn't any popular compiler complain about this

6 years ago... This... I'll have to git rewrite-history at some point
Wolfgang Bumiller [Fri, 28 Dec 2012 10:43:17 +0000 (11:43 +0100)]
... This... I'll have to git rewrite-history at some point

6 years agoWorking on getting gmqcc to work when compiled with tcc
Dale Weiler [Fri, 28 Dec 2012 09:30:01 +0000 (09:30 +0000)]
Working on getting gmqcc to work when compiled with tcc

6 years agoReorder operands
Dale Weiler [Fri, 28 Dec 2012 09:06:04 +0000 (09:06 +0000)]
Reorder operands

6 years agoQuoting of strings is forbid in some "make" implementations
Dale Weiler [Fri, 28 Dec 2012 09:05:14 +0000 (09:05 +0000)]
Quoting of strings is forbid in some "make" implementations

6 years agoGot it working on arm :)
Dale Weiler [Fri, 28 Dec 2012 08:59:41 +0000 (08:59 +0000)]
Got it working on arm :)

6 years agoAlways use -fsigned-char .. The compiler I was using had -funsigned-char by default...
Dale Weiler [Fri, 28 Dec 2012 08:52:13 +0000 (08:52 +0000)]
Always use -fsigned-char .. The compiler I was using had -funsigned-char by default on ARM (which was breaking everything ...) try it .. add -funsigned-char and run the test-suite (only 2 out of all the tests actually pass, and it's by fluke)

6 years agomanpage: -floop-labels
Wolfgang Bumiller [Thu, 27 Dec 2012 23:21:59 +0000 (00:21 +0100)]
manpage: -floop-labels

6 years agoSome default options for -std=gmqcc including -floop-labels
Wolfgang Bumiller [Thu, 27 Dec 2012 23:21:53 +0000 (00:21 +0100)]
Some default options for -std=gmqcc including -floop-labels

6 years agofinish parsing of labeled loops; ast support added
Wolfgang Bumiller [Thu, 27 Dec 2012 23:04:09 +0000 (00:04 +0100)]
finish parsing of labeled loops; ast support added

6 years agodistinguish between break/continue levels in the parser
Wolfgang Bumiller [Thu, 27 Dec 2012 22:52:57 +0000 (23:52 +0100)]
distinguish between break/continue levels in the parser

6 years agoparsing of loop labels
Wolfgang Bumiller [Thu, 27 Dec 2012 22:43:20 +0000 (23:43 +0100)]
parsing of loop labels

6 years agothere's no -f flag named overlap-locals... removed the opts.def entry
Wolfgang Bumiller [Thu, 27 Dec 2012 21:18:39 +0000 (22:18 +0100)]
there's no -f flag named overlap-locals... removed the opts.def entry

6 years agoMerge pull request #77 from matthiaskrgr/PKGBUILD
Wolfgang Bumiller [Thu, 27 Dec 2012 19:10:10 +0000 (11:10 -0800)]
Merge pull request #77 from matthiaskrgr/PKGBUILD

PKGBUILDs: note myself as contributor.

6 years agoPKGBUILDs: note myself as contributor.
matthiaskrgr [Thu, 27 Dec 2012 19:07:58 +0000 (20:07 +0100)]
PKGBUILDs: note myself as contributor.

6 years agobumping arch/release PKGBUILD to 0.2.2
Wolfgang Bumiller [Thu, 27 Dec 2012 13:48:52 +0000 (14:48 +0100)]
bumping arch/release PKGBUILD to 0.2.2

6 years agoAnother bool->int fix; now clang-compiled gmqcc actually works...
Wolfgang Bumiller [Thu, 27 Dec 2012 13:33:58 +0000 (14:33 +0100)]
Another bool->int fix; now clang-compiled gmqcc actually works...

6 years agomanpage: -fbail-on-werror
Wolfgang Bumiller [Thu, 27 Dec 2012 11:48:36 +0000 (12:48 +0100)]
manpage: -fbail-on-werror

6 years ago-fbail-on-werror option
Wolfgang Bumiller [Thu, 27 Dec 2012 11:46:36 +0000 (12:46 +0100)]
-fbail-on-werror option

6 years agofix: when there are no additional temps the first one allocated slot's size was count...
Wolfgang Bumiller [Thu, 27 Dec 2012 10:46:08 +0000 (11:46 +0100)]
fix: when there are no additional temps the first one allocated slot's size was counted twice resulting in some additional unused globals

6 years agoMerge pull request #75 from matthiaskrgr/master
Wolfgang Bumiller [Thu, 27 Dec 2012 10:06:04 +0000 (02:06 -0800)]
Merge pull request #75 from matthiaskrgr/master

mention PKGBUILDs in INSTALL file, fix typo in manpage

6 years agomanpage: -Oglobal-temps
Wolfgang Bumiller [Wed, 26 Dec 2012 22:20:49 +0000 (23:20 +0100)]
manpage: -Oglobal-temps

6 years ago-Oglobal-temps
Wolfgang Bumiller [Wed, 26 Dec 2012 22:18:45 +0000 (23:18 +0100)]
-Oglobal-temps

6 years agofix -v option parsing in qcvm
Wolfgang Bumiller [Wed, 26 Dec 2012 21:49:50 +0000 (22:49 +0100)]
fix -v option parsing in qcvm

6 years agofactoring out temp-slot-assignment and using it for the declared locals too, makes...
Wolfgang Bumiller [Wed, 26 Dec 2012 21:09:54 +0000 (22:09 +0100)]
factoring out temp-slot-assignment and using it for the declared locals too, makes -Olocal-temps more effective

6 years agomanpage: gmqcc: fix typo
matthiaskrgr [Wed, 26 Dec 2012 21:03:08 +0000 (22:03 +0100)]
manpage: gmqcc: fix typo

6 years agoINSTALL: mention ArchLinux PKGBUILDs.
matthiaskrgr [Wed, 26 Dec 2012 20:57:26 +0000 (21:57 +0100)]
INSTALL: mention ArchLinux PKGBUILDs.

6 years agoSwitch over to LONGBIT
Wolfgang Bumiller [Wed, 26 Dec 2012 20:39:00 +0000 (21:39 +0100)]
Switch over to LONGBIT

6 years agoMerge pull request #74 from matthiaskrgr/PKGBUILD
Wolfgang Bumiller [Wed, 26 Dec 2012 20:31:25 +0000 (12:31 -0800)]
Merge pull request #74 from matthiaskrgr/PKGBUILD

add arch PKGBUILDs for git and release build.

6 years agoPKGBUILD: formatting
matthiaskrgr [Wed, 26 Dec 2012 19:21:41 +0000 (20:21 +0100)]
PKGBUILD: formatting

6 years agoadd PKGBUILD for release build.
matthiaskrgr [Wed, 26 Dec 2012 19:17:29 +0000 (20:17 +0100)]
add PKGBUILD for release build.

6 years agoPKGBUILD: license is MIT
matthiaskrgr [Wed, 26 Dec 2012 19:13:07 +0000 (20:13 +0100)]
PKGBUILD: license is MIT

6 years agofix uninitialized warnings in ir.c
Wolfgang Bumiller [Wed, 26 Dec 2012 19:06:30 +0000 (20:06 +0100)]
fix uninitialized warnings in ir.c

6 years agoPKGBUILD: install custom license file.
matthiaskrgr [Wed, 26 Dec 2012 19:07:51 +0000 (20:07 +0100)]
PKGBUILD: install custom license file.

6 years agoPKGBUILD: license is not GPL actually
matthiaskrgr [Wed, 26 Dec 2012 19:03:17 +0000 (20:03 +0100)]
PKGBUILD: license is not GPL actually

6 years agoFixing uninitialized warnings in parser.c
Wolfgang Bumiller [Wed, 26 Dec 2012 19:00:17 +0000 (20:00 +0100)]
Fixing uninitialized warnings in parser.c

6 years agoadding -fno-strict-aliasing
Wolfgang Bumiller [Wed, 26 Dec 2012 18:58:53 +0000 (19:58 +0100)]
adding -fno-strict-aliasing

6 years agoadd PKGBUILD for git build.
matthiaskrgr [Wed, 26 Dec 2012 18:58:40 +0000 (19:58 +0100)]
add PKGBUILD for git build.

6 years agomanpage: -dump, -dumpfin
Wolfgang Bumiller [Wed, 26 Dec 2012 18:37:55 +0000 (19:37 +0100)]
manpage: -dump, -dumpfin

6 years agoMerge pull request #73 from matthiaskrgr/master
Wolfgang Bumiller [Wed, 26 Dec 2012 18:21:31 +0000 (10:21 -0800)]
Merge pull request #73 from matthiaskrgr/master

fix some typos in todo file

6 years agoTODO: fix typos
matthiaskrgr [Wed, 26 Dec 2012 18:15:40 +0000 (19:15 +0100)]
TODO: fix typos

6 years agocounters for -Ocall-stores because we all love numbers
Wolfgang Bumiller [Wed, 26 Dec 2012 18:11:26 +0000 (19:11 +0100)]
counters for -Ocall-stores because we all love numbers

6 years agoDon't copy return values away from OFS_RETURN if they don't get locked.
Wolfgang Bumiller [Wed, 26 Dec 2012 17:33:16 +0000 (18:33 +0100)]
Don't copy return values away from OFS_RETURN if they don't get locked.

6 years agomanpage: -Ovoid-return
Wolfgang Bumiller [Wed, 26 Dec 2012 09:28:01 +0000 (10:28 +0100)]
manpage: -Ovoid-return

6 years agomanpage: added -v to the qcvm manpage
Wolfgang Bumiller [Wed, 26 Dec 2012 09:26:04 +0000 (10:26 +0100)]
manpage: added -v to the qcvm manpage

6 years ago-Ovoid-return - the last INSTR_RETURN of a void functions is replaced by INSTR_DONE...
Wolfgang Bumiller [Wed, 26 Dec 2012 09:24:33 +0000 (10:24 +0100)]
-Ovoid-return - the last INSTR_RETURN of a void functions is replaced by INSTR_DONE to reduce the instruction count

6 years agoverbose switches for the qcvm; makes -printfuns find the instruction-count of a funct...
Wolfgang Bumiller [Wed, 26 Dec 2012 09:23:45 +0000 (10:23 +0100)]
verbose switches for the qcvm; makes -printfuns find the instruction-count of a function and print that too

6 years agoActually generate the vector member ir_values in ir_function_finalize, since ir_build...
Wolfgang Bumiller [Tue, 25 Dec 2012 22:51:29 +0000 (23:51 +0100)]
Actually generate the vector member ir_values in ir_function_finalize, since ir_builder_gen_global is too late / happens after life ranges; this should fix -Ooverlap-locals

6 years agomanpage: -Ocall-stores
Wolfgang Bumiller [Tue, 25 Dec 2012 22:28:09 +0000 (23:28 +0100)]
manpage: -Ocall-stores

6 years ago-Ocall-stores as part of -O1: instead of having CALL instructions issue STOREs for...
Wolfgang Bumiller [Tue, 25 Dec 2012 22:25:59 +0000 (23:25 +0100)]
-Ocall-stores as part of -O1: instead of having CALL instructions issue STOREs for every parameter, use the newly introduced 'lock' flag to make the operations generating the call's parameters generate them right into the OFS_PARM if there's no interfering CALL in between

6 years agodo the locking before processing the call-reads otherwise all the call's parameters...
Wolfgang Bumiller [Tue, 25 Dec 2012 22:24:31 +0000 (23:24 +0100)]
do the locking before processing the call-reads otherwise all the call's parameters get locked as well

6 years agoliferange calc now sets the 'locked' flag on values when reaching a CALL
Wolfgang Bumiller [Tue, 25 Dec 2012 20:03:26 +0000 (21:03 +0100)]
liferange calc now sets the 'locked' flag on values when reaching a CALL

6 years agoThe very aggressive -Ooverlap-strings
Wolfgang Bumiller [Tue, 25 Dec 2012 19:38:05 +0000 (20:38 +0100)]
The very aggressive -Ooverlap-strings

6 years agoEnsure that the members[] array is filled for vector types so the liferange function...
Wolfgang Bumiller [Mon, 24 Dec 2012 11:52:15 +0000 (12:52 +0100)]
Ensure that the members[] array is filled for vector types so the liferange function can use all of them

6 years agoTests for the previous vector-liferange change
Wolfgang Bumiller [Mon, 24 Dec 2012 11:43:16 +0000 (12:43 +0100)]
Tests for the previous vector-liferange change

6 years agoNow this should deal with vector life ranges more correctly.
Wolfgang Bumiller [Mon, 24 Dec 2012 11:43:05 +0000 (12:43 +0100)]
Now this should deal with vector life ranges more correctly.

6 years agoprint an error when static is used in global scope - this is currently not being...
Wolfgang Bumiller [Mon, 24 Dec 2012 10:38:33 +0000 (11:38 +0100)]
print an error when static is used in global scope - this is currently not being handled as expected

6 years agoAdded the 'static' keyword.
Wolfgang Bumiller [Mon, 24 Dec 2012 10:30:58 +0000 (11:30 +0100)]
Added the 'static' keyword.

Implements #71

6 years agomanpage: -q, --quiet
Wolfgang Bumiller [Mon, 24 Dec 2012 10:03:34 +0000 (11:03 +0100)]
manpage: -q, --quiet

6 years agomanpage: -fftepp-predefs
Wolfgang Bumiller [Mon, 24 Dec 2012 10:01:24 +0000 (11:01 +0100)]
manpage: -fftepp-predefs

6 years ago-q, --quiet option
Wolfgang Bumiller [Mon, 24 Dec 2012 09:53:51 +0000 (10:53 +0100)]
-q, --quiet option

6 years agoone too many zeros
Dale Weiler [Mon, 24 Dec 2012 08:19:57 +0000 (08:19 +0000)]
one too many zeros

6 years agoAdded my awesome MT1997 PRNG, and use it instead of stdio's rand()/srand() .. which...
Dale Weiler [Mon, 24 Dec 2012 01:43:27 +0000 (01:43 +0000)]
Added my awesome MT1997 PRNG, and use it instead of stdio's rand()/srand() .. which are implementation specific .. and simply unsafe (for example one of the compilers at work simply has it's standard library implementation of rand() return 0 always (which is perfectly conformant)).

6 years agoAdded ftepp predefs flag (ability to turn on/off predefs) disabled by default (even...
Dale Weiler [Mon, 24 Dec 2012 00:21:55 +0000 (00:21 +0000)]
Added ftepp predefs flag (ability to turn on/off predefs) disabled by default (even with -ftepp), enabled with -E, to enable use -fftepp-predefs.

6 years agoImplemented __FILE__, __LINE__, __RANDOM__, __RANDOM_LAST__, __COUNTER__ and __COUNTE...
Dale Weiler [Mon, 24 Dec 2012 00:12:24 +0000 (00:12 +0000)]
Implemented __FILE__, __LINE__, __RANDOM__, __RANDOM_LAST__, __COUNTER__ and __COUNTER_LAST__ as predefined macros.  __FUNCTION__ is not implemented yet due to the overall complexity in making it constant.

6 years ago-Ostrip-constant-names
Wolfgang Bumiller [Sun, 23 Dec 2012 21:58:46 +0000 (22:58 +0100)]
-Ostrip-constant-names

6 years agocode_genstring now caches strings, no need for code_cachestring
Wolfgang Bumiller [Sun, 23 Dec 2012 13:59:09 +0000 (14:59 +0100)]
code_genstring now caches strings, no need for code_cachestring

6 years ago-Olocaltemps -> -Olocal-temps for consistency; added manpage entry; removed leftover...
Wolfgang Bumiller [Sun, 23 Dec 2012 20:39:04 +0000 (21:39 +0100)]
-Olocaltemps -> -Olocal-temps for consistency; added manpage entry; removed leftover manpage entry for -foverlap-locals; -Olocal-temps moved from -O1 to -O3 due to stability concerns

6 years agorevert 3ef30e850da5e5
Wolfgang Bumiller [Sun, 23 Dec 2012 20:34:04 +0000 (21:34 +0100)]
revert 3ef30e850da5e5

6 years agoRemove ir_block_create_{add,sub,mul,div}, they're not used; STOREP instructions don...
Wolfgang Bumiller [Sun, 23 Dec 2012 20:29:15 +0000 (21:29 +0100)]
Remove ir_block_create_{add,sub,mul,div}, they're not used; STOREP instructions don't themselves to their target pointer's 'writes' list, but 'reads' list instead

6 years agoStart instruction numbering at 1 and make parameters live at 0
Wolfgang Bumiller [Sun, 23 Dec 2012 20:20:16 +0000 (21:20 +0100)]
Start instruction numbering at 1 and make parameters live at 0

6 years agoDon't store off CALL results if they're never read
Wolfgang Bumiller [Sun, 23 Dec 2012 20:11:56 +0000 (21:11 +0100)]
Don't store off CALL results if they're never read

6 years agoEven safer vector macros
Wolfgang Bumiller [Sun, 23 Dec 2012 19:55:15 +0000 (20:55 +0100)]
Even safer vector macros

6 years agoLife Ranges: First deal with all writes, then with all reads, since writes will remov...
Wolfgang Bumiller [Sun, 23 Dec 2012 19:50:21 +0000 (20:50 +0100)]
Life Ranges: First deal with all writes, then with all reads, since writes will remove values from the Living set

6 years agoFixing vector macros
Wolfgang Bumiller [Sun, 23 Dec 2012 19:49:50 +0000 (20:49 +0100)]
Fixing vector macros

6 years agoadded -disasm-func to the qcvm
Wolfgang Bumiller [Sun, 23 Dec 2012 19:45:43 +0000 (20:45 +0100)]
added -disasm-func to the qcvm

6 years agostrcmp and strncmp builtins
Wolfgang Bumiller [Sun, 23 Dec 2012 18:22:38 +0000 (19:22 +0100)]
strcmp and strncmp builtins

6 years agoAdding strcat builtin to qcvm
Wolfgang Bumiller [Sun, 23 Dec 2012 18:05:39 +0000 (19:05 +0100)]
Adding strcat builtin to qcvm

6 years agodon't optimize out NOT_S instructions for COND
Wolfgang Bumiller [Sun, 23 Dec 2012 16:51:01 +0000 (17:51 +0100)]
don't optimize out NOT_S instructions for COND

6 years agomanpage: remove the MUL_FV/VF section, it wouldn't be legal code anyway
Wolfgang Bumiller [Sun, 23 Dec 2012 16:50:44 +0000 (17:50 +0100)]
manpage: remove the MUL_FV/VF section, it wouldn't be legal code anyway

6 years agomanpage: optimization section
Wolfgang Bumiller [Sun, 23 Dec 2012 16:46:40 +0000 (17:46 +0100)]
manpage: optimization section

6 years agoMask overlap-locals by -Ooverlap-locals, and count (the amount of overlapped functions)
Wolfgang Bumiller [Sun, 23 Dec 2012 16:40:56 +0000 (17:40 +0100)]
Mask overlap-locals by -Ooverlap-locals, and count (the amount of overlapped functions)