]> git.xonotic.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
11 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.

11 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.

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

11 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

11 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

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

11 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

11 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

11 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

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

11 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

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

11 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

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

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

11 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

11 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

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

11 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)

11 years agoTry generating the function-locals in a later pass; with the option to overlap them.
Wolfgang Bumiller [Sun, 23 Dec 2012 16:32:39 +0000 (17:32 +0100)]
Try generating the function-locals in a later pass; with the option to overlap them.

11 years agoFix a nasty bug in the executor; and make null-strings be shown as (null) in the...
Wolfgang Bumiller [Sun, 23 Dec 2012 16:32:14 +0000 (17:32 +0100)]
Fix a nasty bug in the executor; and make null-strings be shown as (null) in the trace output

11 years agoAdd -Ooverlap-locals to -O3
Wolfgang Bumiller [Sun, 23 Dec 2012 15:31:21 +0000 (16:31 +0100)]
Add -Ooverlap-locals to -O3

11 years agoremember the maximum amount of required function-locals
Wolfgang Bumiller [Sun, 23 Dec 2012 15:31:01 +0000 (16:31 +0100)]
remember the maximum amount of required function-locals

11 years agoir_function now has a flags field - flags are: IR_FLAG_HAS_{ARRAYS,UNINITIALIZED...
Wolfgang Bumiller [Sun, 23 Dec 2012 15:21:38 +0000 (16:21 +0100)]
ir_function now has a flags field - flags are: IR_FLAG_HAS_{ARRAYS,UNINITIALIZED,GOTO}

11 years agoutil_swa_* + GMQCC_INLINE
Wolfgang Bumiller [Sun, 23 Dec 2012 12:11:20 +0000 (13:11 +0100)]
util_swa_* + GMQCC_INLINE

11 years agoDon't generate defs for locals or parameters unless using -g
Wolfgang Bumiller [Sun, 23 Dec 2012 11:22:27 +0000 (12:22 +0100)]
Don't generate defs for locals or parameters unless using -g

11 years agoutf8lib.c -> utf8.c - I hope windows 8 allows this filename :P
Wolfgang Bumiller [Sun, 23 Dec 2012 09:44:03 +0000 (10:44 +0100)]
utf8lib.c -> utf8.c - I hope windows 8 allows this filename :P

11 years agolicense header
Wolfgang Bumiller [Sun, 23 Dec 2012 09:35:21 +0000 (10:35 +0100)]
license header

11 years agoUchar -> uchar_t for consistency
Wolfgang Bumiller [Sun, 23 Dec 2012 09:34:29 +0000 (10:34 +0100)]
Uchar -> uchar_t for consistency

11 years agomanpage: -futf8
Wolfgang Bumiller [Sat, 22 Dec 2012 21:48:41 +0000 (22:48 +0100)]
manpage: -futf8

11 years agoutf8 tests
Wolfgang Bumiller [Sat, 22 Dec 2012 21:46:42 +0000 (22:46 +0100)]
utf8 tests

11 years agoBetter error message for -futf8
Wolfgang Bumiller [Sat, 22 Dec 2012 21:44:14 +0000 (22:44 +0100)]
Better error message for -futf8

11 years agofix and speed up u8_analyze for our purposes
Wolfgang Bumiller [Sat, 22 Dec 2012 21:43:14 +0000 (22:43 +0100)]
fix and speed up u8_analyze for our purposes

11 years ago-futf8 implementation
Wolfgang Bumiller [Sat, 22 Dec 2012 21:34:57 +0000 (22:34 +0100)]
-futf8 implementation

11 years agou8_analyze: return false on any invalid character, we do not allow invalid/overlong...
Wolfgang Bumiller [Sat, 22 Dec 2012 21:31:10 +0000 (22:31 +0100)]
u8_analyze: return false on any invalid character, we do not allow invalid/overlong characters in code at all

11 years agoImporting utf8lib
Wolfgang Bumiller [Fri, 21 Dec 2012 11:18:57 +0000 (12:18 +0100)]
Importing utf8lib

11 years agoBump 0.2 -> 0.3
Dale Weiler [Sun, 23 Dec 2012 09:18:17 +0000 (09:18 +0000)]
Bump 0.2 -> 0.3

11 years agoDon't generate vector defs if the vector's name starts with a # because that's an... 0.2
Wolfgang Bumiller [Sun, 23 Dec 2012 09:14:25 +0000 (10:14 +0100)]
Don't generate vector defs if the vector's name starts with a # because that's an 'IMMEDIATE'

11 years agoWhitespace
Dale Weiler [Sun, 23 Dec 2012 09:10:31 +0000 (09:10 +0000)]
Whitespace

11 years agoRevert "Whitespace fixes"
Dale Weiler [Sun, 23 Dec 2012 09:10:07 +0000 (09:10 +0000)]
Revert "Whitespace fixes"

This reverts commit 4580dcf1eacfce517e95b654b73d6e72db366273.

11 years agoWhitespace fixes
Dale Weiler [Sun, 23 Dec 2012 08:42:53 +0000 (08:42 +0000)]
Whitespace fixes

11 years agoLies ... damned lies, all lies I tell you ... copy-pasta lies!
Dale Weiler [Sun, 23 Dec 2012 08:17:05 +0000 (08:17 +0000)]
Lies ... damned lies, all lies I tell you ... copy-pasta lies!

11 years agoActually fix the segfault this time
Dale Weiler [Sun, 23 Dec 2012 08:08:05 +0000 (08:08 +0000)]
Actually fix the segfault this time

11 years agocon_default_out for opts.pp_only (removes recently added TODO .. and fixes a segfault)
Dale Weiler [Sun, 23 Dec 2012 07:57:06 +0000 (07:57 +0000)]
con_default_out for opts.pp_only (removes recently added TODO .. and fixes a segfault)

11 years agoMake compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr...
Dale Weiler [Sun, 23 Dec 2012 07:51:19 +0000 (07:51 +0000)]
Make compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr hack.

11 years agoRemove parser_compile_string_len, and make parser_compiler_string take an additional...
Dale Weiler [Sun, 23 Dec 2012 07:22:15 +0000 (07:22 +0000)]
Remove parser_compile_string_len, and make parser_compiler_string take an additional length argument.

11 years agofix comments
Dale Weiler [Sun, 23 Dec 2012 07:19:49 +0000 (07:19 +0000)]
fix comments

11 years agofixes, and removed a #pragma warning(disable ...) in MSVC .. thanks to the FILE wrapp...
Dale Weiler [Sun, 23 Dec 2012 07:18:00 +0000 (07:18 +0000)]
fixes, and removed a #pragma warning(disable ...) in MSVC .. thanks to the FILE wrapping interface.

11 years agoCleanup flexible array / vector system
Dale Weiler [Sun, 23 Dec 2012 07:14:16 +0000 (07:14 +0000)]
Cleanup flexible array / vector system

11 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Sun, 23 Dec 2012 06:06:57 +0000 (06:06 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

11 years agoWrapper around FILE to take advantage of MSVC "secure" CRT. We don't actually defend...
Dale Weiler [Sun, 23 Dec 2012 06:05:22 +0000 (06:05 +0000)]
Wrapper around FILE to take advantage of MSVC "secure" CRT.  We don't actually defend bounds checks (we just hack in the few ones to silent MSVC .. and to pass WinRT "native code" rules)

11 years agoMore stuff for qcvm -info
Wolfgang Bumiller [Sat, 22 Dec 2012 22:30:52 +0000 (23:30 +0100)]
More stuff for qcvm -info

11 years agoMakefile: lexer.o depends on lexer.h
Wolfgang Bumiller [Sat, 22 Dec 2012 19:43:59 +0000 (20:43 +0100)]
Makefile: lexer.o depends on lexer.h

11 years agoguard ]] with lex->flags.noops
Wolfgang Bumiller [Sat, 22 Dec 2012 19:41:02 +0000 (20:41 +0100)]
guard ]] with lex->flags.noops

