Package org.jnode.assembler.x86

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


                flags.load(ec);
                obj.load(ec);
                final GPR flagsr = flags.getRegister();
                final GPR r = obj.getRegister();
                // Set flags
                os.writeMOV(helper.ADDRSIZE, r, ObjectLayout.FLAGS_SLOT * slotSize, flagsr);
                flags.release(ec);
                obj.release(ec);
                break;
            }
            case GETARRAYDATA: {
View Full Code Here


                obj.load(ec);
                final GPR r = obj.getRegister();
                final IntItem result = (IntItem) L1AHelper.requestWordRegister(ec, JvmType.INT, false);
                final GPR resultr = result.getRegister();
                // Get flags
                os.writeMOV(BITS32, resultr, r, ObjectLayout.FLAGS_SLOT * slotSize);
                os.writeAND(resultr, ObjectFlags.GC_COLOUR_MASK);
                obj.release(ec);
                vstack.push(result);
                break;
            }
View Full Code Here

                obj.load(ec);
                final GPR r = obj.getRegister();
                final IntItem result = (IntItem) L1AHelper.requestWordRegister(ec, JvmType.INT, false);
                final GPR resultr = result.getRegister();
                // Get flags
                os.writeMOV(BITS32, resultr, r, ObjectLayout.FLAGS_SLOT * slotSize);
                os.writeAND(resultr, ObjectFlags.STATUS_FINALIZED);
                obj.release(ec);
                vstack.push(result);
                break;
            }
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 (os.isCode64()) {
                    final GPR64 newR = (GPR64) pool.getRegisterInSameGroup(r, JvmType.REFERENCE);
                    if (mcode == FROMINTZEROEXTEND) {
                        // Moving the register to itself in 32-bit mode, will
                        // zero extend the top 32-bits.
                        os.writeMOV(BITS32, r, r);
                    } else {
                        // Sign extend
                        os.writeMOVSXD(newR, (GPR32) r);
                    }
                    r = newR;
View Full Code Here

                final RefItem addr = vstack.popRef();
                addr.load(ec);
                final GPR r = addr.getRegister();
                final WordItem result = L1AHelper.requestWordRegister(ec, methodToType(mcode), false);
                final GPR resultr = result.getRegister();
                os.writeMOV(resultr.getSize(), resultr, r, 0);
                addr.release(ec);
                vstack.push(result);
                break;
            }
            case LOADLONG:
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 X86Register.GPR r = addr.getRegister();
                if (os.isCode32()) {
                    final X86Register.GPR msb = (X86Register.GPR) L1AHelper.requestRegister(ec, JvmType.INT, false);
                    addr.release(ec);
                    L1AHelper.releaseRegister(ec, msb);
                    os.writeMOV(X86CompilerConstants.INTSIZE, msb, r, X86CompilerConstants.MSB);
                    os.writeMOV(X86CompilerConstants.INTSIZE, r, r, X86CompilerConstants.LSB);
                    vstack.push(L1AHelper.requestDoubleWordRegisters(ec, methodToType(mcode), r, msb));
                } else {
                    final DoubleWordItem result = L1AHelper.requestDoubleWordRegisters(ec, methodToType(mcode));
                    os.writeMOV(BITS64, result.getRegister(ec), r, 0);
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

                if (os.isCode32()) {
                    final X86Register.GPR msb = (X86Register.GPR) L1AHelper.requestRegister(ec, JvmType.INT, false);
                    addr.release(ec);
                    L1AHelper.releaseRegister(ec, msb);
                    os.writeMOV(X86CompilerConstants.INTSIZE, msb, r, X86CompilerConstants.MSB);
                    os.writeMOV(X86CompilerConstants.INTSIZE, r, r, X86CompilerConstants.LSB);
                    vstack.push(L1AHelper.requestDoubleWordRegisters(ec, methodToType(mcode), r, msb));
                } else {
                    final DoubleWordItem result = L1AHelper.requestDoubleWordRegisters(ec, methodToType(mcode));
                    os.writeMOV(BITS64, result.getRegister(ec), r, 0);
                    addr.release(ec);
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.