X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Farm%2Farmemu.c;h=83853f1599cc2c927749ac34908c040b81f21653;hb=6d358e869b1efe22fa6697a8aa4191ddacbacef0;hp=bf0cb3b4f6bfff22046626795afe590e65696cae;hpb=dfcd3bfb6f8a213007c20e60060b4e9ec9205205;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c index bf0cb3b4f6..83853f1599 100644 --- a/sim/arm/armemu.c +++ b/sim/arm/armemu.c @@ -279,11 +279,11 @@ ARMul_Emulate26 (register ARMul_State * state) { #endif register ARMword instr, /* the current instruction */ - dest, /* almost the DestBus */ + dest = 0, /* almost the DestBus */ temp, /* ubiquitous third hand */ - pc; /* the address of the current instruction */ + pc = 0; /* the address of the current instruction */ ARMword lhs, rhs; /* almost the ABus and BBus */ - ARMword decoded, loaded; /* instruction pipeline */ + ARMword decoded = 0, loaded = 0; /* instruction pipeline */ /***************************************************************************\ * Execute the next instruction * @@ -2628,7 +2628,7 @@ ARMul_Emulate26 (register ARMul_State * state) #ifdef MODE32 state->Reg[14] = pc + 4; /* put PC into Link */ #else - state->Reg[14] = pc + 4 | ECC | ER15INT | EMODE; /* put PC into Link */ + state->Reg[14] = (pc + 4) | ECC | ER15INT | EMODE; /* put PC into Link */ #endif state->Reg[15] = pc + 8 + POSBRANCH; FLUSHPIPE; @@ -3742,7 +3742,7 @@ static unsigned Multiply64 (ARMul_State * state, ARMword instr, int msigned, int scc) { int nRdHi, nRdLo, nRs, nRm; /* operand register numbers */ - ARMword RdHi, RdLo, Rm; + ARMword RdHi = 0, RdLo = 0, Rm; int scount; /* cycle count */ nRdHi = BITS (16, 19); @@ -3809,7 +3809,6 @@ Multiply64 (ARMul_State * state, ARMword instr, int msigned, int scc) state->Reg[nRdLo] = RdLo; state->Reg[nRdHi] = RdHi; - } /* else undefined result */ else fprintf (stderr, "MULTIPLY64 - INVALID ARGUMENTS\n");