Skip to content

Commit

Permalink
Implement a few tiles, for real this time
Browse files Browse the repository at this point in the history
  • Loading branch information
bdw committed Aug 7, 2015
1 parent 206b77e commit ca4db0d
Show file tree
Hide file tree
Showing 7 changed files with 381 additions and 132 deletions.
5 changes: 5 additions & 0 deletions src/jit/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ void MVM_jit_destroy_code(MVMThreadContext *tc, MVMJitCode *code) {
}


void MVM_jit_compile_tile(MVMThreadContext *tc, MVMJitCompiler *cl, MVMJitExprTree *tree, MVMint32 node) {
MVMJitExprNodeInfo *info[8];
MVMint32 nchild, first_child;
info[0] = &tree->info[node];

}

void MVM_jit_compile_expr_tree(MVMThreadContext *tc, MVMJitCompiler *compiler, MVMJitGraph *jg, MVMJitExprTree *tree) {
/* NYI */
Expand Down
3 changes: 2 additions & 1 deletion src/jit/compile.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
typedef void (*MVMJitTileRule)(MVMThreadContext *tc, MVMJitCompiler *compiler, MVMJitExprTree *tree, MVMint32 node);

typedef void (*MVMJitTileRule)(MVMThreadContext *tc, MVMJitCompiler *compiler, MVMJitExprTree *tree, MVMint32 node, MVMJitExprValue **values, MVMJitExprNode *args);
typedef void (*MVMJitFunc)(MVMThreadContext *tc, MVMCompUnit *cu, void * label);

struct MVMJitCode {
Expand Down
15 changes: 6 additions & 9 deletions src/jit/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ struct MVMJitExprValue {
MVMint8 r0;
MVMint8 r1;
MVMint8 c;
} mem_dscr;
} mem;
struct {
MVMint8 cls;
MVMint8 num;
} reg_desc;
} reg;
MVMint32 label;
MVMint64 const_value;
MVMint64 const_val;
} u;
MVMint32 defined;
MVMint16 stack_loc;
Expand All @@ -127,13 +127,10 @@ struct MVMJitExprNodeInfo {
/* VM Local value of this node */
MVMint16 local_addr;
/* Tiler result */
MVMJitTileRule tile_rule;
void *tile_rule;
MVMint32 tile_state;

/* (Dynamic) Label numbers used internally to the node (e.g. for
IF and WHEN) */
MVMint32 internal_labels[2];

/* internal label for IF/WHEN/ALL/ANY etc */
MVMint32 internal_label;
/* Use information - I'd like to change this into list of uses */
MVMint32 first_use;
MVMint32 last_use;
Expand Down
Loading

0 comments on commit ca4db0d

Please sign in to comment.