]> git.xonotic.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
11 years agocode_alloc_field to allocate entityfield data, ir now has ir_builder_create_field...
Wolfgang Bumiller [Sat, 28 Jul 2012 19:55:01 +0000 (21:55 +0200)]
code_alloc_field to allocate entityfield data, ir now has ir_builder_create_field - so that globals and fields can be created separately - properly

11 years agoMerge branch 'master' into cmdline
Wolfgang Bumiller [Sat, 28 Jul 2012 19:04:59 +0000 (21:04 +0200)]
Merge branch 'master' into cmdline

11 years agouse util_ functions for strtocmd and strtononcmd
Wolfgang Bumiller [Sat, 28 Jul 2012 17:31:14 +0000 (19:31 +0200)]
use util_ functions for strtocmd and strtononcmd

11 years agoAdded missing parameter names
Wolfgang Bumiller [Sat, 28 Jul 2012 17:31:02 +0000 (19:31 +0200)]
Added missing parameter names

11 years agoutil_strtocmd, util_strtononcmd
Wolfgang Bumiller [Sat, 28 Jul 2012 17:28:27 +0000 (19:28 +0200)]
util_strtocmd, util_strtononcmd

11 years agoreuse old opts_, renamed all opt_ to opts_ to be consistent, making code.c use OPTS_F...
Wolfgang Bumiller [Sat, 28 Jul 2012 17:20:19 +0000 (19:20 +0200)]
reuse old opts_, renamed all opt_ to opts_ to be consistent, making code.c use OPTS_FLAG() for OMIT_NULL_BYTES and DARKPLACES_STRING_TABLE_BUG

11 years agoflags.def and warns.def containing defined flags and warnings
Wolfgang Bumiller [Sat, 28 Jul 2012 17:09:44 +0000 (19:09 +0200)]
flags.def and warns.def containing defined flags and warnings

11 years agoast_store to take ast_expression on its left, rather than ast_value. Assigning to...
Wolfgang Bumiller [Sat, 28 Jul 2012 16:13:12 +0000 (18:13 +0200)]
ast_store to take ast_expression on its left, rather than ast_value. Assigning to a vector member would not put an ast_value on the left, but an ast_member, thus: ast_expression now already

11 years agoconsistency ftw
Wolfgang Bumiller [Sat, 28 Jul 2012 13:57:28 +0000 (15:57 +0200)]
consistency ftw

11 years ago-fhelp to list -f flags, -Whelp to list -W options
Wolfgang Bumiller [Sat, 28 Jul 2012 12:50:07 +0000 (14:50 +0200)]
-fhelp to list -f flags, -Whelp to list -W options

11 years agoAdd -foverlap-locals - something we really should make possible
Wolfgang Bumiller [Sat, 28 Jul 2012 12:48:02 +0000 (14:48 +0200)]
Add -foverlap-locals - something we really should make possible

11 years agoAdded handler for -W
Wolfgang Bumiller [Sat, 28 Jul 2012 11:59:35 +0000 (13:59 +0200)]
Added handler for -W

11 years agoFixing a warning
Wolfgang Bumiller [Sat, 28 Jul 2012 11:50:12 +0000 (13:50 +0200)]
Fixing a warning

11 years agoImporting gmqcc.1
Wolfgang Bumiller [Sat, 28 Jul 2012 11:47:14 +0000 (13:47 +0200)]
Importing gmqcc.1

11 years agoPrint out all the information parsed from the commandline
Wolfgang Bumiller [Sat, 28 Jul 2012 11:20:06 +0000 (13:20 +0200)]
Print out all the information parsed from the commandline

11 years agogcc style long option support and -std=foo added
Wolfgang Bumiller [Sat, 28 Jul 2012 10:59:33 +0000 (12:59 +0200)]
gcc style long option support and -std=foo added

11 years agoCommandline handling first draft
Wolfgang Bumiller [Sat, 28 Jul 2012 10:36:20 +0000 (12:36 +0200)]
Commandline handling first draft

11 years agoexecutor: prog_delete: deleting builtins properly - unless statically allocated;...
Wolfgang Bumiller [Fri, 27 Jul 2012 17:27:56 +0000 (19:27 +0200)]
executor: prog_delete: deleting builtins properly - unless statically allocated; added a qc_builtins array for the standalone executor containing 'print'

