Package org.jnode.assembler.x86

Examples of org.jnode.assembler.x86.X86Assembler.writeMOV()


        switch (getKind()) {
            case Kind.GPR:
                res = L1AHelper.requestWordRegister(ec, getType(), false);
                final GPR r = res.getRegister();
                os.writeMOV(gpr.getSize(), r, gpr);
                break;

            case Kind.LOCAL:
                res = (WordItem) factory.createLocal(getType(), getOffsetToFP(ec));
                break;
View Full Code Here


        }

        switch (getKind()) {
            case Kind.GPR:
                if (this.gpr != reg) {
                    os.writeMOV(reg.getSize(), reg, this.gpr);
                    cleanup(ec);
                }
                break;

            case Kind.LOCAL:
View Full Code Here

                    cleanup(ec);
                }
                break;

            case Kind.LOCAL:
                os.writeMOV(reg.getSize(), reg, helper.BP, getOffsetToFP(ec));
                break;

            case Kind.CONSTANT:
                loadToConstant(ec, os, reg);
                break;
View Full Code Here

                        throw new StackException("Item not found on stack");

                    stack.operandStack.makeTop(stack_loc);

                    //todo test it
                    os.writeMOV(org.jnode.vm.x86.compiler.X86CompilerConstants.BITS32, reg, helper.SP, helper.SLOTSIZE);
                    os.writeXCHG(helper.SP, org.jnode.vm.x86.compiler.X86CompilerConstants.BITS32 * stack_loc, reg);
                    os.writeMOV(org.jnode.vm.x86.compiler.X86CompilerConstants.BITS32, helper.SP, helper.SLOTSIZE, reg);
                }

                if (VirtualStack.checkOperandStack) {
View Full Code Here

                    stack.operandStack.makeTop(stack_loc);

                    //todo test it
                    os.writeMOV(org.jnode.vm.x86.compiler.X86CompilerConstants.BITS32, reg, helper.SP, helper.SLOTSIZE);
                    os.writeXCHG(helper.SP, org.jnode.vm.x86.compiler.X86CompilerConstants.BITS32 * stack_loc, reg);
                    os.writeMOV(org.jnode.vm.x86.compiler.X86CompilerConstants.BITS32, helper.SP, helper.SLOTSIZE, reg);
                }

                if (VirtualStack.checkOperandStack) {
                    stack.operandStack.pop(this);
                }
View Full Code Here

            }
            case GETCURRENTFRAME: {
                if (VmUtils.verifyAssertions()) VmUtils._assert(isstatic);
                final WordItem result = L1AHelper.requestWordRegister(ec, JvmType.REFERENCE, false);
                final GPR r = result.getRegister();
                os.writeMOV(helper.ADDRSIZE, r, helper.BP);
                vstack.push(result);
                break;
            }
            case GETTIMESTAMP: {
                if (VmUtils.verifyAssertions()) VmUtils._assert(isstatic);
View Full Code Here

                if (VmUtils.verifyAssertions()) VmUtils._assert(isstatic);
                final RefItem item = (RefItem) L1AHelper.requestWordRegister(ec, JvmType.REFERENCE, false);
                final int offset = ec.getContext().getVmProcessorMeField().getOffset();
                if (os.isCode32()) {
                    os.writePrefix(X86Constants.FS_PREFIX);
                    os.writeMOV(item.getRegister(), offset);
                } else {
                    os.writeMOV(BITS64, item.getRegister(), X86Register.R12, offset);
                }
                vstack.push(item);
                break;
View Full Code Here

                final int offset = ec.getContext().getVmProcessorMeField().getOffset();
                if (os.isCode32()) {
                    os.writePrefix(X86Constants.FS_PREFIX);
                    os.writeMOV(item.getRegister(), offset);
                } else {
                    os.writeMOV(BITS64, item.getRegister(), X86Register.R12, offset);
                }
                vstack.push(item);
                break;
            }
            case GETSHAREDSTATICSFIELDADDRESS: {
View Full Code Here

                final GPR itemReg = item.getRegister();
                final int offset = ec.getContext().getVmProcessorSharedStaticsTable().getOffset();
                // Load table
                if (os.isCode32()) {
                    os.writePrefix(X86Constants.FS_PREFIX);
                    os.writeMOV(itemReg, offset);
                } else {
                    os.writeMOV(BITS64, itemReg, X86CompilerConstants.PROCESSOR64, offset);
                }
                GPR indexReg = index.getRegister();
                if (os.isCode64()) {
View Full Code Here

                // Load table
                if (os.isCode32()) {
                    os.writePrefix(X86Constants.FS_PREFIX);
                    os.writeMOV(itemReg, offset);
                } else {
                    os.writeMOV(BITS64, itemReg, X86CompilerConstants.PROCESSOR64, offset);
                }
                GPR indexReg = index.getRegister();
                if (os.isCode64()) {
                    GPR64 indexReg64 = L1AHelper.get64BitReg(ec, indexReg);
                    os.writeMOVSXD(indexReg64, (GPR32) indexReg);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.