[svn:parrot] r44639 - branches/pcc_hackathon_6Mar10/compilers/imcc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Fri Mar 5 07:09:13 UTC 2010
Author: chromatic
Date: Fri Mar 5 07:09:12 2010
New Revision: 44639
URL: https://trac.parrot.org/parrot/changeset/44639
Log:
[IMCC] Modified the opcode introspection for detecting instructions which write
to registers to reflect the new order of get_results *after* invoke.
Modified:
branches/pcc_hackathon_6Mar10/compilers/imcc/instructions.c
Modified: branches/pcc_hackathon_6Mar10/compilers/imcc/instructions.c
==============================================================================
--- branches/pcc_hackathon_6Mar10/compilers/imcc/instructions.c Fri Mar 5 07:05:48 2010 (r44638)
+++ branches/pcc_hackathon_6Mar10/compilers/imcc/instructions.c Fri Mar 5 07:09:12 2010 (r44639)
@@ -1,6 +1,6 @@
/*
* $Id$
- * Copyright (C) 2002-2009, Parrot Foundation.
+ * Copyright (C) 2002-2010, Parrot Foundation.
*/
#include <stdlib.h>
@@ -277,11 +277,7 @@
const int f = ins->flags;
int i;
- /*
- * a get_results opcode is before the actual sub call
- * but for the register allocator, the effect matters, thus
- * postpone the effect after the invoke
- */
+ /* a get_results opcode occurs after the actual sub call */
if (ins->opnum == PARROT_OP_get_results_pc) {
int i;
@@ -289,7 +285,7 @@
* an ExceptionHandler, which doesn't have
* a call next
*/
- if (ins->next && (ins->next->type & ITPCCSUB))
+ if (ins->prev && (ins->prev->type & ITPCCSUB))
return 0;
for (i = ins->symreg_count - 1; i >= 0; --i) {
@@ -308,7 +304,7 @@
* structure
*/
while (ins && ins->opnum != PARROT_OP_get_results_pc)
- ins = ins->prev;
+ ins = ins->next;
if (!ins)
return 0;
@@ -344,6 +340,7 @@
return 0;
}
+
/*
=item C<int get_branch_regno(const Instruction *ins)>
More information about the parrot-commits
mailing list