{@inheritDoc}
(AnnotatedOutput out, DalvInsn insn)
| 126 | |
| 127 | /** {@inheritDoc} */ |
| 128 | @Override |
| 129 | public void writeTo(AnnotatedOutput out, DalvInsn insn) { |
| 130 | MultiCstInsn mci = (MultiCstInsn) insn; |
| 131 | short regB = (short) mci.getIndex(0); // B is the method index |
| 132 | short regH = (short) mci.getIndex(1); // H is the call site proto index |
| 133 | |
| 134 | RegisterSpecList regs = explicitize(insn.getRegisters()); |
| 135 | int regA = regs.size(); |
| 136 | int regC = (regA > 0) ? regs.get(0).getReg() : 0; |
| 137 | int regD = (regA > 1) ? regs.get(1).getReg() : 0; |
| 138 | int regE = (regA > 2) ? regs.get(2).getReg() : 0; |
| 139 | int regF = (regA > 3) ? regs.get(3).getReg() : 0; |
| 140 | int regG = (regA > 4) ? regs.get(4).getReg() : 0; |
| 141 | |
| 142 | // The output format is: A|G|op BBBB F|E|D|C HHHHH |
| 143 | write(out, |
| 144 | opcodeUnit(insn, makeByte(regG, regA)), |
| 145 | regB, |
| 146 | codeUnit(regC, regD, regE, regF), |
| 147 | regH); |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Gets the number of words required for the given register list, where |
nothing calls this directly
no test coverage detected