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); }
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); }
public static Operand GetFpFlag(FPState stateFlag) { return(Register((int)stateFlag, RegisterType.FpFlag, OperandType.I32)); }
public void SetFPstateFlag(FPState flag, bool value) => _nativeContext.SetFPStateFlag(flag, value);
public bool GetFPstateFlag(FPState flag) => _nativeContext.GetFPStateFlag(flag);