// $Id: DelocalizedRegister.java,v 1.2 1999/12/07 06:34:56 golem Exp $

package IR2;

public class DelocalizedRegister implements DelocalizedLValue {

  /* DelocalizedLValue */
  // The proxy is a "real" variable to use instead of this "imaginary" one.
  public DelocalizedRValue rproxy() { return this; }
  public DelocalizedLValue lproxy() { return this; }

  public void load_into_reg(Codegen c, DelocalizedRegister r) {
    if (this == r) {
      /* Value is already in r -- no instructions needed. */
      return;
    }
    c.generate_move(r, this);
  }

  public void store_from_reg(Codegen c, DelocalizedRegister r) {
    if (this == r) {
      /* Value is already in this -- no instructions needed. */
      return;
    }
    c.generate_move(this, r);
  }

}