11 years ago_MEM_ -> MEM_ again at use
Wolfgang Bumiller [Fri, 27 Jul 2012 17:18:04 +0000 (19:18 +0200)]
_MEM_ -> MEM_ again at use

11 years agoMerging master and adapting _MEM_* on new mem-vector functions
Wolfgang Bumiller [Fri, 27 Jul 2012 17:13:03 +0000 (19:13 +0200)]
Merging master and adapting _MEM_* on new mem-vector functions

11 years ago_MEM_... -> MEM_...
Wolfgang Bumiller [Fri, 27 Jul 2012 17:02:18 +0000 (19:02 +0200)]
_MEM_... -> MEM_...

11 years agoremoving an old comment
Wolfgang Bumiller [Fri, 27 Jul 2012 13:27:34 +0000 (15:27 +0200)]
removing an old comment

11 years agoMoving parameters to from ast_value to ast_expression_common, it's part of the type...
Wolfgang Bumiller [Fri, 27 Jul 2012 13:22:39 +0000 (15:22 +0200)]
Moving parameters to from ast_value to ast_expression_common, it's part of the type after all

11 years agoast_block_set_type
Wolfgang Bumiller [Fri, 27 Jul 2012 11:39:58 +0000 (13:39 +0200)]
ast_block_set_type

11 years agoast_return_new doesn't take an operator, we use INSTR_RETURN always, never INSTR_DONE...
Wolfgang Bumiller [Thu, 26 Jul 2012 21:23:47 +0000 (23:23 +0200)]
ast_return_new doesn't take an operator, we use INSTR_RETURN always, never INSTR_DONE for explicit returns

11 years agoINSTR_NOT_* output to opC not opB...
Wolfgang Bumiller [Thu, 26 Jul 2012 20:11:46 +0000 (22:11 +0200)]
INSTR_NOT_* output to opC not opB...

11 years agoast_return
Wolfgang Bumiller [Thu, 26 Jul 2012 19:18:39 +0000 (21:18 +0200)]
ast_return

11 years agoast/ir support for unary instructions
Wolfgang Bumiller [Thu, 26 Jul 2012 18:45:18 +0000 (20:45 +0200)]
ast/ir support for unary instructions

11 years agoRemoved params from ast_function again. It really is superfluous to copy them, just...
Wolfgang Bumiller [Sun, 22 Jul 2012 10:35:10 +0000 (12:35 +0200)]
Removed params from ast_function again. It really is superfluous to copy them, just generate them from its ast_value's param list

11 years agofix a warning about a format string
Wolfgang Bumiller [Sun, 22 Jul 2012 10:22:25 +0000 (12:22 +0200)]
fix a warning about a format string

11 years agouse type_sizeof in another place where it wasn't
Wolfgang Bumiller [Sun, 22 Jul 2012 10:20:06 +0000 (12:20 +0200)]
use type_sizeof in another place where it wasn't

11 years agoast_function generates parameter locals, ir_function_create_local now allows adding...
Wolfgang Bumiller [Sun, 22 Jul 2012 10:15:48 +0000 (12:15 +0200)]
ast_function generates parameter locals, ir_function_create_local now allows adding parameters as long as no local variables have been added yet

11 years agostore_param storetype, parameter value list added to ast_function
Wolfgang Bumiller [Sun, 22 Jul 2012 10:07:07 +0000 (12:07 +0200)]
store_param storetype, parameter value list added to ast_function

11 years agoremoving params vector from ast_function, params are stored in its ast_value only
Wolfgang Bumiller [Thu, 19 Jul 2012 16:14:08 +0000 (18:14 +0200)]
removing params vector from ast_function, params are stored in its ast_value only

11 years agoir_function_dump to print builtins as such
Wolfgang Bumiller [Thu, 19 Jul 2012 16:06:37 +0000 (18:06 +0200)]
ir_function_dump to print builtins as such

11 years agoCorrect variable name for type_storep_instr
Wolfgang Bumiller [Mon, 16 Jul 2012 10:27:58 +0000 (12:27 +0200)]
Correct variable name for type_storep_instr

