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

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

12 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'

12 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...)

12 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

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

12 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

12 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

12 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

12 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

12 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

12 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

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

12 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

12 years agoMore function parsing for assembler
Dale Weiler [Wed, 2 May 2012 15:48:46 +0000 (11:48 -0400)]
More function parsing for assembler

12 years agoassembly statement operand parsing. Now all we need is tables and state to generate...
Dale Weiler [Wed, 2 May 2012 00:36:37 +0000 (20:36 -0400)]
assembly statement operand parsing.  Now all we need is tables and state to generate some valid code.

12 years agotest.qs update
Dale Weiler [Tue, 1 May 2012 22:05:41 +0000 (18:05 -0400)]
test.qs update

12 years agoAssembly statement parsing
Dale Weiler [Tue, 1 May 2012 22:05:11 +0000 (18:05 -0400)]
Assembly statement parsing

12 years agoFunction parsing for the assembler now works, and adds the function to the function...
Dale Weiler [Tue, 1 May 2012 20:42:11 +0000 (16:42 -0400)]
Function parsing for the assembler now works, and adds the function to the function table for the code writer, quake and darkplaces can see it as well (since a def is also created)

12 years agoast_ternary - contrary to ast_ifthen neither ontrue nor onfalse can be NULL, and...
Wolfgang Bumiller [Tue, 1 May 2012 15:02:45 +0000 (17:02 +0200)]
ast_ternary - contrary to ast_ifthen neither ontrue nor onfalse can be NULL, and it does output a value

12 years agoif-then-else AST node - this one is not for ternary expressions
Wolfgang Bumiller [Tue, 1 May 2012 14:55:02 +0000 (16:55 +0200)]
if-then-else AST node - this one is not for ternary expressions

12 years agoRemove 2 unused variables in create_binop - unused since create_general_instruction
Wolfgang Bumiller [Tue, 1 May 2012 14:45:15 +0000 (16:45 +0200)]
Remove 2 unused variables in create_binop - unused since create_general_instruction

12 years agoFix missing 'int op;' in load_from_end, accidently removed it together with the other...
Wolfgang Bumiller [Tue, 1 May 2012 14:44:36 +0000 (16:44 +0200)]
Fix missing 'int op;' in load_from_end, accidently removed it together with the other vars whil making it use general_instruction

12 years agoComment about the form of instruction general_instr is used for
Wolfgang Bumiller [Tue, 1 May 2012 14:29:29 +0000 (16:29 +0200)]
Comment about the form of instruction general_instr is used for

12 years agocreate_phi -> store_value, not store_local... phi output cannot be overwritten
Wolfgang Bumiller [Tue, 1 May 2012 14:27:36 +0000 (16:27 +0200)]
create_phi -> store_value, not store_local... phi output cannot be overwritten

12 years agoReuse general_instr to shorten create_binop
Wolfgang Bumiller [Tue, 1 May 2012 14:26:25 +0000 (16:26 +0200)]
Reuse general_instr to shorten create_binop

12 years agoexpose create_general_instr in ir.h for now...
Wolfgang Bumiller [Tue, 1 May 2012 14:24:16 +0000 (16:24 +0200)]
expose create_general_instr in ir.h for now...

12 years agoGet rid of duplicate code by adding an ir_block_create_general_instr
Wolfgang Bumiller [Tue, 1 May 2012 14:23:45 +0000 (16:23 +0200)]
Get rid of duplicate code by adding an ir_block_create_general_instr

12 years agoir_block_create_fieldaddress - and fixing operand-numbering in load_from_ent
Wolfgang Bumiller [Tue, 1 May 2012 14:20:44 +0000 (16:20 +0200)]
ir_block_create_fieldaddress - and fixing operand-numbering in load_from_ent

12 years agoCommenting on future lvalue use in ast_store
Wolfgang Bumiller [Tue, 1 May 2012 13:15:19 +0000 (15:15 +0200)]
Commenting on future lvalue use in ast_store

12 years agocodegen gets an lvalue flag now
Wolfgang Bumiller [Tue, 1 May 2012 13:14:44 +0000 (15:14 +0200)]
codegen gets an lvalue flag now

12 years agoast_instantiate should check return value of mem_a and return NULL on error
Wolfgang Bumiller [Tue, 1 May 2012 13:09:17 +0000 (15:09 +0200)]
ast_instantiate should check return value of mem_a and return NULL on error

12 years agoast_entfield node
Wolfgang Bumiller [Tue, 1 May 2012 13:08:54 +0000 (15:08 +0200)]
ast_entfield node

12 years agoalignment fix
Wolfgang Bumiller [Tue, 1 May 2012 10:43:10 +0000 (12:43 +0200)]
alignment fix

12 years agoImplementation of liferange overlap test
Wolfgang Bumiller [Tue, 1 May 2012 10:40:37 +0000 (12:40 +0200)]
Implementation of liferange overlap test

12 years agoCheck for TYPE_FIELD in load_from_ent
Wolfgang Bumiller [Tue, 1 May 2012 10:14:07 +0000 (12:14 +0200)]
Check for TYPE_FIELD in load_from_ent

12 years agostyle fix
Wolfgang Bumiller [Tue, 1 May 2012 10:13:04 +0000 (12:13 +0200)]
style fix

12 years agoir_block_create_load_from_ent - long name, I know, but we need to be able to load...
Wolfgang Bumiller [Tue, 1 May 2012 10:12:53 +0000 (12:12 +0200)]
ir_block_create_load_from_ent - long name, I know, but we need to be able to load from pointers too at some point...

12 years agosupport TYPE_FIELD in stores; storeP to do a different kind of type checking
Wolfgang Bumiller [Tue, 1 May 2012 10:05:47 +0000 (12:05 +0200)]
support TYPE_FIELD in stores; storeP to do a different kind of type checking

12 years agoir_block_create_storep for storing through pointers, the IR does not implicitly creat...
Wolfgang Bumiller [Tue, 1 May 2012 09:58:52 +0000 (11:58 +0200)]
ir_block_create_storep for storing through pointers, the IR does not implicitly create conversions for now when using pointers, but it could

12 years agoVECTOR_PROT
Dale Weiler [Sun, 29 Apr 2012 23:08:20 +0000 (19:08 -0400)]
VECTOR_PROT

12 years agoParse vector constants and add them to the constants table now for the assembler.
Dale Weiler [Sun, 29 Apr 2012 23:03:06 +0000 (19:03 -0400)]
Parse vector constants and add them to the constants table now for the assembler.

12 years agoInvoke tests
Dale Weiler [Sun, 29 Apr 2012 21:28:01 +0000 (17:28 -0400)]
Invoke tests

12 years agoadded test_ast, test_ir, and test, as well as default, and all to the Makefile target...
Dale Weiler [Sun, 29 Apr 2012 20:54:05 +0000 (16:54 -0400)]
added test_ast, test_ir, and test, as well as default, and all to the Makefile target list. Also made all tests C90 conformant code.

12 years agoMerge branch 'master' into ast-and-ir
Dale Weiler [Sun, 29 Apr 2012 20:39:43 +0000 (16:39 -0400)]
Merge branch 'master' into ast-and-ir

12 years agoRemove Makefile_win (useless)
Dale Weiler [Sun, 29 Apr 2012 20:38:38 +0000 (16:38 -0400)]
Remove Makefile_win (useless)

12 years agoparams should be deleted, not unref()d
Wolfgang Bumiller [Sun, 29 Apr 2012 17:45:14 +0000 (19:45 +0200)]
params should be deleted, not unref()d

12 years ago64bit signed/unsigned integer support from the compiler if LONG_MAX != 0x7FFFFFFF
Dale Weiler [Sun, 29 Apr 2012 16:09:30 +0000 (12:09 -0400)]
64bit signed/unsigned integer support from the compiler if LONG_MAX != 0x7FFFFFFF

12 years agoRemove trailing whitespace
Dale Weiler [Sat, 28 Apr 2012 23:03:16 +0000 (19:03 -0400)]
Remove trailing whitespace

12 years agoAfter moving ast_instantiate up, the checks which return NULL now must mem_d(self)
Wolfgang Bumiller [Sat, 28 Apr 2012 22:41:35 +0000 (00:41 +0200)]
After moving ast_instantiate up, the checks which return NULL now must mem_d(self)

12 years agoFix macro spacing
Dale Weiler [Sat, 28 Apr 2012 22:56:44 +0000 (18:56 -0400)]
Fix macro spacing

12 years agoAll code is now C89/C90 compat
Dale Weiler [Sat, 28 Apr 2012 22:56:09 +0000 (18:56 -0400)]
All code is now C89/C90 compat

12 years agoMerge branch 'master' into ast-and-ir
Dale Weiler [Sat, 28 Apr 2012 20:45:02 +0000 (16:45 -0400)]
Merge branch 'master' into ast-and-ir

12 years agoRemove trailing whitespace from everything
Dale Weiler [Sat, 28 Apr 2012 20:43:39 +0000 (16:43 -0400)]
Remove trailing whitespace from everything

12 years agogitattributes for whitespace
Dale Weiler [Sat, 28 Apr 2012 20:40:03 +0000 (16:40 -0400)]
gitattributes for whitespace

12 years agolex.c -> lex_init s/lex->line = 0/lex->line = 1/
Dale Weiler [Sat, 28 Apr 2012 20:31:30 +0000 (16:31 -0400)]
lex.c -> lex_init s/lex->line = 0/lex->line = 1/

12 years agoThis should fix line counting issues with the lexer
Dale Weiler [Sat, 28 Apr 2012 20:30:44 +0000 (16:30 -0400)]
This should fix line counting issues with the lexer

12 years agoLexer fixes
Dale Weiler [Sat, 28 Apr 2012 20:25:43 +0000 (16:25 -0400)]
Lexer fixes

12 years agoast and ir testers - to use: compile into gmqcc and execut the functions in main()
Wolfgang Bumiller [Sat, 28 Apr 2012 19:42:12 +0000 (21:42 +0200)]
ast and ir testers - to use: compile into gmqcc and execut the functions in main()

12 years agoparam_argument cleanup
Dale Weiler [Sat, 28 Apr 2012 19:36:39 +0000 (15:36 -0400)]
param_argument cleanup

12 years agoparam_argument cleanup
Dale Weiler [Sat, 28 Apr 2012 19:20:13 +0000 (15:20 -0400)]
param_argument cleanup

12 years agoDo not force -[aci] parameters' arguments to be in the same argv; (Allow 'gmqcc ...
Wolfgang Bumiller [Sat, 28 Apr 2012 12:32:52 +0000 (14:32 +0200)]
Do not force -[aci] parameters' arguments to be in the same argv; (Allow 'gmqcc -c foo' to act like 'gmqcc -cfoo'

12 years agoast_function gets a handle to its ir_function, ast_global_codegen to generate an...
Wolfgang Bumiller [Sat, 28 Apr 2012 16:54:27 +0000 (18:54 +0200)]
ast_function gets a handle to its ir_function, ast_global_codegen to generate an ir global, or an ir_function

12 years agoFirst delete the blocks, THEN the locals, since blocks USE locals, darn
Wolfgang Bumiller [Sat, 28 Apr 2012 15:29:43 +0000 (17:29 +0200)]
First delete the blocks, THEN the locals, since blocks USE locals, darn

12 years agoast_binary takes 2 expressions, not 2 values, ast_store takes a value and and express...
Wolfgang Bumiller [Sat, 28 Apr 2012 15:27:06 +0000 (17:27 +0200)]
ast_binary takes 2 expressions, not 2 values, ast_store takes a value and and expression for now until we support pointers, also: dropped the 'keep' param from ast_value_new, values are always to be stored somewhere to be deleted independently from their uses

