Ejemplo n.º 1
0
        internal void MonoArrayTypeGetBounds(TargetMemoryAccess memory,
                                             TargetAddress data)
        {
            //
            // FIXME: Only check whether the low bounds are all zero
            //
            int num_sizes = memory.ReadByte(data + memory.TargetAddressSize + 1);

            if (num_sizes != 0)
            {
                throw new InternalError();
            }

            int num_lobounds = memory.ReadByte(data + memory.TargetAddressSize + 2);

            if (num_lobounds == 0)
            {
                return;
            }

            TargetAddress      array  = memory.ReadAddress(data + 3 * memory.TargetAddressSize);
            TargetBinaryReader bounds = memory.ReadMemory(array, num_lobounds * 4).GetReader();

            for (int i = 0; i < num_lobounds; i++)
            {
                int bound = bounds.ReadInt32();
                if (bound != 0)
                {
                    throw new InternalError();
                }
            }
        }
Ejemplo n.º 2
0
 internal override bool IsSyscallInstruction(TargetMemoryAccess memory,
                                             TargetAddress address)
 {
     try {
         return((memory.ReadByte(address - 2) == 0x0f) &&
                (memory.ReadByte(address - 1) == 0x05));
     } catch {
         return(false);
     }
 }
Ejemplo n.º 3
0
 public int MonoArrayTypeGetNumLoBounds(TargetMemoryAccess memory,
                                        TargetAddress atype)
 {
     return(memory.ReadByte(atype + memory.TargetAddressSize + 2));
 }
Ejemplo n.º 4
0
 public int MonoArrayTypeGetRank(TargetMemoryAccess memory,
                                 TargetAddress atype)
 {
     return(memory.ReadByte(atype + memory.TargetAddressSize));
 }
Ejemplo n.º 5
0
        internal override bool IsSyscallInstruction(TargetMemoryAccess memory,
							     TargetAddress address)
        {
            try {
                return (memory.ReadByte (address - 2) == 0x0f) &&
                    (memory.ReadByte (address - 1) == 0x05);
            } catch {
                return false;
            }
        }
Ejemplo n.º 6
0
        internal override bool IsRetInstruction(TargetMemoryAccess memory,
							 TargetAddress address)
        {
            return memory.ReadByte (address) == 0xc3;
        }
Ejemplo n.º 7
0
 internal override bool IsRetInstruction(TargetMemoryAccess memory,
                                         TargetAddress address)
 {
     return(memory.ReadByte(address) == 0xc3);
 }
Ejemplo n.º 8
0
        internal void MonoArrayTypeGetBounds(TargetMemoryAccess memory,
						      TargetAddress data)
        {
            //
            // FIXME: Only check whether the low bounds are all zero
            //
            int num_sizes = memory.ReadByte (data + memory.TargetAddressSize + 1);
            if (num_sizes != 0)
                throw new InternalError ();

            int num_lobounds = memory.ReadByte (data + memory.TargetAddressSize + 2);
            if (num_lobounds == 0)
                return;

            TargetAddress array = memory.ReadAddress (data + 3 * memory.TargetAddressSize);
            TargetBinaryReader bounds = memory.ReadMemory (array, num_lobounds * 4).GetReader ();
            for (int i = 0; i < num_lobounds; i++) {
                int bound = bounds.ReadInt32 ();
                if (bound != 0)
                    throw new InternalError ();
            }
        }
Ejemplo n.º 9
0
        public int MonoArrayTypeGetRank(TargetMemoryAccess memory,
						 TargetAddress atype)
        {
            return memory.ReadByte (atype + memory.TargetAddressSize);
        }
Ejemplo n.º 10
0
        public int MonoArrayTypeGetNumLoBounds(TargetMemoryAccess memory,
							TargetAddress atype)
        {
            return memory.ReadByte (atype + memory.TargetAddressSize + 2);
        }