From a51ca44b053615572130087bb7343c1574df681c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 20 Dec 2012 19:08:50 +0900 Subject: [PATCH] Record MOVEP's destination pointer only when variable. If MOVEP's destination is variable, then the actual destination isn't (at this stage) knowable, so it can't be attached to the dagnode and thus must be a child. --- tools/qfcc/source/flow.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/tools/qfcc/source/flow.c b/tools/qfcc/source/flow.c index fc9ac11f0..093c9406b 100644 --- a/tools/qfcc/source/flow.c +++ b/tools/qfcc/source/flow.c @@ -798,18 +798,22 @@ flow_analyze_statement (statement_t *s, set_t *use, set_t *def, set_t *kill, flow_add_op_var (use, s->opb); if (!strcmp (s->opcode, "")) { flow_add_op_var (def, s->opc); - } else if (!strcmp (s->opcode, "") - && s->opc->op_type == op_value - && s->opc->o.value->type == ev_pointer - && s->opc->o.value->v.pointer.def) { - operand_t *op; - ex_pointer_t *ptr = &s->opc->o.value->v.pointer; - op = def_operand (ptr->def, ptr->type); - flow_add_op_var (def, op); - if (operands) - operands[0] = op; - else - free_operand (op); + } else if (!strcmp (s->opcode, "")) { + if (s->opc->op_type == op_value + && s->opc->o.value->type == ev_pointer + && s->opc->o.value->v.pointer.def) { + operand_t *op; + ex_pointer_t *ptr = &s->opc->o.value->v.pointer; + op = def_operand (ptr->def, ptr->type); + flow_add_op_var (def, op); + if (operands) + operands[0] = op; + else + free_operand (op); + } else { + if (operands) + operands[3] = s->opc; + } } else { if (s->opc) flow_add_op_var (use, s->opc); @@ -822,7 +826,7 @@ flow_analyze_statement (statement_t *s, set_t *use, set_t *def, set_t *kill, operands[0] = s->opc; operands[1] = s->opa; operands[2] = s->opb; - if (strcmp (s->opcode, "")) + if (strncmp (s->opcode, "opc; } break;