diff options
Diffstat (limited to 'sim/ft32/interp.c')
-rw-r--r-- | sim/ft32/interp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index c769ff7..f7daf1c 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -602,7 +602,7 @@ step_once (SIM_DESC sd) uint32_t src = r_1v; uint32_t dst = cpu->state.regs[r_d]; uint32_t i; - for (i = 0; i < rimmv; i++) + for (i = 0; i < (rimmv & 0x7fff); i++) PUT_BYTE (dst + i, GET_BYTE (src + i)); } break; @@ -621,7 +621,7 @@ step_once (SIM_DESC sd) /* memset instruction. */ uint32_t dst = cpu->state.regs[r_d]; uint32_t i; - for (i = 0; i < rimmv; i++) + for (i = 0; i < (rimmv & 0x7fff); i++) PUT_BYTE (dst + i, r_1v); } break; |