internal void SetVector(Native.ArmRegister register, Vector128 <float> value) { byte[] value_bytes = new byte[16]; unsafe { fixed(byte *p = &value_bytes[0]) { Sse.Store((float *)p, value); } } Native.Interface.Checked(Native.Interface.uc_reg_write(uc, (int)register, value_bytes)); }
internal Vector128 <float> GetVector(Native.ArmRegister register) { byte[] value_bytes = new byte[16]; Native.Interface.Checked(Native.Interface.uc_reg_read(uc, (int)register, value_bytes)); unsafe { fixed(byte *p = &value_bytes[0]) { return(Sse.LoadVector128((float *)p)); } } }
internal void SetRegister(Native.ArmRegister register, ulong value) { byte[] value_bytes = BitConverter.GetBytes(value); Native.Interface.Checked(Native.Interface.uc_reg_write(uc, (int)register, value_bytes)); }
internal ulong GetRegister(Native.ArmRegister register) { byte[] value_bytes = new byte[8]; Native.Interface.Checked(Native.Interface.uc_reg_read(uc, (int)register, value_bytes)); return((ulong)BitConverter.ToInt64(value_bytes, 0)); }