From: bsekisser Date: Thu, 15 Oct 2015 18:24:43 +0000 (-0400) Subject: core: fixup missing dependancy from r16 commit X-Git-Tag: v1.3~5^2 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=f2ebab47d69ee01d4c9f2cc04496e71665a8ab76;p=sx%2Fsimavr.git core: fixup missing dependancy from r16 commit several commits were pushed to a branch which I later split... one commit had a dependency I missed which this fixes. modified: sim/sim_core.c fix missing dependance in MOVW instruction. --- diff --git a/simavr/sim/sim_core.c b/simavr/sim/sim_core.c index 90ad12e..05c707e 100644 --- a/simavr/sim/sim_core.c +++ b/simavr/sim/sim_core.c @@ -675,7 +675,8 @@ run_one_again: uint8_t d = ((opcode >> 4) & 0xf) << 1; uint8_t r = ((opcode) & 0xf) << 1; STATE("movw %s:%s, %s:%s[%02x%02x]\n", avr_regname(d), avr_regname(d+1), avr_regname(r), avr_regname(r+1), avr->data[r+1], avr->data[r]); - _avr_set_r16le(avr, d, _avr_data_read16le(avr, r)); + uint16_t vr = avr->data[r] | (avr->data[r + 1] << 8); + _avr_set_r16le(avr, d, vr); } break; case 0x0200: { // MULS -- Multiply Signed -- 0000 0010 dddd rrrr int8_t r = 16 + (opcode & 0xf);