private RegisterSpec getSynchReg() {
    /*
     * We use the register that is just past the deepest possible
     * stack element, with a minimum of v1 since v0 is what's
     * always used to hold the caught exception when unwinding. We
     * don't need to do anything else special at this level, since
     * later passes will merely notice the highest register used
     * by explicit inspection.
     */
    int reg = getNormalRegCount();
    return RegisterSpec.make((reg < 1) ? 1 : reg, Type.OBJECT);
  }
Gets the register spec to use to hold the object to synchronize on, for a synchronized method.

@return {@code non-null;} the register spec
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/Ropper.java