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

11 years agoFixed more warnings
Dale Weiler [Thu, 7 Jun 2012 15:18:04 +0000 (11:18 -0400)]
Fixed more warnings

11 years agofixed -Wconditional-uninitialized for ast codegen
Dale Weiler [Thu, 7 Jun 2012 15:12:12 +0000 (11:12 -0400)]
fixed -Wconditional-uninitialized for ast codegen

11 years agoRemoved even more warnings
Dale Weiler [Thu, 7 Jun 2012 15:09:29 +0000 (11:09 -0400)]
Removed even more warnings

11 years agoremoved more warnings
Dale Weiler [Thu, 7 Jun 2012 15:04:38 +0000 (11:04 -0400)]
removed more warnings

11 years agofixed shadow issue
Dale Weiler [Thu, 7 Jun 2012 14:59:57 +0000 (10:59 -0400)]
fixed shadow issue

11 years agoMore compile warnings (disabled many for now, they will be re-enabled one-by-one...
Dale Weiler [Thu, 7 Jun 2012 14:57:48 +0000 (10:57 -0400)]
More compile warnings (disabled many for now, they will be re-enabled one-by-one as code that triggers warnings is rectified)

11 years agos/\t/ /g
Dale Weiler [Thu, 7 Jun 2012 14:20:54 +0000 (10:20 -0400)]
s/\t/    /g

11 years agosplint: use typedef instead of macro
Dale Weiler [Thu, 7 Jun 2012 14:19:00 +0000 (10:19 -0400)]
splint: use typedef instead of macro

11 years agoPrint the name, not the struct pointer :S
Wolfgang Bumiller [Sun, 13 May 2012 12:06:50 +0000 (14:06 +0200)]
Print the name, not the struct pointer :S

11 years agoWhitespace
Dale Weiler [Fri, 11 May 2012 16:02:22 +0000 (12:02 -0400)]
Whitespace

11 years agofixing fwrite calls I had messed up
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 16:24:13 +0000 (18:24 +0200)]
fixing fwrite calls I had messed up

11 years agoAdding a few error message.
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 15:39:17 +0000 (17:39 +0200)]
Adding a few error message.

11 years agoTYPE_VARIANT in codegen, writing code from ast-test
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 15:30:08 +0000 (17:30 +0200)]
TYPE_VARIANT in codegen, writing code from ast-test

11 years agogenerating block code in a simple naive order for now - the ast / parser should help...
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 13:02:58 +0000 (15:02 +0200)]
generating block code in a simple naive order for now - the ast / parser should help improving order

11 years agoChecking if mem_a returns NULL in ir_..._new functions
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 12:24:35 +0000 (14:24 +0200)]
Checking if mem_a returns NULL in ir_..._new functions

11 years agoIt's the same TYPE enum...
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 12:18:01 +0000 (14:18 +0200)]
It's the same TYPE enum...

11 years agoMore work on generating code - still not instantiating function-statements, 2 kinds...
Wolfgang Bumiller [Sat, 5 May 2012 08:56:00 +0000 (10:56 +0200)]
More work on generating code - still not instantiating function-statements, 2 kinds of FIXME comments: relocation and creation of ir_values for ir_functions

11 years agoStarting ir_builder_generate - TYPE_FUNCTION still TODO
Wolfgang Bumiller [Fri, 4 May 2012 22:28:51 +0000 (00:28 +0200)]
Starting ir_builder_generate - TYPE_FUNCTION still TODO

11 years agocode_cachedstring
Wolfgang Bumiller [Fri, 4 May 2012 22:28:30 +0000 (00:28 +0200)]
code_cachedstring

11 years agoConvenience function to store a predefined string in the qc string area
Wolfgang Bumiller [Fri, 4 May 2012 22:14:10 +0000 (00:14 +0200)]
Convenience function to store a predefined string in the qc string area

11 years agoPreparing to generate code from the IR - code_write should return a bool, and take...
Wolfgang Bumiller [Fri, 4 May 2012 22:03:18 +0000 (00:03 +0200)]
Preparing to generate code from the IR - code_write should return a bool, and take a filename rather than use program.dat hardcoded

11 years agoreadme s/\t/ /g
Dale Weiler [Sun, 6 May 2012 21:00:16 +0000 (17:00 -0400)]
readme s/\t/   /g

11 years agoUpdated readme
Dale Weiler [Sun, 6 May 2012 20:58:30 +0000 (16:58 -0400)]
Updated readme

11 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Sat, 5 May 2012 02:01:26 +0000 (22:01 -0400)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

11 years agoutil_strncmpexact
Dale Weiler [Sat, 5 May 2012 02:01:02 +0000 (22:01 -0400)]
util_strncmpexact

11 years agoremoving ast-test macro concept
Wolfgang (Blub) Bumiller [Fri, 4 May 2012 11:04:06 +0000 (13:04 +0200)]
removing ast-test macro concept

11 years agoA new ast-test, now using some macros to make them easier to write...
Wolfgang (Blub) Bumiller [Fri, 4 May 2012 10:28:35 +0000 (12:28 +0200)]
A new ast-test, now using some macros to make them easier to write...

11 years agoFixed some dangling '}', it compiles again now
Wolfgang (Blub) Bumiller [Fri, 4 May 2012 10:26:24 +0000 (12:26 +0200)]
Fixed some dangling '}', it compiles again now

11 years agoWhat was I thinking... fixing loop's jump creation so it doesn't try creating multipl...
Wolfgang (Blub) Bumiller [Fri, 4 May 2012 10:24:44 +0000 (12:24 +0200)]
What was I thinking... fixing loop's jump creation so it doesn't try creating multiple jumps... this code is also much more readable

11 years agoast_loop must end by entering the outgoing block
Wolfgang (Blub) Bumiller [Fri, 4 May 2012 10:01:53 +0000 (12:01 +0200)]
ast_loop must end by entering the outgoing block

11 years agoChanging life-range calculation to include the last read because then it doesn't...
Wolfgang (Blub) Bumiller [Fri, 4 May 2012 08:20:04 +0000 (10:20 +0200)]
Changing life-range calculation to include the last read because then it doesn't need another vector to keep elements in. In order for this to make sense, the life-range overlap test now returns false if the end of one range _equals_ the beginning of the other, since that's not truly overlapping anymore

11 years agoMove the output block of a loop to after the loop, otherwise IR dumps looks just...
Wolfgang (Blub) Bumiller [Fri, 4 May 2012 08:01:38 +0000 (10:01 +0200)]
Move the output block of a loop to after the loop, otherwise IR dumps looks just messy... note that this is merely a cosmetic change

11 years agoMore assembly parsing (function call stuff)
Dale Weiler [Thu, 3 May 2012 23:45:59 +0000 (19:45 -0400)]
More assembly parsing (function call stuff)

11 years agoast_function gets 'breakblock' and 'continueblock' for break and continue support...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 22:16:51 +0000 (00:16 +0200)]
ast_function gets 'breakblock' and 'continueblock' for break and continue support; fixed some typos; added huge ast_loop_codegen implementation... need to go through it and check

11 years agoMore assembler code (less allocations too)
Dale Weiler [Thu, 3 May 2012 20:54:34 +0000 (16:54 -0400)]
More assembler code (less allocations too)

11 years agoSame for ternary: reordered a bit, and fixing ontrue->onfalse at the jump back to...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 20:07:58 +0000 (22:07 +0200)]
Same for ternary: reordered a bit, and fixing ontrue->onfalse at the jump back to the merge block

11 years agoreorder ifthen codegen and fix a jump generation where I used ontrue instead of onfalse
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 20:05:20 +0000 (22:05 +0200)]
reorder ifthen codegen and fix a jump generation where I used ontrue instead of onfalse

11 years agoast_loop - codegen dummied
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 19:57:13 +0000 (21:57 +0200)]
ast_loop - codegen dummied

11 years agoIf-protect on_true and on_false in ast_ifthen since they can be NULL (contrary to...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 19:56:05 +0000 (21:56 +0200)]
If-protect on_true and on_false in ast_ifthen since they can be NULL (contrary to ast_ternary where they can't)

11 years agoRemoving TODO-comment since it's done
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 16:38:29 +0000 (18:38 +0200)]
Removing TODO-comment since it's done

11 years agoDump should print a warning if lifepasses don't match...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 12:17:00 +0000 (14:17 +0200)]
Dump should print a warning if lifepasses don't match...

11 years agoast_function_codegen: Add a return instruction if it is missing, or error if we're...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 12:15:02 +0000 (14:15 +0200)]
ast_function_codegen: Add a return instruction if it is missing, or error if we're not in a void-function

11 years agoast-test should also finalize functions directly
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 12:04:35 +0000 (14:04 +0200)]
ast-test should also finalize functions directly

