assmswapC.c - #include <stdio.h> void swap(long*xp long*yp asm movq%rdi%rax\\n\\t movq%rsi%rdx\\n\\t leaq 10%rdx%rdx,2%rdx movq%rdx%rdi\\n\\t movq%rax%rsi\\n\\t

assmswapC.c - #include <stdio.h> void swap(long*xp long*yp...

This preview shows page 1 out of 1 page.

#include <stdio.h> void swap (long *xp, long *yp) { asm(" movq (%rdi), %rax \n\t" " movq (%rsi), %rdx \n\t" " leaq 10(%rdx,%rdx,2),%rdx \n\t" " movq %rdx, (%rdi)
Image of page 1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture