writeResolveAndLoadClassToReg(classRef, classr);
ref.load(eContext); final Register refr = ref.getRegister(); final Register classr = requestRegister(JvmType.INT);
    public final void visit_checkcast(VmConstClass classRef) {        // check that top item is a reference        final RefItem ref = vstack.popRef();        // Load the ref        ref.load(eContext);        final Register refr = ref.getRegister();        final Register classr = requestRegister(JvmType.INT);        // Resolve the class        writeResolveAndLoadClassToReg(classRef, classr);        final Label okLabel = new Label(this.curInstrLabel + "cc-ok");        /* Is objectref null? */        os.writeTEST(refr, refr);        os.writeJCC(okLabel, X86Constants.JZ);        /* Is instanceof? */        instanceOf(refr, okLabel);        /* Not instanceof */        // Call SoftByteCodes.systemException        os.writePUSH(SoftByteCodes.EX_CLASSCAST);        os.writePUSH(0);        helper.invokeJavaMethod(context.getSystemExceptionMethod());        final RefItem exi = vstack.popRef();        assertCondition(exi.uses(EAX), "item must be in eax");        /* Exception in EAX, throw it */        helper.writeJumpTableCALL(X86JumpTable.VM_ATHROW_OFS);        /* Normal exit */        os.setObjectRef(okLabel);        // Leave ref on stack        vstack.push(ref);        // Release        releaseRegister(classr);    }