11 years agonaive_phi now recognizes both store_local and store_value as non-global, create_store...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 12:01:56 +0000 (14:01 +0200)]
naive_phi now recognizes both store_local and store_value as non-global, create_store prints the operand names on an invalid store to a value of store-type store_value

11 years agoir-test.c to use assertions, abort alone creates an ugly output
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 12:00:38 +0000 (14:00 +0200)]
ir-test.c to use assertions, abort alone creates an ugly output

11 years agosprintf with length modifiers is annoying...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 11:45:24 +0000 (13:45 +0200)]
sprintf with length modifiers is annoying...

11 years agoast_test to build an IR
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 11:26:49 +0000 (13:26 +0200)]
ast_test to build an IR

11 years agoast_ternary_codegen - beware, it's almost a spaghetti... almost...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 11:02:29 +0000 (13:02 +0200)]
ast_ternary_codegen - beware, it's almost a spaghetti... almost...

11 years agoast_function_label now takes a labelname to prefix the id with
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 10:40:49 +0000 (12:40 +0200)]
ast_function_label now takes a labelname to prefix the id with

11 years agoast_ifthen_codegen
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 10:38:43 +0000 (12:38 +0200)]
ast_ifthen_codegen

11 years agoast_entfield_codegen
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 10:19:33 +0000 (12:19 +0200)]
ast_entfield_codegen

11 years agoType information moved to ast_expression from ast_value, every ast node should in...
Wolfgang (Blub) Bumiller [Thu, 3 May 2012 10:12:22 +0000 (12:12 +0200)]
Type information moved to ast_expression from ast_value, every ast node should in theory know its type - it is important for dereferencing pointers or entity fields, to figure out the output type. Eg. so that ast_entfield knows what kind of OP_LOAD it needs to use

11 years agoTrailing whitespace was imminent, pending editor configuration change to accomodate...
Dale Weiler [Wed, 2 May 2012 22:03:17 +0000 (18:03 -0400)]
Trailing whitespace was imminent, pending editor configuration change to accomodate insanity.

11 years agosupress attribute warnings
Dale Weiler [Wed, 2 May 2012 21:57:45 +0000 (17:57 -0400)]
supress attribute warnings

11 years agoMerge remote-tracking branch 'origin/ast-and-ir'
Dale Weiler [Wed, 2 May 2012 21:46:21 +0000 (17:46 -0400)]
Merge remote-tracking branch 'origin/ast-and-ir'

11 years agoast_binary_codegen, ast_function_label (no I don't like sprintf...)
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 21:11:39 +0000 (23:11 +0200)]
ast_binary_codegen, ast_function_label (no I don't like sprintf...)

11 years agoMerge branch 'master' into ast-and-ir
Dale Weiler [Wed, 2 May 2012 19:50:50 +0000 (15:50 -0400)]
Merge branch 'master' into ast-and-ir

11 years agoargsize parsing for assembler
Dale Weiler [Wed, 2 May 2012 19:48:00 +0000 (15:48 -0400)]
argsize parsing for assembler

11 years agoast_store_codegen and its l/rvalue handling
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 18:36:11 +0000 (20:36 +0200)]
ast_store_codegen and its l/rvalue handling

11 years agoA note to clarify the ast_block/ir_block difference
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 17:46:27 +0000 (19:46 +0200)]
A note to clarify the ast_block/ir_block difference

11 years agoast_block_codegen - as you can see, an ast_block doesn't actually care about ir_blocks
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 17:45:16 +0000 (19:45 +0200)]
ast_block_codegen - as you can see, an ast_block doesn't actually care about ir_blocks

11 years agocreate the ir_function in ast_function_codegen, keep the current ir_block stored...
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 17:25:25 +0000 (19:25 +0200)]
create the ir_function in ast_function_codegen, keep the current ir_block stored in ast_function so inner codegens can use it

11 years agogoing through function blocks in ast_function_codegen
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 17:21:25 +0000 (19:21 +0200)]
going through function blocks in ast_function_codegen

11 years agoast_local/global_codegen exposed through the header for now
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 16:36:11 +0000 (18:36 +0200)]
ast_local/global_codegen exposed through the header for now

11 years agoast_local_codegen - similar structure to global_codegen obviously...
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 16:34:24 +0000 (18:34 +0200)]
ast_local_codegen - similar structure to global_codegen obviously...

11 years agofor ast_value_codegen this should be enough, since the actual generation happens...
Wolfgang (Blub) Bumiller [Wed, 2 May 2012 16:25:59 +0000 (18:25 +0200)]
for ast_value_codegen this should be enough, since the actual generation happens in other functions