Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 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));
         }
     }
 }
Exemplo n.º 3
0
 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));
 }
Exemplo n.º 4
0
 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));
 }