Question: Convert this x86-64 code to Y86-64 code. Function swap() void swap (long *xp, long *yp) { long t0 = *xp: long t1 = *yp: *xp

Convert this x86-64 code to Y86-64 code.
Function swap() void swap (long *xp, long *yp) { long t0 = *xp: long t1 = *yp: *xp = t1: *yp = t0: } Note, xp has to be in %rdi and yp in %rsi set by calling function. swap: movq (%rdi), %rax movq (%rsi), %rdx movq %rdx, (%rdi) movq %rax, (%rsi) ret Compilation command: gcc -O1 -S swap. c produces file swap. s
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
