Commit graph

101 commits

Author SHA1 Message Date
Dale Weiler
10dd7aacfe Apply some static where it belongs 2013-04-25 03:34:42 +00:00
Wolfgang Bumiller
3a4aba0b31 Grrrr 2013-04-24 17:47:42 +02:00
Dale Weiler
489ad486bc Get it compiling in visual studio again. 2013-04-24 01:43:53 +00:00
Dale Weiler
7ba7fd5968 Fet rid of explicit file stream flushes, streams are flushed on exit, which we can always gurantee. 2013-04-14 01:32:29 +00:00
Dale Weiler
f19adcd1b3 Implemented __builtin_mod, and % operator. Added floor builtin to the standalone executor. Mod works so long as the compiler can find a suitable definition of "float floor(float)", otherwise it prints a diagnostic and gives up (original id1 Quake had floor so we can depend on it). 2013-03-08 09:17:54 +00:00
Dale Weiler
8d59d7029d Cleanup cargocult directory and file specific things, to fs.c (renamed file.c which also contains directory handling stuff). Also cleaned up some stuff, and added proper end comments to conditional inclusion stuff. 2013-02-08 12:06:59 +00:00
Wolfgang Bumiller
7fb3b97e73 -v now prints the initial value of globals in -printdefs 2013-01-25 19:17:31 +01:00
Wolfgang Bumiller
48f8d0e0c3 changing some error prints to print to stderr in exec.c 2013-01-25 18:41:17 +01:00
Wolfgang Bumiller
06f53b1a28 When not actually executing, don't complain about invalid progs.dat versions for now. 2013-01-17 17:36:06 +01:00
Wolfgang Bumiller
73c86127f7 fix the broken vector instructions in our executor as well... how could I forget 2013-01-14 14:22:02 +01:00
Wolfgang Bumiller
30eac57199 filling type_name in exec.c 2013-01-11 23:15:16 +01:00
Wolfgang Bumiller
5bb4e40c72 code cleanup: prog_tempstring used to cast const char * parameter to char * due to the old vector code which is now gone 2013-01-11 23:13:36 +01:00
Wolfgang Bumiller
6ece523552 sqrt and normalize builtins 2013-01-08 20:46:30 +01:00
Wolfgang Bumiller
2531a3695f fixup qcvm parameter handling, now progs.dat can be specified anywhere not just at the end 2013-01-06 16:37:02 +01:00
Dale Weiler
29db4a44ed Happy new years! 2013-01-01 05:08:55 +00:00
Dale Weiler
d750d17be5 Fix evaluation order bug 2012-12-30 11:01:45 +00:00
Dale Weiler
6935561b41 Fix one warning 2012-12-28 12:33:10 +00:00
Wolfgang Bumiller
93dbfa18f1 fix -v option parsing in qcvm 2012-12-26 22:49:50 +01:00
Wolfgang Bumiller
47f7611ec9 verbose switches for the qcvm; makes -printfuns find the instruction-count of a function and print that too 2012-12-26 10:23:45 +01:00
Wolfgang Bumiller
890ca3c782 added -disasm-func to the qcvm 2012-12-23 20:45:43 +01:00
Wolfgang Bumiller
ee7051c5a4 strcmp and strncmp builtins 2012-12-23 19:22:38 +01:00
Wolfgang Bumiller
275b6f777a Adding strcat builtin to qcvm 2012-12-23 19:06:29 +01:00
Wolfgang Bumiller
67bc99223d Fix a nasty bug in the executor; and make null-strings be shown as (null) in the trace output 2012-12-23 17:32:14 +01:00
Dale Weiler
c3964cf29d Make compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr hack. 2012-12-23 07:51:19 +00:00
Dale Weiler
6bc29a1601 Merge branch 'master' of github.com:graphitemaster/gmqcc 2012-12-23 06:06:57 +00:00
Dale Weiler
13003bf6af 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) 2012-12-23 06:05:22 +00:00
Wolfgang Bumiller
9d54ea6b0c More stuff for qcvm -info 2012-12-22 23:30:52 +01:00
Dale Weiler
fa401b6f56 Cleanups and make compile with clang again with no warnings. 2012-12-22 08:22:50 +00:00
Dale Weiler
7d2a2f2ade cleanups and fixes that cppcheck found 2012-12-22 08:07:54 +00:00
Dale Weiler
3c003bc168 Get gmqcc/qcvm compiling on windows again. Plus work in progress support for the testsuite on windows (does not compile yet). 2012-12-21 01:00:51 -05:00
Wolfgang Bumiller
b02c4e4d10 sscanf_s only for _MSC_VER not WIN32 in exec.c 2012-12-20 15:46:31 +01:00
Wolfgang (Blub) Bumiller
e1c3e35422 Improved parameter handling of qcvm a little, added --version and --help 2012-12-18 15:46:26 +01:00
Wolfgang (Blub) Bumiller
70f676784d Better usage message for qcvm, don't exit after any of the information prints - but don't execute if any of them are used 2012-12-18 15:39:20 +01:00
Wolfgang (Blub) Bumiller
2a94fe9731 qcvm -pringdefs now prints [SAVE] next to globals with DEF_SAVEFLAG set 2012-12-18 12:41:29 +01:00
Wolfgang (Blub) Bumiller
83a41d13c0 Don't generate AINSTR_END anymore, use INSTR_DONE 2012-12-18 11:46:26 +01:00
Wolfgang (Blub) Bumiller
a5e0542f95 cmd_options -> opts_cmd_t to make testsuite and executor compile again 2012-12-18 11:46:15 +01:00
Wolfgang (Blub) Bumiller
f9b1d057b5 Moving all the global opts_ variables into a struct, now there's one global 'opts' struct 2012-12-06 13:23:53 +01:00
Wolfgang (Blub) Bumiller
5f0f5bedbc More stuff in qcvm -printfuns 2012-12-05 14:22:24 +01:00
Wolfgang (Blub) Bumiller
e8a1b7e71c Remove an unused variable qc_stof 2012-12-02 11:58:15 +01:00
Wolfgang (Blub) Bumiller
b7ce7370e8 stof builtin #9 2012-12-01 15:54:13 +01:00
Wolfgang (Blub) Bumiller
79e0c5c4fa More info in qcvm -printfuns 2012-12-01 15:23:04 +01:00
Wolfgang (Blub) Bumiller
e0a7f8a484 qcvm -printfuns; prog_section_function.nargs is now signed as fteqcc sets builtins with varargs to have -1 params 2012-11-30 20:20:13 +01:00
Wolfgang (Blub) Bumiller
fef9303381 moving opts_warn and opts_werror to con.c 2012-11-28 19:18:11 +01:00
Wolfgang (Blub) Bumiller
3c1992fc38 qcvm didn't compile since moving the compile messages to con.c due to undefined references - fixed now 2012-11-28 19:16:35 +01:00
Dale Weiler
ca52ecc20a Remove trailing whitespace for Blub. 2012-11-26 11:12:06 +00:00
Dale Weiler
81bb87c49b Sign conversion fixes in exec.c 2012-11-23 06:23:20 +00:00
Wolfgang (Blub) Bumiller
12fca5ef8f Make the disasm a bit more verbose as to where globals are 2012-11-18 20:32:22 +01:00
Wolfgang (Blub) Bumiller
906f319673 Replaced it all... 2012-11-15 18:32:09 +01:00
Wolfgang (Blub) Bumiller
84088cb5f0 Merging in new-syntax 2012-11-14 21:39:16 +01:00
Wolfgang (Blub) Bumiller
6044079528 Fix a very stupid bug in the executor which prevented ADDRESS to have the same global as output as one of its inputs 2012-11-13 00:36:00 +01:00