Discussion
Code generation for a stack machine differs from that for a register machine in that it
Answer: A
Correct answer: needs no register allocation, since operands are on a stack
A stack machine takes its operands from the top of the stack implicitly, so there are no registers to allocate and code generation reduces to a postorder walk of the expression tree. That simplicity is why stack code is used for portable intermediate forms - and why it is slower than register code on real hardware.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development