11 years agotype_storep_instr: in theory we could use type_store_instr + INSTR_STOREP_F - INSTR_S...
Wolfgang Bumiller [Mon, 16 Jul 2012 08:24:35 +0000 (10:24 +0200)]
type_storep_instr: in theory we could use type_store_instr + INSTR_STOREP_F - INSTR_STORE_F, however, this won't work later when TYPE_INTEGER comes in since the _I instructions are at a seperate place

11 years agoReplacing 2 switches to use type_store_instr instead
Wolfgang Bumiller [Mon, 16 Jul 2012 08:19:04 +0000 (10:19 +0200)]
Replacing 2 switches to use type_store_instr instead

11 years agouse type_sizeof in some places where previously manual size checking has been done
Wolfgang Bumiller [Tue, 10 Jul 2012 17:29:01 +0000 (19:29 +0200)]
use type_sizeof in some places where previously manual size checking has been done

11 years agoDo not actually return after generating a call, there are other isntructions following
Wolfgang Bumiller [Wed, 4 Jul 2012 13:16:02 +0000 (15:16 +0200)]
Do not actually return after generating a call, there are other isntructions following

11 years agoTesting CALLs in test-ast
Wolfgang Bumiller [Wed, 4 Jul 2012 13:05:16 +0000 (15:05 +0200)]
Testing CALLs in test-ast

11 years agoStore the codeaddr of function's ir_values upon generation...
Wolfgang Bumiller [Wed, 4 Jul 2012 13:05:09 +0000 (15:05 +0200)]
Store the codeaddr of function's ir_values upon generation...

11 years agoReturn that the call was actually generated successfully if it was...
Wolfgang Bumiller [Wed, 4 Jul 2012 13:02:55 +0000 (15:02 +0200)]
Return that the call was actually generated successfully if it was...

11 years agoStoring ir_v for functions
Wolfgang Bumiller [Wed, 4 Jul 2012 13:00:30 +0000 (15:00 +0200)]
Storing ir_v for functions

11 years agoast_call needs to set its func member
Wolfgang Bumiller [Wed, 4 Jul 2012 12:41:39 +0000 (14:41 +0200)]
ast_call needs to set its func member

11 years agoast_call's param vector functions
Wolfgang Bumiller [Wed, 4 Jul 2012 12:39:58 +0000 (14:39 +0200)]
ast_call's param vector functions

11 years agoast-macros: MKCONSTSTRING, added sHello hello world string
Wolfgang Bumiller [Wed, 4 Jul 2012 12:20:54 +0000 (14:20 +0200)]
ast-macros: MKCONSTSTRING, added sHello hello world string

11 years agoEnabling the print builtin nodes, soon to be used to test CALL generation
Wolfgang Bumiller [Wed, 4 Jul 2012 11:31:10 +0000 (13:31 +0200)]
Enabling the print builtin nodes, soon to be used to test CALL generation

11 years agoadd AINSTR_END to the end of functions so the debug-printing knows when to end...
Wolfgang Bumiller [Wed, 4 Jul 2012 11:29:26 +0000 (13:29 +0200)]
add AINSTR_END to the end of functions so the debug-printing knows when to end...

11 years agoDon't die on functions with no variables
Wolfgang Bumiller [Wed, 4 Jul 2012 11:16:15 +0000 (13:16 +0200)]
Don't die on functions with no variables

11 years agocreating and generating builtin functions, ast-macros for builtins, todo: params
Wolfgang Bumiller [Tue, 3 Jul 2012 21:38:38 +0000 (23:38 +0200)]
creating and generating builtin functions, ast-macros for builtins, todo: params

11 years agobasic CALL translation: to be refined
Wolfgang Bumiller [Tue, 3 Jul 2012 20:47:01 +0000 (22:47 +0200)]
basic CALL translation: to be refined

11 years agotype_store_instr[] to get an INSTR_STORE_x by type
Wolfgang Bumiller [Tue, 3 Jul 2012 20:46:38 +0000 (22:46 +0200)]
type_store_instr[] to get an INSTR_STORE_x by type

11 years agoAdopt dp's function-local backup strategy and add parameter-copying to EnterFunction
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 14:04:24 +0000 (16:04 +0200)]
Adopt dp's function-local backup strategy and add parameter-copying to EnterFunction

