From 24abdc9d313db1d320cb8c768c968098a4dda2c4 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 11 May 1998 16:15:22 +0000 Subject: [PATCH] * Fixing typo that caused infinite loop upon PKE MPG. --- sim/mips/sky-pke.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sim/mips/sky-pke.c b/sim/mips/sky-pke.c index 8cf60ddbb8c..3e1815cedee 100644 --- a/sim/mips/sky-pke.c +++ b/sim/mips/sky-pke.c @@ -1686,6 +1686,7 @@ pke_code_mpg(struct pke_device* me, unsigned_4 pkecode) unsigned_4 source_addr; struct fifo_quadword* fq; int next_num; + int j; /* decrement NUM */ next_num = PKE_REG_MASK_GET(me, NUM, NUM) - 1; @@ -1715,9 +1716,9 @@ pke_code_mpg(struct pke_device* me, unsigned_4 pkecode) source_addr = fq->source_address; /* add word offset */ - for(i=0; i<3; i++) - if(operand == & fq->data[i]) - source_addr += sizeof(unsigned_4) * i; + for(j=0; j<3; j++) + if(operand == & fq->data[j]) + source_addr += sizeof(unsigned_4) * j; fq = pke_pcrel_fifo(me, i*2 + 2, & operand); vu_upper_opcode = *operand; -- 2.30.2