11 years agofix -fshort-logic to cast to true boolean values
Wolfgang Bumiller [Sat, 22 Dec 2012 19:05:15 +0000 (20:05 +0100)]
fix -fshort-logic to cast to true boolean values

11 years agomanpage: capital section headings, updated -fcorrect-logic description, added -Wunkno...
Wolfgang Bumiller [Sat, 22 Dec 2012 17:19:51 +0000 (18:19 +0100)]
manpage: capital section headings, updated -fcorrect-logic description, added -Wunknown-attribute

11 years ago-Wunknown-attribute; and don't error on unknown attributes
Wolfgang Bumiller [Sat, 22 Dec 2012 17:16:41 +0000 (18:16 +0100)]
-Wunknown-attribute; and don't error on unknown attributes

11 years ago'noreturn' is now an attribute and parsed as [[noreturn]]
Wolfgang Bumiller [Sat, 22 Dec 2012 17:09:33 +0000 (18:09 +0100)]
'noreturn' is now an attribute and parsed as [[noreturn]]

11 years agoproperly fill the token string for TOKEN_ATTRIBUTE_*
Wolfgang Bumiller [Sat, 22 Dec 2012 17:09:17 +0000 (18:09 +0100)]
properly fill the token string for TOKEN_ATTRIBUTE_*

