public void visit(StringAsParameter n)
 {
     throw new NotImplementedException();
 }
Beispiel #2
0
 public override void visit(StringAsParameter n)
 {
     if (n.Number < 4)
     {
         switch (n.Number)
         {
             case 0: w("leaq\t" + n.Name + "(" + "%rip" + "), %rcx"); break;
             case 1: w("leaq\t" + n.Name + "(" + "%rip" + "), %rdx"); break;
             case 2: w("leaq\t" + n.Name + "(" + "%rip" + "), %r8"); break;
             case 3: w("leaq\t" + n.Name + "(" + "%rip" + "), %r9"); break;
         }
     }
     else
     {
         w("leaq\t" + n.Name + "(" + "%rip" + "), %rax");
         w("movq\t%rax, " + n.Number * 8 + "(%rsp)");
     }
 }
 public abstract void visit(StringAsParameter n);
 public virtual void visit(StringAsParameter n)
 {
     // Do nothing; leave the implementation to the main class
 }