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

Discussion

Generating code for a procedure call requires the code generator to

  • A.determine the number of times the call will execute
  • B.follow the calling convention of the target platform
  • C.inline the whole body of the called procedure
  • D.allocate registers for the callee's local variables

Answer: B

The convention fixes where arguments and the return value go and which registers the callee may destroy. Departing from it breaks interoperability with code compiled elsewhere. Library calls in particular depend entirely on the convention being honoured.

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

Post your comment

Please log in or register to post a comment.