Question: Consider the following C program fragment dealing with floating-point values: a[i] = p * q; c = a[j]; The compiler cannot establish that I
a[i] = p * q;
c = a[j];
The compiler cannot establish that I ≠ j, but has reason to believe that it probably is.
a. Write an IA-64 program using an advanced load to implement this C program. The floating-point load and multiply instructions are ldf and fmpy, respectively.
b. Recode the program using predication instead of the advanced load.
c. What are the advantages and disadvantages of the two approaches compared with each other?
Step by Step Solution
3.48 Rating (148 Votes )
There are 3 Steps involved in it
a fmpy t p q floatingpoint multiply ldfa c rj advanced floating point load load value stored in ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
896-C-S-S-A-D (2683).docx
120 KBs Word File
