]> git.xonotic.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
11 years agoWorking vector-field test
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:14:55 +0000 (22:14 +0200)]
Working vector-field test

11 years agoIR generation of vector-fields put the 'main' vector offset at the wrong position...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:14:45 +0000 (22:14 +0200)]
IR generation of vector-fields put the 'main' vector offset at the wrong position - fixed that

11 years agoast_member_new now fixed up for fields, ast_shallow_type added for creation of a...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:14:16 +0000 (22:14 +0200)]
ast_member_new now fixed up for fields, ast_shallow_type added for creation of a type-only ast_expression

11 years agosame +1 offset in LOAD_V as STOREP fixed
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:11:08 +0000 (22:11 +0200)]
same +1 offset in LOAD_V as STOREP fixed

11 years agotesting writing to multiple fields, including a vector field
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 19:18:46 +0000 (21:18 +0200)]
testing writing to multiple fields, including a vector field

11 years agoprint builtin now prints all the passed strings, not just the first
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 19:18:15 +0000 (21:18 +0200)]
print builtin now prints all the passed strings, not just the first

11 years agofixing address check INSTR_STOREP_V in execloop - it kept us from writing to a vector...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 19:17:49 +0000 (21:17 +0200)]
fixing address check INSTR_STOREP_V in execloop - it kept us from writing to a vector when it was the last declared entityfield

11 years agoir_block_create_store/p will now honor -fadjust-vector-fields by using STORE_V/STOREP...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:38:02 +0000 (19:38 +0200)]
ir_block_create_store/p will now honor -fadjust-vector-fields by using STORE_V/STOREP_V instead of _FLD on vector-fields

11 years ago-fadjust-vector-fields
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:35:08 +0000 (19:35 +0200)]
-fadjust-vector-fields

11 years agoalso generate _y and _z data for fieldpointers
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:34:58 +0000 (19:34 +0200)]
also generate _y and _z data for fieldpointers

11 years agoto support .vector's _y and _z we need to add the global-data pointing to _y and...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:08:23 +0000 (19:08 +0200)]
to support .vector's _y and _z we need to add the global-data pointing to _y and _z...

11 years agotestcase for print(ftos(pawn.mema)) slightly changed, now not using a temporary location
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 16:09:45 +0000 (18:09 +0200)]
testcase for print(ftos(pawn.mema)) slightly changed, now not using a temporary location

11 years agoSTOREP also has the destination in OPB rather than OPC
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 16:06:10 +0000 (18:06 +0200)]
STOREP also has the destination in OPB rather than OPC

11 years agoGenerating fields using ir_builder_create_field
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 16:05:56 +0000 (18:05 +0200)]
Generating fields using ir_builder_create_field

11 years agogenerate address of store_return values created with ir_value_out properly
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 15:53:41 +0000 (17:53 +0200)]
generate address of store_return values created with ir_value_out properly

11 years agoNeed to keep prog->entities up to date when spawning entities
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 15:35:55 +0000 (17:35 +0200)]
Need to keep prog->entities up to date when spawning entities

11 years agoexperimental support for spawn() in the executor
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 15:31:08 +0000 (17:31 +0200)]
experimental support for spawn() in the executor

11 years agouse the correct STORE instruction, make pawn a local
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 14:39:04 +0000 (16:39 +0200)]
use the correct STORE instruction, make pawn a local

11 years agoir_block_create_store_op checks whether or not the storetype is an SSA value - do...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 14:38:17 +0000 (16:38 +0200)]
ir_block_create_store_op checks whether or not the storetype is an SSA value - do not do that for storeP instructions

11 years agoast macros to use the return value of a call, trying to spawn an entity, setting...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 14:28:07 +0000 (16:28 +0200)]
ast macros to use the return value of a call, trying to spawn an entity, setting a member, and reading the member back, using print+ftos to print it then

11 years agoast macros to create a field, generating fields in ast-test
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 14:10:33 +0000 (16:10 +0200)]
ast macros to create a field, generating fields in ast-test

11 years ago-std=gmqcc should add a dot prefix to the globals for fields, the field itself doesn...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 14:08:38 +0000 (16:08 +0200)]
-std=gmqcc should add a dot prefix to the globals for fields, the field itself doesn't use the dot prefix for its name though

11 years agoremoving an unused variable
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 13:41:37 +0000 (15:41 +0200)]
removing an unused variable

11 years agoir_value_set_field
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 13:41:10 +0000 (15:41 +0200)]
ir_value_set_field

11 years agounnamed globals in the trace output use [@addr] now instead of [#addr] since # is...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 09:46:44 +0000 (11:46 +0200)]
unnamed globals in the trace output use [@addr] now instead of [#addr] since # is used as a prefix for all immediates, so now it's less confusing

11 years agodon't set globaladdr directly, use a setter, the setter will update the member values...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 09:45:26 +0000 (11:45 +0200)]
don't set globaladdr directly, use a setter, the setter will update the member values used for vector access too

11 years agonicer trace output, strings now get escaped
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 09:31:50 +0000 (11:31 +0200)]
nicer trace output, strings now get escaped

11 years agoExperimental ast_member to access vector members
Wolfgang (Blub) Bumiller [Wed, 8 Aug 2012 12:49:37 +0000 (14:49 +0200)]
Experimental ast_member to access vector members

11 years agofix the chack for -Wno- and -fno-, it needs to use NO_ instead of no-
Wolfgang (Blub) Bumiller [Wed, 8 Aug 2012 10:43:02 +0000 (12:43 +0200)]
fix the chack for -Wno- and -fno-, it needs to use NO_ instead of no-

11 years agoAdd WARN_ prefix to warnings enum
Wolfgang (Blub) Bumiller [Wed, 8 Aug 2012 10:25:19 +0000 (12:25 +0200)]
Add WARN_ prefix to warnings enum

11 years agoinclude opts_debug and opts_memchk in exec.c's standalone part for now to have it...
Wolfgang (Blub) Bumiller [Wed, 8 Aug 2012 10:07:37 +0000 (12:07 +0200)]
include opts_debug and opts_memchk in exec.c's standalone part for now to have it compile

11 years agomake it also compilable with -std=c99 by not redefining extra_semicolon_, by appendin...
Wolfgang (Blub) Bumiller [Mon, 30 Jul 2012 11:48:53 +0000 (13:48 +0200)]
make it also compilable with -std=c99 by not redefining extra_semicolon_, by appending N to it

11 years agoast nodes now store their type id, and can be checked via ast_istype
Wolfgang Bumiller [Sun, 29 Jul 2012 08:03:13 +0000 (10:03 +0200)]
ast nodes now store their type id, and can be checked via ast_istype

11 years agoir_block_create_fieldaddress to pass on fieldtype from its input field
Wolfgang Bumiller [Sat, 28 Jul 2012 19:59:34 +0000 (21:59 +0200)]
ir_block_create_fieldaddress to pass on fieldtype from its input field

11 years agotest/ast-test.c must define opts_ variables since we don't compile main.c into it
Wolfgang Bumiller [Sat, 28 Jul 2012 19:56:35 +0000 (21:56 +0200)]
test/ast-test.c must define opts_ variables since we don't compile main.c into it

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