Exemplo n.º 1
0
        public void SetFPStateFlag(FPState flag, bool value)
        {
            if ((uint)flag >= RegisterConsts.FlagsCount)
            {
                throw new ArgumentException($"Invalid flag \"{flag}\" specified.");
            }

            int offset =
                RegisterConsts.IntRegsCount * IntSize +
                RegisterConsts.VecRegsCount * VecSize +
                RegisterConsts.FlagsCount * FlagSize + (int)flag * FlagSize;

            Marshal.WriteInt32(BasePtr, offset, value ? 1 : 0);
        }
Exemplo n.º 2
0
        public bool GetFPStateFlag(FPState flag)
        {
            if ((uint)flag >= RegisterConsts.FlagsCount)
            {
                throw new ArgumentException($"Invalid flag \"{flag}\" specified.");
            }

            int offset =
                RegisterConsts.IntRegsCount * IntSize +
                RegisterConsts.VecRegsCount * VecSize +
                RegisterConsts.FlagsCount * FlagSize + (int)flag * FlagSize;

            int value = Marshal.ReadInt32(BasePtr, offset);

            return(value != 0);
        }
Exemplo n.º 3
0
 public static Operand GetFpFlag(FPState stateFlag)
 {
     return(Register((int)stateFlag, RegisterType.FpFlag, OperandType.I32));
 }
Exemplo n.º 4
0
 public void SetFPstateFlag(FPState flag, bool value) => _nativeContext.SetFPStateFlag(flag, value);
Exemplo n.º 5
0
 public bool GetFPstateFlag(FPState flag) => _nativeContext.GetFPStateFlag(flag);