Commit 2386657c7dedfea8ddd4ea4c0bb5c9e59a14c1b6
authorbsekisser <squirmyworms@embarqmail.com>
Tue, 2 Jul 2013 17:02:15 +0000 (13:02 -0400)
committerbsekisser <squirmyworms@embarqmail.com>
Tue, 2 Jul 2013 17:02:15 +0000 (13:02 -0400)
modified:   simavr/sim/sim_core.c

simavr/sim/sim_core.c

index 6db0b87469456ee3373dad0633cd381e92562293..03d46ffd6fe83e512a56451ecbf15a321897d419 100644 (file)
@@ -846,7 +846,7 @@ avr_flashaddr_t avr_run_one(avr_t * avr)
                                        int p = opcode & 0x100;
                                        if (e && !avr->eind)
                                                _avr_invalid_opcode(avr);
-                                       uint16_t z = avr->data[R_ZL] | (avr->data[R_ZH] << 8);
+                                       uint32_t z = avr->data[R_ZL] | (avr->data[R_ZH] << 8);
                                        if (e)
                                                z |= avr->data[avr->eind] << 16;
                                        STATE("%si%s Z[%04x]\n", e?"e":"", p?"call":"jmp", z << 1);