Assume that the instruction set of a processor includes the instruction MultiplyAccumulate Ri, Rj, Rk that performs
Question:
Assume that the instruction set of a processor includes the instruction
MultiplyAccumulate Ri, Rj, Rk
that performs the operation Ri ⟵ [Ri] + [Rj] +x [Rk] using processor registers Ri, Rj, and Rk.
Such an instruction is described in Section 2.12.1
Assume that the compiler does not use this instruction when it generates assembly-language output. Assume that there are three variables X, Y, and Z defined as global variables in a C program. Write a function mult_acc XYZ in the C language that uses the Multiply-Accumulate instruction to compute X = X + Y x Z. Note that the
Compiler-enerated assembly-language instructions in this function and in the calling program may use processor registers to hold data.
Horngrens Financial and Managerial Accounting
ISBN: 978-0133866292
5th edition
Authors: Tracie L. Nobles, Brenda L. Mattison, Ella Mae Matsumura