The core register R13 of an ARM CortexM4 processor is used a

The core register R13 of an ARM Cortex-M4 processor is used as a. Program counter. b. Link register. c. Stack pointer. There are two stacks (main stack and process stack) implemented in an ARM Cortex-M4 processor. When the processor is in handler mode, the stack used is a. main stack b. process stack. c. either main stack or process stack. Find the solutions for the following problems The prototype of a C-callable assembly function in a C program is extern int norm_sq_asm(int *p, int n); Based on the rule of the ARM Architecture Call Standard, find which core registers are used to pass the pointer p and the integer n to the assembly function and which register used for return value of the assembly function.

Solution

9) Register r13 is used as the Stack Pointer (SP). Because the SP ignores writes to bits [1:0], it is autoaligned to a word, four-byte boundary.

10) When processor is in handler mode, main stack is used because handler mode is always executed as privileged. In Handler mode the processor ignores explicit writes to the active stack pointer bit of the CONTROL register.

11) The first eight registers, r0-r7, are used to pass parameter values into a function as well as return result values from the function. They may also be used to hold intermediate values within a function (but, in general, only between function calls).

 The core register R13 of an ARM Cortex-M4 processor is used as a. Program counter. b. Link register. c. Stack pointer. There are two stacks (main stack and pro

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site