use of com.taobao.android.dx.rop.code.RegisterSpecList in project atlas by alibaba.
the class Form11x method writeTo.
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
write(out, opcodeUnit(insn, regs.get(0).getReg()));
}
use of com.taobao.android.dx.rop.code.RegisterSpecList in project atlas by alibaba.
the class Form12x method insnArgString.
/** {@inheritDoc} */
@Override
public String insnArgString(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
int sz = regs.size();
return regs.get(sz - 2).regString() + ", " + regs.get(sz - 1).regString();
}
use of com.taobao.android.dx.rop.code.RegisterSpecList in project atlas by alibaba.
the class Form21c method writeTo.
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
int cpi = ((CstInsn) insn).getIndex();
write(out, opcodeUnit(insn, regs.get(0).getReg()), (short) cpi);
}
use of com.taobao.android.dx.rop.code.RegisterSpecList in project atlas by alibaba.
the class HighRegisterPrefix method calculateInsnsIfNecessary.
/**
* Helper for {@link #codeSize} and {@link #writeTo} which sets up
* {@link #insns} if not already done.
*/
private void calculateInsnsIfNecessary() {
if (insns != null) {
return;
}
RegisterSpecList registers = getRegisters();
int sz = registers.size();
insns = new SimpleInsn[sz];
for (int i = 0, outAt = 0; i < sz; i++) {
RegisterSpec src = registers.get(i);
insns[i] = moveInsnFor(src, outAt);
outAt += src.getCategory();
}
}
use of com.taobao.android.dx.rop.code.RegisterSpecList in project atlas by alibaba.
the class HighRegisterPrefix method listingString0.
/** {@inheritDoc} */
@Override
protected String listingString0(boolean noteIndices) {
RegisterSpecList registers = getRegisters();
int sz = registers.size();
StringBuffer sb = new StringBuffer(100);
for (int i = 0, outAt = 0; i < sz; i++) {
RegisterSpec src = registers.get(i);
SimpleInsn insn = moveInsnFor(src, outAt);
if (i != 0) {
sb.append('\n');
}
sb.append(insn.listingString0(noteIndices));
outAt += src.getCategory();
}
return sb.toString();
}
Aggregations