Machine-translated by Google. Questions are authored in English.
Top

Discussion

A frame pointer is sometimes omitted from generated code in order to

  • A.reduce the number of instructions in the procedure body
  • B.allow the procedure to call itself recursively
  • C.free one more register for allocation to values
  • D.make the generated code easier for a debugger to read

Answer: C

Correct answer: free one more register for allocation to values

The frame pointer occupies a register solely to make the frame layout easy to follow, and where the frame size is known at compile time the stack pointer alone will serve. Omitting it recovers a register, which on a machine with few of them is worth having - at the cost of making stack traces harder to reconstruct.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.