11 years agofixed a typo in asm_instr[]: ES_FNC->EQ_FNC
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 13:41:56 +0000 (15:41 +0200)]
fixed a typo in asm_instr[]: ES_FNC->EQ_FNC

11 years agocreate_call should use store_return as output type for now
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 13:40:21 +0000 (15:40 +0200)]
create_call should use store_return as output type for now

11 years agoadding another storage type: store_return; when generating a CALL, the generator...
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 12:37:12 +0000 (14:37 +0200)]
adding another storage type: store_return; when generating a CALL, the generator can check the output value's storetype, and if it is NOT store_return, it needs to STORE_x the return value into the output value.

11 years agogenerating an ir_value for an ir_function at creation now
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 11:25:31 +0000 (13:25 +0200)]
generating an ir_value for an ir_function at creation now

11 years agofunction in the ast now MUST have an output type in their 'next' ast_expression point...
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 11:07:19 +0000 (13:07 +0200)]
function in the ast now MUST have an output type in their 'next' ast_expression pointer, the IR's outtype of functions is now filled

11 years agoir_builder_create_call to take return type from the ir_value
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 10:55:35 +0000 (12:55 +0200)]
ir_builder_create_call to take return type from the ir_value

11 years agoFix a possibly uninitialized variable
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 15:27:02 +0000 (17:27 +0200)]
Fix a possibly uninitialized variable

11 years agoFixing GMQCC_SUPPRESS_EMPTY_BODY typo
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 15:22:56 +0000 (17:22 +0200)]
Fixing GMQCC_SUPPRESS_EMPTY_BODY typo

11 years agoast_call_codegen, ir_block_create_call plus call-related functions, ir_value->outtype...
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 15:21:26 +0000 (17:21 +0200)]
ast_call_codegen, ir_block_create_call plus call-related functions, ir_value->outtype TODO: fill outtype in ir_value

11 years agoAdded a comment about an idea on how to translate calls better. Gotta check some...
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 14:20:31 +0000 (16:20 +0200)]
Added a comment about an idea on how to translate calls better. Gotta check some papers for better solutions later

11 years agoast_call node; codegen dummy
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 14:15:51 +0000 (16:15 +0200)]
ast_call node; codegen dummy

11 years agoir_instr can now store a list of parameters, will be used for CALLs
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 13:50:51 +0000 (15:50 +0200)]
ir_instr can now store a list of parameters, will be used for CALLs

11 years agoexec.h -> gmqcc.h
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 20:31:56 +0000 (22:31 +0200)]
exec.h -> gmqcc.h

11 years agotidying up, using the original typenames from code.c, renamed JUMPS_DEFAULT to VM_JUM...
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 20:29:31 +0000 (22:29 +0200)]
tidying up, using the original typenames from code.c, renamed JUMPS_DEFAULT to VM_JUMPS_DEFAULT

11 years agoMoving prog_section and prog_header to gmqcc.h to not have it twice: previously was...
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 20:04:58 +0000 (22:04 +0200)]
Moving prog_section and prog_header to gmqcc.h to not have it twice: previously was in code.c and exec.h

11 years agofixing Makefile for the qcvm_execprogram.h -> execloop.h commit
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 20:04:02 +0000 (22:04 +0200)]
fixing Makefile for the qcvm_execprogram.h -> execloop.h commit

11 years agoCommenting the VMXF_ flags
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 17:42:51 +0000 (19:42 +0200)]
Commenting the VMXF_ flags

11 years agoqcvm_execprogram.h -> execloop.h
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 17:37:00 +0000 (19:37 +0200)]
qcvm_execprogram.h -> execloop.h

11 years agosizeof(int)->sizeof(qcint) - pointed out by graphitemaster
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 15:21:25 +0000 (17:21 +0200)]
sizeof(int)->sizeof(qcint) - pointed out by graphitemaster

11 years agomake clean : now deletes qcvm
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 13:36:22 +0000 (15:36 +0200)]
make clean : now deletes qcvm

11 years agoA prototype for error handling
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 13:34:26 +0000 (15:34 +0200)]
A prototype for error handling

11 years ago'make qcvm' now builds exec-standalone.o from exec.c with -DQCVM_EXECUTOR=1
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 12:56:43 +0000 (14:56 +0200)]
'make qcvm' now builds exec-standalone.o from exec.c with -DQCVM_EXECUTOR=1

