There is a code block like MIPS, I want to convert this code to stack machine code. I've hesitated about its correctness. I m not sure about how to move value from "a" to "r1". Is it true? Thank you.
- lw r1,a
- lw r2,b
- add r3,r1,r2
sw r3,c
Stack machine code
- lvalue r3
- push a
- push b
- +
- :=