The GATE Grind

GATE 2007 CS – Question 54

Compiler Design · Intermediate Code Generation · 2 marks · Multiple choice

A simplified computer has2 registers. OP Rj, Ri computes Rj OP Ri into Ri; OP m, Ri computes memory[m] OP Ri into Ri. OP is ADD/SUB. MOV m, Ri loads memory; MOV Ri, m stores. Operands start in memory; final result must be in memory. What minimum MOV count implements this basic block?

t1=a+b
t2=c+d
t3=e−t2
t4=t1−t3
  1. 2
  2. 3
  3. 5
  4. 6

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) 3

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Intermediate Code Generation questions

All Intermediate Code Generation questions →