Where is my mistake? I need to find maximum value among three values that stored in registers X19,X20,X21. After maximum value was found I need to add it to register X24. Please do not use MOV,COMP, do not load values using LDUR or LDR. Code is LEGv8. Here is my code: SUB X25, X19, X20 CBZ X25, l1 SUB X26, X19, X21 CBZ X26, l2 ADD X24, X24, X19 B done l1: SUB X26,X20,X21 CBZ X26, l2 ADD X24, X24, X20 B done l2: ADD X24,X24,X21 done:
Where is my mistake? I need to find maximum value among three values that stored in registers X19,X20,X21. After maximum value was found I need to add it to register X24. Please do not use MOV,COMP, do not load values using LDUR or LDR. Code is LEGv8. Here is my code: SUB X25, X19, X20 CBZ X25, l1 SUB X26, X19, X21 CBZ X26, l2 ADD X24, X24, X19 B done l1: SUB X26,X20,X21 CBZ X26, l2 ADD X24, X24, X20 B done l2: ADD X24,X24,X21 done:
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.1: Addresses And Pointers
Problem 2E
Related questions
Question
Where is my mistake? I need to find maximum value among three values that stored in registers X19,X20,X21. After maximum value was found I need to add it to register X24. Please do not use MOV,COMP, do not load values using LDUR or LDR. Code is LEGv8. Here is my code:
SUB X25, X19, X20
CBZ X25, l1
SUB X26, X19, X21
CBZ X26, l2
ADD X24, X24, X19
B done
l1:
SUB X26,X20,X21
CBZ X26, l2
ADD X24, X24, X20
B done
l2:
ADD X24,X24,X21
done:
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr