Question: This question will focus on the ARM Cortex-M4 processor and its instruction set. The following assembly functions assume adherence to the ARM Procedure call standard.

 This question will focus on the ARM Cortex-M4 processor and its

This question will focus on the ARM Cortex-M4 processor and its instruction set. The following assembly functions assume adherence to the ARM Procedure call standard. For the following assembly code functions, write a C code function with equivalent behaviour. Assume all function arguments and return values are int32_t, or pointers to int32_t values. Ideally when compiled your C code must result in the same assembly code. You can verify your code using Compiler Explorer. DO NOT USE GOTO statements. 1. mul ro, ro, ro (3 marks) bx Ir 2. Idr ro, [ro] (5 marks) mul ro, ro, ro bx Ir 3. add ro, ro,r1 (4 marks) add ro, ro, r2 add ro, ro, r3 bx This question will focus on the ARM Cortex-M4 processor and its instruction set. The following assembly functions assume adherence to the ARM Procedure call standard. For the following assembly code functions, write a C code function with equivalent behaviour. Assume all function arguments and return values are int32_t, or pointers to int32_t values. Ideally when compiled your C code must result in the same assembly code. You can verify your code using Compiler Explorer. DO NOT USE GOTO statements. 1. mul ro, ro, ro (3 marks) bx Ir 2. Idr ro, [ro] (5 marks) mul ro, ro, ro bx Ir 3. add ro, ro,r1 (4 marks) add ro, ro, r2 add ro, ro, r3 bx

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 Accounting Questions!