vstack.push(fpuStack.tos()); } }
os.writeFPREM(); os.writeFXCH(Register.ST1); os.writeFFREEP(Register.ST0);   vstack.push(fpuStack.tos()); } }
    final static void rem(AbstractX86Stream os, EmitterContext ec,            VirtualStack vstack, int type) {        final Item v2 = vstack.pop(type);        final Item v1 = vstack.pop(type);        if (v1.isConstant() && v2.isConstant()) {            final double fpv1 = getFPValue(v1);            final double fpv2 = getFPValue(v2);            vstack.push(createConst(type, fpv1 / fpv2));        } else {            // Prepare stack            final FPUStack fpuStack = vstack.fpuStack;            final Register reg;            reg = prepareForOperation(os, ec, vstack, fpuStack, v2, v1, false);            // We need reg to be ST1, if not swap            fxchST1(os, fpuStack, reg);                        // Pop the fpuStack.tos            fpuStack.pop();            // Calculate            os.writeFPREM();            os.writeFXCH(Register.ST1);            os.writeFFREEP(Register.ST0);            // Push result            vstack.push(fpuStack.tos());        }    }