Package org.jnode.assembler.x86

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


            case Kind.GPR:
                if (os.isCode32()) {
                    os.writePUSH(msb);
                    os.writePUSH(lsb);
                    pushToFPU(os, X86Register.ESP, 0);
                    os.writeLEA(X86Register.ESP, X86Register.ESP, 8);
                } else {
                    os.writePUSH(reg);
                    pushToFPU(os, X86Register.RSP, 0);
                    os.writeLEA(X86Register.RSP, X86Register.RSP, 8);
                }
View Full Code Here


                    pushToFPU(os, X86Register.ESP, 0);
                    os.writeLEA(X86Register.ESP, X86Register.ESP, 8);
                } else {
                    os.writePUSH(reg);
                    pushToFPU(os, X86Register.RSP, 0);
                    os.writeLEA(X86Register.RSP, X86Register.RSP, 8);
                }
                break;

            case Kind.LOCAL:
                if (os.isCode32()) {
View Full Code Here

            case Kind.CONSTANT:
                pushConstant(ec, os);
                if (os.isCode32()) {
                    pushToFPU(os, X86Register.ESP, 0);
                    os.writeLEA(X86Register.ESP, X86Register.ESP, 8);
                } else {
                    pushToFPU(os, X86Register.RSP, 0);
                    os.writeLEA(X86Register.RSP, X86Register.RSP, 8);
                }
                break;
View Full Code Here

                if (os.isCode32()) {
                    pushToFPU(os, X86Register.ESP, 0);
                    os.writeLEA(X86Register.ESP, X86Register.ESP, 8);
                } else {
                    pushToFPU(os, X86Register.RSP, 0);
                    os.writeLEA(X86Register.RSP, X86Register.RSP, 8);
                }
                break;

            case Kind.FPUSTACK:
                // Assert this item is at the top of the stack
View Full Code Here

                if (VirtualStack.checkOperandStack) {
                    stack.operandStack.pop(this);
                }
                if (os.isCode32()) {
                    pushToFPU(os, X86Register.ESP, 0);
                    os.writeLEA(X86Register.ESP, X86Register.ESP, 8);
                } else {
                    pushToFPU(os, X86Register.RSP, 0);
                    os.writeLEA(X86Register.RSP, X86Register.RSP, 16); // 8-byte + garbage
                }
                break;
View Full Code Here

                if (os.isCode32()) {
                    pushToFPU(os, X86Register.ESP, 0);
                    os.writeLEA(X86Register.ESP, X86Register.ESP, 8);
                } else {
                    pushToFPU(os, X86Register.RSP, 0);
                    os.writeLEA(X86Register.RSP, X86Register.RSP, 16); // 8-byte + garbage
                }
                break;
        }

        cleanup(ec);
View Full Code Here

            case Kind.STACK:
                if (VirtualStack.checkOperandStack) {
                    stack.operandStack.pop(this);
                }
                pushToFPU(os, helper.SP, 0);
                os.writeLEA(helper.SP, helper.SP, helper.SLOTSIZE);
                break;

            default:
                throw new IllegalArgumentException("Invalid item kind");
        }
View Full Code Here

            case Kind.FPUSTACK:
                // Make sure this item is on top of the FPU stack
                FPUHelper.fxch(os, stack.fpuStack, this);
                stack.fpuStack.pop(this);
                // Convert & move to new space on normal stack
                os.writeLEA(helper.SP, helper.SP, -helper.SLOTSIZE);
                popFromFPU(os, helper.SP, 0);
                os.writePOP(reg);
                break;

            case Kind.STACK:
View Full Code Here

                // Make sure this item is on top of the FPU stack
                final FPUStack fpuStack = stack.fpuStack;
                FPUHelper.fxch(os, fpuStack, this);
                stack.fpuStack.pop(this);
                // Convert & move to new space on normal stack
                os.writeLEA(helper.SP, helper.SP, -helper.SLOTSIZE);
                popFromFPU(os, helper.SP, 0);
                break;

            case Kind.STACK:
                // nothing to do
View Full Code Here

        switch (getKind()) {
            case Kind.GPR:
                os.writePUSH(gpr);
                pushToFPU(os, helper.SP, 0);
                os.writeLEA(helper.SP, helper.SP, helper.SLOTSIZE);
                break;

            case Kind.LOCAL:
                pushToFPU(os, helper.BP, getOffsetToFP(ec));
                break;
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.