Question: 1. Convert each of the below C code snippet to LEGv8 assembly code. Assume variables a, b, and c are stored in registers X20, X21,

1. Convert each of the below C code snippet to LEGv8 assembly code. Assume variables a, b, and c are stored in registers X20, X21, and X22 respectively and 2021 Robin Pottathuparambil Page 1 of 2 are 64-bits non-zero positive integer. Base address of d is stored in register X19. Do not use multiply and divide instruction. Comment your assembly code. a. if (a != b) d[1] = a + b; (14 Points) else d[2] = a - b; == b) (30 points) b. while (d[a] { d[b] = a + 2*b; d[a/4] = b - C; a++; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
