diff options
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -465,16 +465,14 @@ static int filterpc (int pc, int jmptarget) { | |||
465 | 465 | ||
466 | 466 | ||
467 | /* | 467 | /* |
468 | ** try to find last instruction before 'lastpc' that modified register 'reg' | 468 | ** Try to find last instruction before 'lastpc' that modified register 'reg'. |
469 | */ | 469 | */ |
470 | static int findsetreg (const Proto *p, int lastpc, int reg) { | 470 | static int findsetreg (const Proto *p, int lastpc, int reg) { |
471 | int pc; | 471 | int pc; |
472 | int setreg = -1; /* keep last instruction that changed 'reg' */ | 472 | int setreg = -1; /* keep last instruction that changed 'reg' */ |
473 | int jmptarget = 0; /* any code before this address is conditional */ | 473 | int jmptarget = 0; /* any code before this address is conditional */ |
474 | if (GET_OPCODE(p->code[lastpc]) == OP_MMBIN || | 474 | if (testMMMode(GET_OPCODE(p->code[lastpc]))) |
475 | GET_OPCODE(p->code[lastpc]) == OP_MMBINI || | 475 | lastpc--; /* previous instruction was not actually executed */ |
476 | GET_OPCODE(p->code[lastpc]) == OP_MMBINK) | ||
477 | lastpc--; | ||
478 | for (pc = 0; pc < lastpc; pc++) { | 476 | for (pc = 0; pc < lastpc; pc++) { |
479 | Instruction i = p->code[pc]; | 477 | Instruction i = p->code[pc]; |
480 | OpCode op = GET_OPCODE(i); | 478 | OpCode op = GET_OPCODE(i); |