Exemplo n.º 1
0
 /// <summary>
 /// Mark this low register as in use by the given original register.
 /// </summary>
 public void SetInUseBy(Register originalRegister, RType type)
 {
     if (OriginalRegister != null)
     {
         throw new InvalidOperationException("Register state is still in use");
     }
     if (type == RType.Wide)
     {
         if (next == null)
         {
             throw new InvalidOperationException("Register state cannot hold a wide");
         }
         if (next.OriginalRegister != null)
         {
             throw new InvalidOperationException("Register state.next is still in use");
         }
     }
     OriginalRegister = originalRegister;
     isWide           = (type == RType.Wide);
     this.type        = type;
     if (isWide)
     {
         next.isWide           = false;
         next.OriginalRegister = originalRegister;
         next.type             = RType.Wide2;
         next.wideStart        = this;
     }
     Mapping = new RegisterSpillingMapping(OriginalRegister, LowRegister);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Mark this low register state as no longer in use.
 /// </summary>
 private void Clear()
 {
     if (isWide)
     {
         next.Clear();
     }
     OriginalRegister     = null;
     SaveToOriginalNeeded = false;
     isWide    = false;
     type      = RType.Value;
     wideStart = null;
     Mapping   = null;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Add an entry
 /// </summary>
 public void Add(RegisterSpillingMapping mapping)
 {
     mappings.Add(mapping);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Mark this low register as in use by the given original register.
 /// </summary>
 public void SetInUseBy(Register originalRegister, RType type)
 {
     if (OriginalRegister != null)
         throw new InvalidOperationException("Register state is still in use");
     if (type == RType.Wide)
     {
         if (next == null)
             throw new InvalidOperationException("Register state cannot hold a wide");
         if (next.OriginalRegister != null)
             throw new InvalidOperationException("Register state.next is still in use");
     }
     OriginalRegister = originalRegister;
     isWide = (type == RType.Wide);
     this.type = type;
     if (isWide)
     {
         next.isWide = false;
         next.OriginalRegister = originalRegister;
         next.type = RType.Wide2;
         next.wideStart = this;
     }
     Mapping = new RegisterSpillingMapping(OriginalRegister, LowRegister);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Mark this low register state as no longer in use.
 /// </summary>
 private void Clear()
 {
     if (isWide) next.Clear();
     OriginalRegister = null;
     SaveToOriginalNeeded = false;
     isWide = false;
     type = RType.Value;
     wideStart = null;
     Mapping = null;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Add an entry
 /// </summary>
 public void Add(RegisterSpillingMapping mapping)
 {
     mappings.Add(mapping);
 }