Question: Assignment Two (100 points) In this assignment, you will practice procedures (functions) in MIPS assembly language. The code you write to satisfy these problems must

 Assignment Two (100 points) In this assignment, you will practice procedures(functions) in MIPS assembly language. The code you write to satisfy theseproblems must conform to the procedure calling convention discussed in class. Eachmain program or function must conform to this convention strictly. Do not

Assignment Two (100 points) In this assignment, you will practice procedures (functions) in MIPS assembly language. The code you write to satisfy these problems must conform to the procedure calling convention discussed in class. Each main program or function must conform to this convention strictly. Do not take liberties in a caller, for example, based on your intimate knowledge of what registers the callee uses Part One (25 points) Description Part One covers leaf functions which do not allocate a stack frame On entry to a function, the procedure calling convention specifies your first four arguments are in the a-registers. There are locations for you to save them on the stack if you need to starting at o (sp) your later arguments are on the stack at the correct offsets. This means your fifth argument would be at 16(Ssp).etc. you can use all the a-registers, the v-registers and the t-registers without worrying about saving them. You may not use the s-registers. add6.s This leaf function simply adds together all six of its integer arguments and returns the result. The starting point in the procedures directory uses 6 constant integers to invoke a single call of your function add6 (), then outputs the result. You can modify the constant integers to run your function with different input. This function is very simple, and is very important to ensure you understand how to access arguments past the first four. Assignment Two (100 points) In this assignment, you will practice procedures (functions) in MIPS assembly language. The code you write to satisfy these problems must conform to the procedure calling convention discussed in class. Each main program or function must conform to this convention strictly. Do not take liberties in a caller, for example, based on your intimate knowledge of what registers the callee uses Part One (25 points) Description Part One covers leaf functions which do not allocate a stack frame On entry to a function, the procedure calling convention specifies your first four arguments are in the a-registers. There are locations for you to save them on the stack if you need to starting at o (sp) your later arguments are on the stack at the correct offsets. This means your fifth argument would be at 16(Ssp).etc. you can use all the a-registers, the v-registers and the t-registers without worrying about saving them. You may not use the s-registers. add6.s This leaf function simply adds together all six of its integer arguments and returns the result. The starting point in the procedures directory uses 6 constant integers to invoke a single call of your function add6 (), then outputs the result. You can modify the constant integers to run your function with different input. This function is very simple, and is very important to ensure you understand how to access arguments past the first four

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!