UP | HOME

HW17
COP-3402

Take the following SimpleIR program:

function myfunc
localvars var1 x retval
x := 1
retval := x
return x
  1. Draw a stack frame for myfunc. Notice that there are no parameters. Be sure to include, the return address, old base pointer, and local variables.
  2. Write the assembly-code version of the above function, including function definition, prologue, epilogue, assignments, and return value.

Author: Paul Gazzillo

Created: 2024-11-05 Tue 08:07

Validate