12 years agoast_value and ast_function are linked together when using ast_function_new, note...
Wolfgang Bumiller [Sat, 28 Apr 2012 13:57:19 +0000 (15:57 +0200)]
ast_value and ast_function are linked together when using ast_function_new, note however, that neither will delete the other in their _delete functions.

12 years agosurpress empty bodies
Dale Weiler [Sat, 28 Apr 2012 19:13:41 +0000 (15:13 -0400)]
surpress empty bodies

12 years agovector parsing for assembly
Dale Weiler [Sat, 28 Apr 2012 11:27:03 +0000 (07:27 -0400)]
vector parsing for assembly

12 years agoGet rid of ast_setfunc
Wolfgang Bumiller [Sat, 28 Apr 2012 10:51:44 +0000 (12:51 +0200)]
Get rid of ast_setfunc

12 years agoCut at comma
Dale Weiler [Sat, 28 Apr 2012 10:35:42 +0000 (06:35 -0400)]
Cut at comma

12 years agoMerge remote-tracking branch 'origin/ast-and-ir' into ast-and-ir
Dale Weiler [Sat, 28 Apr 2012 10:32:32 +0000 (06:32 -0400)]
Merge remote-tracking branch 'origin/ast-and-ir' into ast-and-ir

12 years agoFixed all invalid mmeory accesses
Dale Weiler [Sat, 28 Apr 2012 10:31:16 +0000 (06:31 -0400)]
Fixed all invalid mmeory accesses

12 years agoalmost ISO C now, fixed all the MEM_VECTOR trailing semicolon issues.
Dale Weiler [Sat, 28 Apr 2012 09:54:24 +0000 (05:54 -0400)]
almost ISO C now, fixed all the MEM_VECTOR trailing semicolon issues.

12 years agoAdding debug dump functions
Wolfgang Bumiller [Sat, 28 Apr 2012 09:50:01 +0000 (11:50 +0200)]
Adding debug dump functions

12 years agoFixed: block-labels were NULLed after being set -_-
Wolfgang Bumiller [Sat, 28 Apr 2012 09:49:52 +0000 (11:49 +0200)]
Fixed: block-labels were NULLed after being set -_-

12 years ago2 missind free->mem_d in MEM_VECTOR macros
Wolfgang Bumiller [Sat, 28 Apr 2012 09:30:52 +0000 (11:30 +0200)]
2 missind free->mem_d in MEM_VECTOR macros

12 years agolex_ctx_t -> lex_ctx, vector_t -> vector
Wolfgang Bumiller [Sat, 28 Apr 2012 09:13:16 +0000 (11:13 +0200)]
lex_ctx_t -> lex_ctx, vector_t -> vector

12 years agoInterface change
Dale Weiler [Sat, 28 Apr 2012 09:35:32 +0000 (05:35 -0400)]
Interface change

12 years agostruct lex_file -> lex_file
Dale Weiler [Sat, 28 Apr 2012 09:25:19 +0000 (05:25 -0400)]
struct lex_file -> lex_file

12 years agoastir.h -> gmqcc.h
Dale Weiler [Sat, 28 Apr 2012 09:08:03 +0000 (05:08 -0400)]
astir.h -> gmqcc.h

12 years agoMerge branch 'blub/ast-and-ir-merging' of github.com:graphitemaster/gmqcc into ast...
Dale Weiler [Sat, 28 Apr 2012 09:03:31 +0000 (05:03 -0400)]
Merge branch 'blub/ast-and-ir-merging' of github.com:graphitemaster/gmqcc into ast-and-ir

12 years agowindows makefile update
Dale Weiler [Sat, 28 Apr 2012 09:01:19 +0000 (05:01 -0400)]
windows makefile update

12 years agoRemoved the qc_type enum and replaced all qc_* by TYPE_*
Wolfgang Bumiller [Sat, 28 Apr 2012 08:42:03 +0000 (10:42 +0200)]
Removed the qc_type enum and replaced all qc_* by TYPE_*

12 years agoAdd shouldn't clear on failure either, it would be rather ugly to handle
Wolfgang Bumiller [Sat, 28 Apr 2012 08:32:10 +0000 (10:32 +0200)]
Add shouldn't clear on failure either, it would be rather ugly to handle

12 years agoHeader guards and macros get {} in oneline ifs and loops
Wolfgang Bumiller [Sat, 28 Apr 2012 08:17:32 +0000 (10:17 +0200)]
Header guards and macros get {} in oneline ifs and loops

12 years agoMerge branch 'assembler' into ast-and-ir
Dale Weiler [Sat, 28 Apr 2012 08:12:24 +0000 (04:12 -0400)]
Merge branch 'assembler' into ast-and-ir

12 years agotype parsing for constants, globals and locals. Sanatize constants to select interna...
Dale Weiler [Sat, 28 Apr 2012 07:53:23 +0000 (03:53 -0400)]
type parsing for constants, globals and locals.  Sanatize constants to select internal functions to prevent possible runtime issues that could be a result of atoi working for what we consider invalid strings containing constants.

12 years agoBetter codegen
Dale Weiler [Sat, 28 Apr 2012 07:37:14 +0000 (03:37 -0400)]
Better codegen

12 years agoassembler can parse internal functions. Wrote all internal functions (that are not...
Dale Weiler [Sat, 28 Apr 2012 07:26:40 +0000 (03:26 -0400)]
assembler can parse internal functions. Wrote all internal functions (that are not extensions) to test.qs

12 years agoMore assembly work
Dale Weiler [Sat, 28 Apr 2012 06:34:39 +0000 (02:34 -0400)]
More assembly work

12 years agoMore assembler code
Dale Weiler [Fri, 27 Apr 2012 20:45:34 +0000 (16:45 -0400)]
More assembler code

12 years agoWorking on the assembler
Dale Weiler [Fri, 27 Apr 2012 20:31:38 +0000 (16:31 -0400)]
Working on the assembler

12 years ago2 missing return values
Wolfgang Bumiller [Fri, 27 Apr 2012 16:00:57 +0000 (18:00 +0200)]
2 missing return values

12 years agoa vector_remove shouldn't clear the vector when failing to reallocate as a smaller...
Wolfgang (Blub) Bumiller [Fri, 27 Apr 2012 11:53:49 +0000 (13:53 +0200)]
a vector_remove shouldn't clear the vector when failing to reallocate as a smaller chunk, just return false. The value is still removed from the vector, so no unstable state is generated by this, which makes a _remove safe to ignore where it makes sense.

12 years agoast_value_set_name to return bool
Wolfgang (Blub) Bumiller [Fri, 27 Apr 2012 11:32:52 +0000 (13:32 +0200)]
ast_value_set_name to return bool

12 years agoUsing GMQCC_WARN some more where it makes sense
Wolfgang (Blub) Bumiller [Fri, 27 Apr 2012 11:31:40 +0000 (13:31 +0200)]
Using GMQCC_WARN some more where it makes sense

12 years agoTurned nearly every void-returning function into a bool-returning function, and check...
Wolfgang (Blub) Bumiller [Fri, 27 Apr 2012 11:28:39 +0000 (13:28 +0200)]
Turned nearly every void-returning function into a bool-returning function, and checking return values wherever necessary to be able to properly exit on failures

12 years agoUse GMQCC_WARN on generated vector functions
Wolfgang (Blub) Bumiller [Fri, 27 Apr 2012 10:38:53 +0000 (12:38 +0200)]
Use GMQCC_WARN on generated vector functions

12 years agoGMQCC_WARN macro
Wolfgang (Blub) Bumiller [Fri, 27 Apr 2012 10:35:59 +0000 (12:35 +0200)]
GMQCC_WARN macro

12 years agoGet rid of realloc
Wolfgang (Blub) Bumiller [Fri, 27 Apr 2012 09:41:12 +0000 (11:41 +0200)]
Get rid of realloc