(FileOutputStream fos, FileOutputStream fos_init, FileOutputStream fos32, String name, String condition)
| 33 | } |
| 34 | |
| 35 | public void cc(FileOutputStream fos, FileOutputStream fos_init, FileOutputStream fos32, String name, String condition) throws IOException { |
| 36 | out(fos, "void OPCALL normal_set"+name+"_reg(CPU* cpu, DecodedOp* op) {"); |
| 37 | out(fos, " START_OP(cpu, op);"); |
| 38 | out(fos, " if ("+condition+") {"); |
| 39 | out(fos, " *cpu->reg8[op->reg] = 1;"); |
| 40 | out(fos, " } else {"); |
| 41 | out(fos, " *cpu->reg8[op->reg] = 0;"); |
| 42 | out(fos, " }"); |
| 43 | out(fos, " NEXT();"); |
| 44 | out(fos, "}"); |
| 45 | out(fos, "void OPCALL normal_set"+name+"_mem(CPU* cpu, DecodedOp* op) {"); |
| 46 | out(fos, " START_OP(cpu, op);"); |
| 47 | out(fos, " if ("+condition+") {"); |
| 48 | out(fos, " writeb(eaa(cpu, op), 1);"); |
| 49 | out(fos, " } else {"); |
| 50 | out(fos, " writeb(eaa(cpu, op), 0);"); |
| 51 | out(fos, " }"); |
| 52 | out(fos, " NEXT();"); |
| 53 | out(fos, "}"); |
| 54 | |
| 55 | out(fos_init, "INIT_CPU(Set"+name+"_R8, set"+name+"_reg)"); |
| 56 | out(fos_init, "INIT_CPU(Set"+name+"_E8, set"+name+"_mem)"); |
| 57 | |
| 58 | out(fos32, "void dynamic_set"+name+"_reg(DynamicData* data, DecodedOp* op) {"); |
| 59 | out(fos32, " setCPU(data, OFFSET_REG8(op->reg), DYN_8bit, "+name+");"); |
| 60 | out(fos32, " INCREMENT_EIP(op->len);"); |
| 61 | out(fos32, "}"); |
| 62 | |
| 63 | out(fos32, "void dynamic_set"+name+"_mem(DynamicData* data, DecodedOp* op) {"); |
| 64 | out(fos32, " calculateEaa(op, DYN_ADDRESS);"); |
| 65 | out(fos32, " setMem(data, DYN_ADDRESS, DYN_8bit, "+name+", true);"); |
| 66 | out(fos32, " INCREMENT_EIP(op->len);"); |
| 67 | out(fos32, "}"); |
| 68 | } |
| 69 | } |
no test coverage detected