In a simplified computer the instructions are: OP Rj , Ri - Performs Rj OP Ri and stores the result in register . Ri OP m, Ri - Performs val i OP Ri and stores the result in Ri. val denotes the content of memory location m. MOV m, Ri - Moves the content of memory location m to register Ri MOV Ri , m - Moves the content of register Ri to memory location m. The computer has only to registers, and OP is either ADD or SUB. Consider the following basic block: t1 = a + b t2 = c + d t3 = e - t2 t4 = t1 - b Assume that all operands are initially in memory. The final value of the computation should be in memory. What is the minimum number of MOV instructions in the code generated for this basic block?
Reveal answer
Fill a bubble to check yourself
Keep practicing — related questions
- Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. |||| |---|---...
- Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. |||| |---|---...
- Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. |||| |---|---...
- Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. |||| |---|---...
- Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. |||| |---|---...
- Direction: The following code segment is executed on a processor which allows only register operands in its...
- Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. |||| |---|---...
- Consider the following program segment for a hypothetical CPU having three user registers Rl R2 and R3. Ins...
