Package org.jnode.assembler.NativeStream

Examples of org.jnode.assembler.NativeStream.ObjectInfo


     * @throws UnresolvedObjectRefException
     */
    protected void createInitialStack(NativeStream os, Label stackLabel,
                                      Label stackPtrLabel) throws BuildException, ClassNotFoundException,
        UnresolvedObjectRefException {
        final ObjectInfo objectInfo = os
            .startObject(loadClass(VmSystemObject.class));
        final int stackOffset = os.setObjectRef(stackLabel).getOffset();
        final int stackAddr = stackOffset + (int) os.getBaseAddr();
        final int slotSize = arch.getReferenceSize();

        // Low stack address
        os.writeWord(stackAddr + VmThread.STACK_OVERFLOW_LIMIT_SLOTS * slotSize);
        // High stack address
        os.writeWord(stackAddr + VmThread.DEFAULT_STACK_SLOTS * slotSize);
        // The actual stack space
        for (int i = 2; i < VmThread.DEFAULT_STACK_SLOTS; i++) {
            os.writeWord(0);
        }
        os.setObjectRef(stackPtrLabel);
        objectInfo.markEnd();
    }
View Full Code Here

TOP

Related Classes of org.jnode.assembler.NativeStream.ObjectInfo

Copyright © 2018 www.massapicom. 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.