11 years agomore protos in exec.h
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 12:54:19 +0000 (14:54 +0200)]
more protos in exec.h

11 years agoMoving typedefs and defines from exec.c into an exec.h header
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 12:53:20 +0000 (14:53 +0200)]
Moving typedefs and defines from exec.c into an exec.h header

11 years agomoved mem_resize and mem_append vector function macros into gmqcc.h
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 12:50:52 +0000 (14:50 +0200)]
moved mem_resize and mem_append vector function macros into gmqcc.h

11 years agofix vector resize to not always resize and actually use the reallocated place...
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 12:49:36 +0000 (14:49 +0200)]
fix vector resize to not always resize and actually use the reallocated place...

11 years agoprog_enter/leavefunction made static
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 11:23:27 +0000 (13:23 +0200)]
prog_enter/leavefunction made static

11 years agoExecutor now executes and traces
Wolfgang (Blub) Bumiller [Wed, 27 Jun 2012 11:21:37 +0000 (13:21 +0200)]
Executor now executes and traces

11 years agoSearching for 'main'
Wolfgang (Blub) Bumiller [Tue, 26 Jun 2012 11:22:37 +0000 (13:22 +0200)]
Searching for 'main'

11 years agoListing functions
Wolfgang (Blub) Bumiller [Tue, 26 Jun 2012 11:21:09 +0000 (13:21 +0200)]
Listing functions

11 years agolocal-stack, locak-stack-pointer, getting strings from an index, adding tempstrings
Wolfgang (Blub) Bumiller [Tue, 26 Jun 2012 11:10:10 +0000 (13:10 +0200)]
local-stack, locak-stack-pointer, getting strings from an index, adding tempstrings

11 years agoexecutor: loader
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 21:58:47 +0000 (23:58 +0200)]
executor: loader

11 years agoDeleting the manually written ast-test which was '#if 0'-ed out
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 17:35:18 +0000 (19:35 +0200)]
Deleting the manually written ast-test which was '#if 0'-ed out

11 years agogeneration of COND and JUMP now works
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 17:27:50 +0000 (19:27 +0200)]
generation of COND and JUMP now works

11 years agoir_function.allocated_locals now contains the number of locals a function requires...
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 15:43:10 +0000 (17:43 +0200)]
ir_function.allocated_locals now contains the number of locals a function requires, renamed code.slot to code.local, makes more sense

11 years agoremoving debug output
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 15:37:50 +0000 (17:37 +0200)]
removing debug output

11 years agovalue position allocation, fixing a possible endless loop in ir_values_overlap
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 14:06:01 +0000 (16:06 +0200)]
value position allocation, fixing a possible endless loop in ir_values_overlap

11 years agoir_value_life_merge_into, to merge the liferange of one value into the range of anoth...
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 12:51:31 +0000 (14:51 +0200)]
ir_value_life_merge_into, to merge the liferange of one value into the range of another, testing in test_ir

11 years agoir_function_allocate_locals prototype
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 12:14:34 +0000 (14:14 +0200)]
ir_function_allocate_locals prototype

11 years agou1 here instead of s1
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 11:30:14 +0000 (13:30 +0200)]
u1 here instead of s1

11 years agoDon't add the var_ prefix to function names in the ast-test macros...
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 09:54:30 +0000 (11:54 +0200)]
Don't add the var_ prefix to function names in the ast-test macros...

11 years agogenerate the trailing zero
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 09:52:34 +0000 (11:52 +0200)]
generate the trailing zero

11 years agoGenerate function global, take 2-op instruction operand ordering into account
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 09:52:18 +0000 (11:52 +0200)]
Generate function global, take 2-op instruction operand ordering into account

11 years agoFixing NULL->false and empty lines...
Wolfgang (Blub) Bumiller [Mon, 11 Jun 2012 17:25:21 +0000 (19:25 +0200)]
Fixing NULL->false and empty lines...

11 years agoMerge branch 'irgen'
Dale Weiler [Thu, 7 Jun 2012 15:24:55 +0000 (11:24 -0400)]
Merge branch 'irgen'

11 years agoBetter fail
Dale Weiler [Thu, 7 Jun 2012 15:24:28 +0000 (11:24 -0400)]
Better fail