| 146 | |
| 147 | |
| 148 | static int patchtestreg(FuncState *fs, int node, int reg) { |
| 149 | Instruction *i = getjumpcontrol(fs, node); |
| 150 | if (GET_OPCODE(*i) != OP_TESTSET) |
| 151 | return 0; /* cannot patch other instructions */ |
| 152 | if (reg != NO_REG && reg != GETARG_B(*i)) |
| 153 | SETARG_A(*i, reg); |
| 154 | else /* no register to put value or register already has the value */ |
| 155 | *i = CREATE_ABC(OP_TEST, GETARG_B(*i), 0, GETARG_C(*i)); |
| 156 | |
| 157 | return 1; |
| 158 | } |
| 159 | |
| 160 | |
| 161 | static void removevalues(FuncState *fs, int list) { |
no test coverage detected