MCPcopy Create free account
hub / github.com/Youlor/unpacker / writeTo

Method writeTo

dexfixer/src/com/android/dx/dex/code/form/Form45cc.java:128–148  ·  view source on GitHub ↗

{@inheritDoc}

(AnnotatedOutput out, DalvInsn insn)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 10

getIndexMethod · 0.95
explicitizeMethod · 0.95
getMethod · 0.95
getRegistersMethod · 0.80
getRegMethod · 0.80
opcodeUnitMethod · 0.80
sizeMethod · 0.65
writeMethod · 0.65
makeByteMethod · 0.45
codeUnitMethod · 0.45

Tested by

no test coverage detected