Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fprintf(out, "# COMPLEX_ALLOCATE\n");
- printIndentation(out);
- fprintf(out, "push %%rdi\n");
- printIndentation(out);
- fprintf(out, "push %%r15\n");
- printIndentation(out);
- fprintf(out, "push %%r14\n");
- printIndentation(out);
- fprintf(out, "mov %%%s, %%r14\n",
- getNextRegister(instruction->val.allocate.timesTemp));
- printIndentation(out);
- fprintf(out, "mov $0, %%rdi\n");
- printIndentation(out);
- fprintf(out, "mov $12, %%rax\n");
- printIndentation(out);
- fprintf(out, "syscall\n");
- printIndentation(out);
- fprintf(out, "push %%rax\n");
- printIndentation(out);
- fprintf(out, "mov $%zu, %%r15\n",
- instruction->val.allocate.eleSize);
- printIndentation(out);
- fprintf(out, "imul %%r14, %%r15\n");
- printIndentation(out);
- fprintf(out, "add %%r15, %%rax\n");
- printIndentation(out);
- fprintf(out, "mov %%rax, %%rdi\n");
- printIndentation(out);
- fprintf(out, "mov $12, %%rax\n");
- printIndentation(out);
- fprintf(out, "syscall\n");
- printIndentation(out);
- fprintf(out, "pop %%rax\n");//,
- //getNextRegister(instruction->val.allocate.ptrTemp));
- printIndentation(out);
- fprintf(out, "pop %%r14\n");
- printIndentation(out);
- fprintf(out, "pop %%r15\n");
- printIndentation(out);
- fprintf(out, "pop %%rdi\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement