Wolfgang (Blub) Bumiller
|
0f023bc219
|
sprintf with length modifiers is annoying...
|
2012-05-03 13:45:24 +02:00 |
|
Wolfgang (Blub) Bumiller
|
627ef279fd
|
ast_test to build an IR
|
2012-05-03 13:26:49 +02:00 |
|
Wolfgang (Blub) Bumiller
|
4c9c6ee5bd
|
ast_ternary_codegen - beware, it's almost a spaghetti... almost...
|
2012-05-03 13:02:29 +02:00 |
|
Wolfgang (Blub) Bumiller
|
91bf040f0a
|
ast_function_label now takes a labelname to prefix the id with
|
2012-05-03 12:40:49 +02:00 |
|
Wolfgang (Blub) Bumiller
|
54c92d5ae1
|
ast_ifthen_codegen
|
2012-05-03 12:38:43 +02:00 |
|
Wolfgang (Blub) Bumiller
|
2c329db9b9
|
ast_entfield_codegen
|
2012-05-03 12:19:33 +02:00 |
|
Wolfgang (Blub) Bumiller
|
da9a4fef29
|
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
|
2012-05-03 12:12:22 +02:00 |
|
Dale Weiler
|
c1a85378d5
|
Trailing whitespace was imminent, pending editor configuration change to accomodate insanity.
|
2012-05-02 18:03:17 -04:00 |
|
Dale Weiler
|
21e992aa3a
|
supress attribute warnings
|
2012-05-02 17:57:45 -04:00 |
|
Dale Weiler
|
1ae035c714
|
Merge remote-tracking branch 'origin/ast-and-ir'
|
2012-05-02 17:46:21 -04:00 |
|
Wolfgang (Blub) Bumiller
|
4317f40fa5
|
ast_binary_codegen, ast_function_label (no I don't like sprintf...)
|
2012-05-02 23:11:39 +02:00 |
|
Dale Weiler
|
5a1cc405af
|
Merge branch 'master' into ast-and-ir
|
2012-05-02 15:50:50 -04:00 |
|
Dale Weiler
|
fbe86450dc
|
argsize parsing for assembler
|
2012-05-02 15:48:00 -04:00 |
|
Wolfgang (Blub) Bumiller
|
75c60657ac
|
ast_store_codegen and its l/rvalue handling
|
2012-05-02 20:36:11 +02:00 |
|
Wolfgang (Blub) Bumiller
|
4fe806edc2
|
A note to clarify the ast_block/ir_block difference
|
2012-05-02 19:46:27 +02:00 |
|
Wolfgang (Blub) Bumiller
|
307eb2d9a2
|
ast_block_codegen - as you can see, an ast_block doesn't actually care about ir_blocks
|
2012-05-02 19:45:16 +02:00 |
|
Wolfgang (Blub) Bumiller
|
13082112b0
|
create the ir_function in ast_function_codegen, keep the current ir_block stored in ast_function so inner codegens can use it
|
2012-05-02 19:25:25 +02:00 |
|
Wolfgang (Blub) Bumiller
|
1e9d02da14
|
going through function blocks in ast_function_codegen
|
2012-05-02 19:21:25 +02:00 |
|
Wolfgang (Blub) Bumiller
|
314d45ff82
|
ast_local/global_codegen exposed through the header for now
|
2012-05-02 18:36:11 +02:00 |
|
Wolfgang (Blub) Bumiller
|
92a4431c86
|
ast_local_codegen - similar structure to global_codegen obviously...
|
2012-05-02 18:34:24 +02:00 |
|
Wolfgang (Blub) Bumiller
|
7a48377442
|
for ast_value_codegen this should be enough, since the actual generation happens in other functions
|
2012-05-02 18:25:59 +02:00 |
|
Dale Weiler
|
bc318bb68e
|
More function parsing for assembler
|
2012-05-02 11:48:46 -04:00 |
|
Dale Weiler
|
ca7ab3fd5f
|
assembly statement operand parsing. Now all we need is tables and state to generate some valid code.
|
2012-05-01 20:36:37 -04:00 |
|
Dale Weiler
|
eaaa1d15d8
|
test.qs update
|
2012-05-01 18:05:41 -04:00 |
|
Dale Weiler
|
629f6f1e63
|
Assembly statement parsing
|
2012-05-01 18:05:11 -04:00 |
|
Dale Weiler
|
d51718118a
|
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)
|
2012-05-01 16:42:11 -04:00 |
|
Wolfgang Bumiller
|
1e0a688bc5
|
ast_ternary - contrary to ast_ifthen neither ontrue nor onfalse can be NULL, and it does output a value
|
2012-05-01 17:02:45 +02:00 |
|
Wolfgang Bumiller
|
5fe87e6a20
|
if-then-else AST node - this one is not for ternary expressions
|
2012-05-01 16:55:02 +02:00 |
|
Wolfgang Bumiller
|
bb7c59c648
|
Remove 2 unused variables in create_binop - unused since create_general_instruction
|
2012-05-01 16:45:15 +02:00 |
|
Wolfgang Bumiller
|
22cf7e0a4d
|
Fix missing 'int op;' in load_from_end, accidently removed it together with the other vars whil making it use general_instruction
|
2012-05-01 16:44:36 +02:00 |
|
Wolfgang Bumiller
|
8ab51544be
|
Comment about the form of instruction general_instr is used for
|
2012-05-01 16:29:29 +02:00 |
|
Wolfgang Bumiller
|
cde5444f24
|
create_phi -> store_value, not store_local... phi output cannot be overwritten
|
2012-05-01 16:27:36 +02:00 |
|
Wolfgang Bumiller
|
0337320054
|
Reuse general_instr to shorten create_binop
|
2012-05-01 16:26:25 +02:00 |
|
Wolfgang Bumiller
|
3c07ed15c0
|
expose create_general_instr in ir.h for now...
|
2012-05-01 16:24:16 +02:00 |
|
Wolfgang Bumiller
|
282edea8de
|
Get rid of duplicate code by adding an ir_block_create_general_instr
|
2012-05-01 16:23:45 +02:00 |
|
Wolfgang Bumiller
|
6ae8a69ab0
|
ir_block_create_fieldaddress - and fixing operand-numbering in load_from_ent
|
2012-05-01 16:20:44 +02:00 |
|
Wolfgang Bumiller
|
4fbcc57d49
|
Commenting on future lvalue use in ast_store
|
2012-05-01 15:15:19 +02:00 |
|
Wolfgang Bumiller
|
3a94e962ae
|
codegen gets an lvalue flag now
|
2012-05-01 15:14:44 +02:00 |
|
Wolfgang Bumiller
|
4c165cbd07
|
ast_instantiate should check return value of mem_a and return NULL on error
|
2012-05-01 15:09:17 +02:00 |
|
Wolfgang Bumiller
|
281bd8657a
|
ast_entfield node
|
2012-05-01 15:08:54 +02:00 |
|
Wolfgang Bumiller
|
eb21f1e733
|
alignment fix
|
2012-05-01 12:43:10 +02:00 |
|
Wolfgang Bumiller
|
45651cea8d
|
Implementation of liferange overlap test
|
2012-05-01 12:40:37 +02:00 |
|
Wolfgang Bumiller
|
ddbd460331
|
Check for TYPE_FIELD in load_from_ent
|
2012-05-01 12:14:07 +02:00 |
|
Wolfgang Bumiller
|
18969b1713
|
style fix
|
2012-05-01 12:13:04 +02:00 |
|
Wolfgang Bumiller
|
4c38566877
|
ir_block_create_load_from_ent - long name, I know, but we need to be able to load from pointers too at some point...
|
2012-05-01 12:12:53 +02:00 |
|
Wolfgang Bumiller
|
5f0800bef6
|
support TYPE_FIELD in stores; storeP to do a different kind of type checking
|
2012-05-01 12:05:47 +02:00 |
|
Wolfgang Bumiller
|
340daeabc4
|
ir_block_create_storep for storing through pointers, the IR does not implicitly create conversions for now when using pointers, but it could
|
2012-05-01 11:58:52 +02:00 |
|
Dale Weiler
|
95152c1f5c
|
VECTOR_PROT
|
2012-04-29 19:08:20 -04:00 |
|
Dale Weiler
|
f19cbe1400
|
Parse vector constants and add them to the constants table now for the assembler.
|
2012-04-29 19:03:06 -04:00 |
|
Dale Weiler
|
8156374a71
|
Invoke tests
|
2012-04-29 17:28:01 -04:00 |
|