/// <summary>
 /// Creates a store instruction.
 /// </summary>
 /// <param name="pointeeType">
 /// The type of <paramref name="value"/>. Also the type of
 /// value pointed to by <paramref name="pointer"/>.
 /// </param>
 /// <param name="pointer">
 /// A pointer the target of the store.
 /// </param>
 /// <param name="value">
 /// A value to store at <paramref name="pointer"/>'s pointee.
 /// </param>
 /// <returns>
 /// A store instruction.
 /// </returns>
 public static Instruction CreateStore(
     IType pointeeType,
     ValueTag pointer,
     ValueTag value)
 {
     return(StorePrototype.Create(pointeeType).Instantiate(pointer, value));
 }
Beispiel #2
0
 /// <summary>
 /// Creates a store instruction.
 /// </summary>
 /// <param name="pointeeType">
 /// The type of <paramref name="value"/>. Also the type of
 /// value pointed to by <paramref name="pointer"/>.
 /// </param>
 /// <param name="pointer">
 /// A pointer the target of the store.
 /// </param>
 /// <param name="value">
 /// A value to store at <paramref name="pointer"/>'s pointee.
 /// </param>
 /// <param name="isVolatile">
 /// Tells if the store is a volatile operation.
 /// Volatile operations may not be reordered with regard to each other.
 /// </param>
 /// <param name="alignment">
 /// The pointer alignment of <paramref name="pointer"/>.
 /// </param>
 /// <returns>
 /// A store instruction.
 /// </returns>
 public static Instruction CreateStore(
     IType pointeeType,
     ValueTag pointer,
     ValueTag value,
     bool isVolatile     = false,
     Alignment alignment = default(Alignment))
 {
     return(StorePrototype.Create(pointeeType, isVolatile, alignment).Instantiate(pointer, value));
 }
 private static StorePrototype DecodeStore(IReadOnlyList <LNode> data, DecoderState state)
 {
     if (data.Count >= 3)
     {
         return(StorePrototype.Create(
                    state.DecodeType(data[0]),
                    state.DecodeBoolean(data[1]),
                    state.DecodeAlignment(data[2])));
     }
     else if (data.Count >= 2)
     {
         return(StorePrototype.Create(
                    state.DecodeType(data[0]),
                    state.DecodeBoolean(data[1])));
     }
     else
     {
         return(StorePrototype.Create(state.DecodeType(data[0])));
     }
 }
 private static StorePrototype DecodeStore(IReadOnlyList <LNode> data, DecoderState state)
 {
     return(StorePrototype.Create(state.DecodeType(data[0])));
 }