Commit graph

1300 commits

Author SHA1 Message Date
Wolfgang Bumiller
904196e9bb Store the codeaddr of function's ir_values upon generation... 2012-07-04 15:05:09 +02:00
Wolfgang Bumiller
88f2238699 Return that the call was actually generated successfully if it was... 2012-07-04 15:02:55 +02:00
Wolfgang Bumiller
001420a7ef Storing ir_v for functions 2012-07-04 15:00:30 +02:00
Wolfgang Bumiller
d259e75dc4 ast_call needs to set its func member 2012-07-04 14:41:39 +02:00
Wolfgang Bumiller
812084ad72 ast_call's param vector functions 2012-07-04 14:39:58 +02:00
Wolfgang Bumiller
6bbcd5a343 ast-macros: MKCONSTSTRING, added sHello hello world string 2012-07-04 14:20:54 +02:00
Wolfgang Bumiller
2c1f08a209 Enabling the print builtin nodes, soon to be used to test CALL generation 2012-07-04 13:31:10 +02:00
Wolfgang Bumiller
29091971d2 add AINSTR_END to the end of functions so the debug-printing knows when to end... 2012-07-04 13:29:26 +02:00
Wolfgang Bumiller
7245b675b2 Don't die on functions with no variables 2012-07-04 13:16:15 +02:00
Wolfgang Bumiller
ed24ea0cef creating and generating builtin functions, ast-macros for builtins, todo: params 2012-07-03 23:38:38 +02:00
Wolfgang Bumiller
e965ffb9df basic CALL translation: to be refined 2012-07-03 22:47:01 +02:00
Wolfgang Bumiller
e8cc27df5b type_store_instr[] to get an INSTR_STORE_x by type 2012-07-03 22:46:38 +02:00
Wolfgang (Blub) Bumiller
0ed9bdf5b8 Adopt dp's function-local backup strategy and add parameter-copying to EnterFunction 2012-06-29 16:04:24 +02:00
Wolfgang (Blub) Bumiller
97f34d9add fixed a typo in asm_instr[]: ES_FNC->EQ_FNC 2012-06-29 15:41:56 +02:00
Wolfgang (Blub) Bumiller
9e094ddeb5 create_call should use store_return as output type for now 2012-06-29 15:40:21 +02:00
Wolfgang (Blub) Bumiller
67b75055b2 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. 2012-06-29 14:37:12 +02:00
Wolfgang (Blub) Bumiller
856c9d16a5 generating an ir_value for an ir_function at creation now 2012-06-29 13:25:31 +02:00
Wolfgang (Blub) Bumiller
c1ea9cc409 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 2012-06-29 13:07:19 +02:00
Wolfgang (Blub) Bumiller
67fa4ce07b ir_builder_create_call to take return type from the ir_value 2012-06-29 12:55:35 +02:00
Wolfgang (Blub) Bumiller
5348708da4 Fix a possibly uninitialized variable 2012-06-28 17:27:02 +02:00
Wolfgang (Blub) Bumiller
9e7143d934 Fixing GMQCC_SUPPRESS_EMPTY_BODY typo 2012-06-28 17:23:01 +02:00
Wolfgang (Blub) Bumiller
01b3f5ef58 ast_call_codegen, ir_block_create_call plus call-related functions, ir_value->outtype TODO: fill outtype in ir_value 2012-06-28 17:21:26 +02:00
Wolfgang (Blub) Bumiller
7363e88cd7 Added a comment about an idea on how to translate calls better. Gotta check some papers for better solutions later 2012-06-28 16:20:31 +02:00
Wolfgang (Blub) Bumiller
e934e77cc5 ast_call node; codegen dummy 2012-06-28 16:15:51 +02:00
Wolfgang (Blub) Bumiller
2073834b9a ir_instr can now store a list of parameters, will be used for CALLs 2012-06-28 15:50:51 +02:00
Wolfgang (Blub) Bumiller
080e6e5dfb exec.h -> gmqcc.h 2012-06-27 22:31:56 +02:00
Wolfgang (Blub) Bumiller
9e148df23f tidying up, using the original typenames from code.c, renamed JUMPS_DEFAULT to VM_JUMPS_DEFAULT 2012-06-27 22:29:31 +02:00
Wolfgang (Blub) Bumiller
f1a2ac624f Moving prog_section and prog_header to gmqcc.h to not have it twice: previously was in code.c and exec.h 2012-06-27 22:04:58 +02:00
Wolfgang (Blub) Bumiller
178dcb13aa fixing Makefile for the qcvm_execprogram.h -> execloop.h commit 2012-06-27 22:04:02 +02:00
Wolfgang (Blub) Bumiller
f50c82f0ad Commenting the VMXF_ flags 2012-06-27 19:42:51 +02:00
Wolfgang (Blub) Bumiller
08e5403896 qcvm_execprogram.h -> execloop.h 2012-06-27 19:37:00 +02:00
Wolfgang (Blub) Bumiller
fe06c9dadc sizeof(int)->sizeof(qcint) - pointed out by graphitemaster 2012-06-27 17:21:25 +02:00
Wolfgang (Blub) Bumiller
a4167900c4 make clean : now deletes qcvm 2012-06-27 15:36:22 +02:00
Wolfgang (Blub) Bumiller
8ce0548ad5 A prototype for error handling 2012-06-27 15:34:26 +02:00
Wolfgang (Blub) Bumiller
e761f1f7b7 'make qcvm' now builds exec-standalone.o from exec.c with -DQCVM_EXECUTOR=1 2012-06-27 14:56:43 +02:00
Wolfgang (Blub) Bumiller
ae639c8ba5 more protos in exec.h 2012-06-27 14:54:19 +02:00
Wolfgang (Blub) Bumiller
3140f2122a Moving typedefs and defines from exec.c into an exec.h header 2012-06-27 14:53:20 +02:00
Wolfgang (Blub) Bumiller
2fd3ddcb1a moved mem_resize and mem_append vector function macros into gmqcc.h 2012-06-27 14:50:52 +02:00
Wolfgang (Blub) Bumiller
0dae2898e3 fix vector resize to not always resize and actually use the reallocated place... 2012-06-27 14:49:36 +02:00
Wolfgang (Blub) Bumiller
a6e7baf127 prog_enter/leavefunction made static 2012-06-27 13:23:27 +02:00
Wolfgang (Blub) Bumiller
1ce97d1acc Executor now executes and traces 2012-06-27 13:21:37 +02:00
Wolfgang (Blub) Bumiller
aa08a2da68 Searching for 'main' 2012-06-26 13:22:37 +02:00
Wolfgang (Blub) Bumiller
36e2a46e07 Listing functions 2012-06-26 13:21:09 +02:00
Wolfgang (Blub) Bumiller
62008635c5 local-stack, locak-stack-pointer, getting strings from an index, adding tempstrings 2012-06-26 13:10:10 +02:00
Wolfgang (Blub) Bumiller
e328446044 executor: loader 2012-06-25 23:58:47 +02:00
Wolfgang (Blub) Bumiller
5500785d16 Deleting the manually written ast-test which was '#if 0'-ed out 2012-06-25 19:35:18 +02:00
Wolfgang (Blub) Bumiller
60542f7df0 generation of COND and JUMP now works 2012-06-25 19:27:50 +02:00
Wolfgang (Blub) Bumiller
21b7005541 ir_function.allocated_locals now contains the number of locals a function requires, renamed code.slot to code.local, makes more sense 2012-06-25 17:43:10 +02:00
Wolfgang (Blub) Bumiller
d69fda7fa1 removing debug output 2012-06-25 17:37:50 +02:00
Wolfgang (Blub) Bumiller
214c063b3f value position allocation, fixing a possible endless loop in ir_values_overlap 2012-06-25 16:06:01 +02:00