Added macro 'testMMMode'
Macro 'testMMMode' checks whether opcode is an MM opcode.
This commit is contained in:
8
ldebug.c
8
ldebug.c
@@ -465,16 +465,14 @@ static int filterpc (int pc, int jmptarget) {
|
||||
|
||||
|
||||
/*
|
||||
** try to find last instruction before 'lastpc' that modified register 'reg'
|
||||
** Try to find last instruction before 'lastpc' that modified register 'reg'.
|
||||
*/
|
||||
static int findsetreg (const Proto *p, int lastpc, int reg) {
|
||||
int pc;
|
||||
int setreg = -1; /* keep last instruction that changed 'reg' */
|
||||
int jmptarget = 0; /* any code before this address is conditional */
|
||||
if (GET_OPCODE(p->code[lastpc]) == OP_MMBIN ||
|
||||
GET_OPCODE(p->code[lastpc]) == OP_MMBINI ||
|
||||
GET_OPCODE(p->code[lastpc]) == OP_MMBINK)
|
||||
lastpc--;
|
||||
if (testMMMode(GET_OPCODE(p->code[lastpc])))
|
||||
lastpc--; /* previous instruction was not actually executed */
|
||||
for (pc = 0; pc < lastpc; pc++) {
|
||||
Instruction i = p->code[pc];
|
||||
OpCode op = GET_OPCODE(i);
|
||||
|
||||
Reference in New Issue
Block a user