| 129 | |
| 130 | |
| 131 | static int patchtestreg (FuncState *fs, int node, int reg) { |
| 132 | Instruction *i = getjumpcontrol(fs, node); |
| 133 | if (GET_OPCODE(*i) != OP_TESTSET) |
| 134 | return 0; /* cannot patch other instructions */ |
| 135 | if (reg != NO_REG && reg != GETARG_B(*i)) |
| 136 | SETARG_A(*i, reg); |
| 137 | else /* no register to put value or register already has the value */ |
| 138 | *i = CREATE_ABC(OP_TEST, GETARG_B(*i), 0, GETARG_C(*i)); |
| 139 | |
| 140 | return 1; |
| 141 | } |
| 142 | |
| 143 | |
| 144 | static void removevalues (FuncState *fs, int list) { |
no test coverage detected