aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/etraxfs_eth.c2
-rw-r--r--target-cris/mmu.c4
-rw-r--r--target-cris/translate.c5
3 files changed, 3 insertions, 8 deletions
diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c
index dedd1077fc..187ece19ea 100644
--- a/hw/etraxfs_eth.c
+++ b/hw/etraxfs_eth.c
@@ -401,7 +401,7 @@ static void eth_update_ma(struct fs_eth *eth, int ma)
eth->macaddr[ma][i++] = eth->regs[reg] >> 16;
eth->macaddr[ma][i++] = eth->regs[reg] >> 24;
eth->macaddr[ma][i++] = eth->regs[reg + 1];
- eth->macaddr[ma][i++] = eth->regs[reg + 1] >> 8;
+ eth->macaddr[ma][i] = eth->regs[reg + 1] >> 8;
D(printf("set mac%d=%x.%x.%x.%x.%x.%x\n", ma,
eth->macaddr[ma][0], eth->macaddr[ma][1],
diff --git a/target-cris/mmu.c b/target-cris/mmu.c
index b6892bbbf2..2a5ded8953 100644
--- a/target-cris/mmu.c
+++ b/target-cris/mmu.c
@@ -327,7 +327,6 @@ int cris_mmu_translate(struct cris_mmu_result *res,
CPUState *env, uint32_t vaddr,
int rw, int mmu_idx)
{
- uint32_t phy = vaddr;
int seg;
int miss = 0;
int is_user = mmu_idx == MMU_USER_IDX;
@@ -351,8 +350,7 @@ int cris_mmu_translate(struct cris_mmu_result *res,
miss = 0;
base = cris_mmu_translate_seg(env, seg);
- phy = base | (0x0fffffff & vaddr);
- res->phy = phy;
+ res->phy = base | (0x0fffffff & vaddr);
res->prot = PAGE_BITS;
}
else
diff --git a/target-cris/translate.c b/target-cris/translate.c
index f8baa88c18..a7014face6 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -1292,13 +1292,12 @@ static void dec_prep_alu_r(DisasContext *dc, int rs, int rd,
static int dec_prep_move_m(DisasContext *dc, int s_ext, int memsize,
TCGv dst)
{
- unsigned int rs, rd;
+ unsigned int rs;
uint32_t imm;
int is_imm;
int insn_len = 2;
rs = dc->op1;
- rd = dc->op2;
is_imm = rs == 15 && dc->postinc;
/* Load [$rs] onto T1. */
@@ -1367,14 +1366,12 @@ static unsigned int dec_bccq(DisasContext *dc)
int32_t offset;
int sign;
uint32_t cond = dc->op2;
- int tmp;
offset = EXTRACT_FIELD (dc->ir, 1, 7);
sign = EXTRACT_FIELD(dc->ir, 0, 0);
offset *= 2;
offset |= sign << 8;
- tmp = offset;
offset = sign_extend(offset, 8);
LOG_DIS("b%s %x\n", cc_name(cond), dc->pc + offset);