CONTROL registerThe CONTROL register ควบคุม the stack ที่ใช้และ the privilege level สำหรับ software execution เมื่อ the processor อยู่ใน Thread mode. ดู the register summary ใน Table 2 บนหน้า 15 สำหรับ attributes ของมัน. Figure 8 แสดง the bit assignments.


The Handler mode ใช้ the MSP เสมอ, ดังนั้น the processor จะละเว้นการเขียนที่ชัดเจนไปยัง the active stack pointer bit of the CONTROL register เมื่ออยู่ใน Handler mode. The exception entry และ return mechanisms จะอัฟเดต the CONTROL register.
ใน an OS environment, ขอแนะนำว่า threads ที่ทำงานใน Thread mode ใช้ the process stack และ the kernel and exception handlers ใช้ the main stack.
โดยเริ่มต้น, Thread mode ใช้ the MSP. เพื่อสลับ the stack pointer ที่ใช้ใน Thread mode ไปเป็น the PSP, ใช้ the MSR instruction เพื่อเซ็ต the Active stack pointer bit เป็น 1, ดู MSR บนหน้า 101.
เมื่อเปลี่ยน the stack pointer, software ต้องใช้ an ISB instruction ทันทีหลังจาก the MSR instruction. นี้เพื่อให้แน่ใจว่า instructions หลังจาก the ISB execute จะใช้ the new stack pointer. ดู ISB บนหน้า 100