Question: Convert the following x86-64 code to Y86-84 code: long arith(long int x, long int y, long int z) { return (x+y+z) * (x+4+48*y) } In
Convert the following x86-64 code to Y86-84 code:
long arith(long int x, long int y, long int z) {
return (x+y+z) * (x+4+48*y)
}
In x86-84:
leaq (%rsi, %rsi,2), %rax
salq $4, %rax
leaq 4(%rdi,%rax), %rax
addq %rdi, %rsi
addq %rdx, %rsi
imulq %rsi, %rax
ret
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