11 years ago is now no keyword anymore
Wolfgang Bumiller [Sat, 22 Dec 2012 17:03:43 +0000 (18:03 +0100)]
 is now no keyword anymore

11 years agoLexer: [[ and ]] are now TOKEN_ATTRIBUTE_{OPEN,CLOSE}
Wolfgang Bumiller [Sat, 22 Dec 2012 17:00:51 +0000 (18:00 +0100)]
Lexer: [[ and ]] are now TOKEN_ATTRIBUTE_{OPEN,CLOSE}

11 years agoTest cases for -fcorrect-logic
Wolfgang Bumiller [Sat, 22 Dec 2012 16:55:55 +0000 (17:55 +0100)]
Test cases for -fcorrect-logic

11 years agoAdding truth-flags testsuite for strings
Wolfgang Bumiller [Sat, 22 Dec 2012 16:36:06 +0000 (17:36 +0100)]
Adding truth-flags testsuite for strings

11 years ago-ffalse-empty-strings in && and ||
Wolfgang Bumiller [Sat, 22 Dec 2012 16:31:31 +0000 (17:31 +0100)]
-ffalse-empty-strings in && and ||

11 years ago-fcorrect-logic now handles only vectors
Wolfgang Bumiller [Sat, 22 Dec 2012 16:18:37 +0000 (17:18 +0100)]
-fcorrect-logic now handles only vectors

11 years agoError when using both -ffalse-empty-strings and -ftrue-empty-strings
Wolfgang Bumiller [Sat, 22 Dec 2012 15:50:09 +0000 (16:50 +0100)]
Error when using both -ffalse-empty-strings and -ftrue-empty-strings

11 years agoFix a bug with -fperl-logic and -fcorrect-logic
Wolfgang Bumiller [Sat, 22 Dec 2012 15:25:19 +0000 (16:25 +0100)]
Fix a bug with -fperl-logic and -fcorrect-logic

11 years agoFix: ast_value.cvq must be an int, not a bool;
Wolfgang Bumiller [Sat, 22 Dec 2012 11:30:03 +0000 (12:30 +0100)]
Fix: ast_value.cvq must be an int, not a bool;

Fixes #62

11 years agoCleanups and make compile with clang again with no warnings.
Dale Weiler [Sat, 22 Dec 2012 08:22:50 +0000 (08:22 +0000)]
Cleanups and make compile with clang again with no warnings.

11 years agocleanups and fixes that cppcheck found
Dale Weiler [Sat, 22 Dec 2012 08:07:54 +0000 (08:07 +0000)]
cleanups and fixes that cppcheck found

11 years agoMore cleanups
Dale Weiler [Sat, 22 Dec 2012 07:54:14 +0000 (07:54 +0000)]
More cleanups

11 years agoRemove more unused code
Dale Weiler [Sat, 22 Dec 2012 07:46:43 +0000 (07:46 +0000)]
Remove more unused code

11 years agoMake gmqcc binary smaller (by removing some useless code)
Dale Weiler [Sat, 22 Dec 2012 07:40:17 +0000 (07:40 +0000)]
Make gmqcc binary smaller (by removing some useless code)

11 years agoStick to one hash function (no platform optimized versions)
Dale Weiler [Sat, 22 Dec 2012 07:33:11 +0000 (07:33 +0000)]
Stick to one hash function (no platform optimized versions)

11 years agoCleanups
Dale Weiler [Sat, 22 Dec 2012 07:24:25 +0000 (07:24 +0000)]
Cleanups

11 years agoWindows stuff for visual studio now offical works with exception to colorized output...
Dale Weiler [Fri, 21 Dec 2012 11:13:16 +0000 (06:13 -0500)]
Windows stuff for visual studio now offical works with exception to colorized output to cmd (which actually should work). As well as the testsuite which lacks implementations of task_popen/task_pclose.

11 years ago-Opeephole now also reduces CALL stores
Wolfgang Bumiller [Fri, 21 Dec 2012 10:42:23 +0000 (11:42 +0100)]
-Opeephole now also reduces CALL stores

11 years agoRename ir_function_pass_tailcall->tailrecursion; Take -fadjust-vector-fields into...
Wolfgang Bumiller [Fri, 21 Dec 2012 10:33:44 +0000 (11:33 +0100)]
Rename ir_function_pass_tailcall->tailrecursion; Take -fadjust-vector-fields into account when storing field type return-values from functions

11 years agomanpage: -Wcpp; added a FILES section which contains gmqcc.ini.example - we should...
Wolfgang Bumiller [Fri, 21 Dec 2012 10:02:36 +0000 (11:02 +0100)]
manpage: -Wcpp; added a FILES section which contains gmqcc.ini.example - we should install this to some DATADIR in the install make target

11 years agotestsuite compiles on windows now (but doesn't work). Still need to implement bidire...
Dale Weiler [Fri, 21 Dec 2012 06:59:34 +0000 (01:59 -0500)]
testsuite compiles on windows now (but doesn't work).  Still need to implement bidirectional piping on stdout/stderr/stdin.. Which for some reason is incredibly stupidly complicated on windows.  You need to setup SECURITY_ATTRIBUTES for each handle, do crazy handle duplication, and forking via CreateThread.  Meanwhile the whole "concept" of threading is entierly broken in fundamental design on windows, which means you constantly need to store the current process handles for backup, and "inherit" from child process.  It's just stupid, provide unix pipes via close/open and dup.  Like normal people (they're simple and sane).

11 years agoGet gmqcc/qcvm compiling on windows again. Plus work in progress support for the...
Dale Weiler [Fri, 21 Dec 2012 06:00:51 +0000 (01:00 -0500)]
Get gmqcc/qcvm compiling on windows again.  Plus work in progress support for the testsuite on windows (does not compile yet).

11 years agoImplemented preprocessing error directive tests (should fail)
Dale Weiler [Fri, 21 Dec 2012 04:48:01 +0000 (04:48 +0000)]
Implemented preprocessing error directive tests (should fail)

11 years agoDocument ini.example
Dale Weiler [Fri, 21 Dec 2012 04:01:47 +0000 (04:01 +0000)]
Document ini.example

11 years agoUpdate ini.example (added UNREACHABLE_CODE, and CPP) as warning options
Dale Weiler [Fri, 21 Dec 2012 03:14:31 +0000 (03:14 +0000)]
Update ini.example (added UNREACHABLE_CODE, and CPP) as warning options

11 years agoadded -Wcpp (for turning off cpp warnings defined with #warning like GCC/clang/pathsc...
Dale Weiler [Fri, 21 Dec 2012 03:12:58 +0000 (03:12 +0000)]
added -Wcpp (for turning off cpp warnings defined with #warning like GCC/clang/pathscale .. no more [-Wunused-variable])

11 years agoImplemented #warning and #error preprocessor directives, they're functionally equival...
Dale Weiler [Fri, 21 Dec 2012 03:08:21 +0000 (03:08 +0000)]
Implemented #warning and #error preprocessor directives, they're functionally equivalent to CPPs (supporting both string constant and non-string constant versions).  Warnings however are printed with a [-Wunused-variable] which isn't correct (TODO: allow systematic changes of -W paramaters in relation to warning fields for preprocessor directives.

11 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Thu, 20 Dec 2012 23:07:33 +0000 (23:07 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

11 years agoImplemented roboust compile-time endianess check.
Dale Weiler [Thu, 20 Dec 2012 23:07:06 +0000 (23:07 +0000)]
Implemented roboust compile-time endianess check.

11 years agoRemove old tempalloc code; disable -Olocaltemps for now
Wolfgang Bumiller [Thu, 20 Dec 2012 22:52:54 +0000 (23:52 +0100)]
Remove old tempalloc code; disable -Olocaltemps for now

11 years agoBe more correct with sizes; use a better local-alloc strategy
Wolfgang Bumiller [Thu, 20 Dec 2012 22:48:41 +0000 (23:48 +0100)]
Be more correct with sizes; use a better local-alloc strategy

11 years agominor: fix ast_function_label
Wolfgang Bumiller [Thu, 20 Dec 2012 22:27:23 +0000 (23:27 +0100)]
minor: fix ast_function_label

11 years agoFix util_endianswap; and endianswap the LNO data as well
Wolfgang Bumiller [Thu, 20 Dec 2012 21:03:51 +0000 (22:03 +0100)]
Fix util_endianswap; and endianswap the LNO data as well

11 years agoDon't check for is_return but for final at the end of a function so that if 'goto...
Wolfgang Bumiller [Thu, 20 Dec 2012 20:05:29 +0000 (21:05 +0100)]
Don't check for is_return but for final at the end of a function so that if 'goto' is the last expression we don't try to append a return

11 years ago*sigh*
Wolfgang Bumiller [Thu, 20 Dec 2012 19:57:05 +0000 (20:57 +0100)]
*sigh*

11 years agono need to check the array, the 2nd NOT is a NOT_F
Wolfgang Bumiller [Thu, 20 Dec 2012 19:56:49 +0000 (20:56 +0100)]
no need to check the array, the 2nd NOT is a NOT_F

11 years agomanpage: -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings
Wolfgang Bumiller [Thu, 20 Dec 2012 19:56:08 +0000 (20:56 +0100)]
manpage: -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings

11 years agofix -fcorrect-logic to use double-not instead of a single one - wow that was a bad one
Wolfgang Bumiller [Thu, 20 Dec 2012 19:55:56 +0000 (20:55 +0100)]
fix -fcorrect-logic to use double-not instead of a single one - wow that was a bad one

11 years agoTestcases for -ftrue-empty-strings and -ffalse-empty-strings
Wolfgang Bumiller [Thu, 20 Dec 2012 19:43:58 +0000 (20:43 +0100)]
Testcases for -ftrue-empty-strings and -ffalse-empty-strings

11 years agoFix the -fcorrect-logic condition
Wolfgang Bumiller [Thu, 20 Dec 2012 19:40:59 +0000 (20:40 +0100)]
Fix the -fcorrect-logic condition

11 years agoFix -fcorrect-logic
Wolfgang Bumiller [Thu, 20 Dec 2012 19:33:05 +0000 (20:33 +0100)]
Fix -fcorrect-logic