public string visit(ParamRegister n) { throw new NotImplementedException(); }
public override string visit(ParamRegister n) { switch (n.Position) { case 0: return "%rcx"; case 1: return "%rdx"; case 2: return "%r8d"; case 3: return "%r9d"; default: return (n.Position + 1) * 8 + "(%rsp)"; } }
public abstract string visit(ParamRegister n);
public virtual string visit(ParamRegister n) { throw new NotImplementedException("Register is not implemented yet"); // Do nothing; leave the implementation to the main class }