| 3798 | |
| 3799 | |
| 3800 | static int patchtestreg (FuncState *fs, int node, int reg) { |
| 3801 | Instruction *i = getjumpcontrol(fs, node); |
| 3802 | if (GET_OPCODE(*i) != OP_TESTSET) |
| 3803 | return 0; /* cannot patch other instructions */ |
| 3804 | if (reg != NO_REG && reg != GETARG_B(*i)) |
| 3805 | SETARG_A(*i, reg); |
| 3806 | else /* no register to put value or register already has the value */ |
| 3807 | *i = CREATE_ABC(OP_TEST, GETARG_B(*i), 0, GETARG_C(*i)); |
| 3808 | |
| 3809 | return 1; |
| 3810 | } |
| 3811 | |
| 3812 | |
| 3813 | static void removevalues (FuncState *fs, int list) { |
no test coverage detected