Examples of loadInt()


Examples of org.vmmagic.unboxed.Address.loadInt()

        final Address srcAddr = ObjectReference.fromObject(src).toAddress();
        final Address dstAddr = ObjectReference.fromObject(dst).toAddress();

        final int srcLen = srcAddr.loadInt(lengthOffset);
        final int dstLen = dstAddr.loadInt(lengthOffset);

        // Calc end index (if overflow, then will be < 0 )
        final int srcEnd = srcPos + length;
        final int dstEnd = dstPos + length;
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadInt()

        final int size;
        if (objectClass.isArray()) {
            final int slotSize = getCurrentProcessor().getArchitecture()
                .getReferenceSize();
            final VmArrayClass<?> arrayClass = (VmArrayClass<?>) objectClass;
            final int length = objectPtr.loadInt(Offset
                .fromIntSignExtend(VmArray.LENGTH_OFFSET * slotSize));
            final int elemSize = arrayClass.getComponentType().getTypeSize();
            size = (VmArray.DATA_OFFSET * slotSize) + (length * elemSize);
        } else {
            final VmNormalClass<?> normalClass = (VmNormalClass<?>) objectClass;
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadInt()

    @Inline
    private final void addIsolatedState(int value) {
        if (VmMagic.isRunningJNode()) {
            final Address ptr = VmMagic
                .getIsolatedStaticFieldAddress(isolatedStaticsIndex);
            ptr.store(ptr.loadInt() | value);
        } else {
            final VmIsolatedStatics statics;
            final int index = isolatedStaticsIndex;
            statics = loader.getIsolatedStatics();
            statics.setInt(index, statics.getInt(index) | value);
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadInt()

    public static boolean compareAndSwapInt(Unsafe instance, Object o, long offset,
                                           int expected, int x) {
        //todo make sure it's atomic
        final Address address = ObjectReference.fromObject(o).toAddress().add((int) offset);
        if(address.loadInt() == expected){
            address.store(x);
            return true;
        } else {
            return false;
        }
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadInt()

        for (int i = 0; i < cnt; i++) {
            long base = mmap
                .loadLong(Offset.fromIntZeroExtend(MBMMAP_BASEADDR));
            long length = mmap
                .loadLong(Offset.fromIntZeroExtend(MBMMAP_LENGTH));
            int type = mmap.loadInt(Offset.fromIntZeroExtend(MBMMAP_TYPE));
            mmap = mmap.add(MBMMAP_ESIZE);

            Unsafe.debug(mmapTypeToString(type));
            Unsafe.debug(base);
            Unsafe.debug(" - ");
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadInt()

        for (int i = 0; i < cnt; i++) {
            long base = mmap
                .loadLong(Offset.fromIntZeroExtend(MBMMAP_BASEADDR));
            long length = mmap
                .loadLong(Offset.fromIntZeroExtend(MBMMAP_LENGTH));
            int type = mmap.loadInt(Offset.fromIntZeroExtend(MBMMAP_TYPE));
            mmap = mmap.add(MBMMAP_ESIZE);

            map[i] = new X86MemoryMapEntry(Address.fromLong(base), Extent
                .fromLong(length), type);
        }
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.