Advertisement
Guest User

Untitled

a guest
May 10th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             fprintf(out, "# COMPLEX_ALLOCATE\n");
  2.             printIndentation(out);
  3.             fprintf(out, "push %%rdi\n");
  4.             printIndentation(out);
  5.             fprintf(out, "push %%r15\n");
  6.             printIndentation(out);
  7.             fprintf(out, "push %%r14\n");
  8.  
  9.             printIndentation(out);
  10.             fprintf(out, "mov %%%s, %%r14\n",
  11.                     getNextRegister(instruction->val.allocate.timesTemp));
  12.             printIndentation(out);
  13.             fprintf(out, "mov $0, %%rdi\n");
  14.             printIndentation(out);
  15.             fprintf(out, "mov $12, %%rax\n");
  16.             printIndentation(out);
  17.             fprintf(out, "syscall\n");
  18.             printIndentation(out);
  19.             fprintf(out, "push %%rax\n");
  20.             printIndentation(out);
  21.             fprintf(out, "mov $%zu, %%r15\n",
  22.                     instruction->val.allocate.eleSize);
  23.             printIndentation(out);
  24.             fprintf(out, "imul %%r14, %%r15\n");
  25.             printIndentation(out);
  26.             fprintf(out, "add %%r15, %%rax\n");
  27.             printIndentation(out);
  28.             fprintf(out, "mov %%rax, %%rdi\n");
  29.             printIndentation(out);
  30.             fprintf(out, "mov $12, %%rax\n");
  31.             printIndentation(out);
  32.             fprintf(out, "syscall\n");
  33.             printIndentation(out);
  34.             fprintf(out, "pop %%rax\n");//,
  35.                     //getNextRegister(instruction->val.allocate.ptrTemp));
  36.  
  37.             printIndentation(out);
  38.             fprintf(out, "pop %%r14\n");
  39.             printIndentation(out);
  40.             fprintf(out, "pop %%r15\n");
  41.             printIndentation(out);
  42.             fprintf(out, "pop %%rdi\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement