Menu

[solved]-1 Write Armv8 Assembly Function Find Median Unsorted Array Odd Number Elements Inputs Func Q39057878

1. Write an ARMv8 assembly function to find the median of an unsorted array which has odd number of elements. The inputs to t

——————-

you can solve it using either ARMv8 orLEGv8

please comment the code

1. Write an ARMv8 assembly function to find the median of an unsorted array which has odd number of elements. The inputs to the function are: base address of the array (passed through X1) and the length of the array (passed through X2). Store the result (median) in Xo. Assume all the registers are used by the caller except the registers used for passing the parameters to and from the function. Write a main assembly function to test the assembly function. Create a static array that is stored in the data section and pass the base address of the static array to test the function. The size of the array is defined in register X20. Store the median in X21. Assemble, test, and simulate the assembly code using DS-5 simulator. Do not upload the entire DS-5 project. Only upload the assembly file (.S file) from the DS-5 project to Canvas. Comment your assembly code. (30 Points) Show transcribed image text 1. Write an ARMv8 assembly function to find the median of an unsorted array which has odd number of elements. The inputs to the function are: base address of the array (passed through X1) and the length of the array (passed through X2). Store the result (median) in Xo. Assume all the registers are used by the caller except the registers used for passing the parameters to and from the function. Write a main assembly function to test the assembly function. Create a static array that is stored in the data section and pass the base address of the static array to test the function. The size of the array is defined in register X20. Store the median in X21. Assemble, test, and simulate the assembly code using DS-5 simulator. Do not upload the entire DS-5 project. Only upload the assembly file (.S file) from the DS-5 project to Canvas. Comment your assembly code. (30 Points)

Expert Answer


Answer to 1. Write an ARMv8 assembly function to find the median of an unsorted array which has odd number of elements. The inputs… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *