This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] 编译器/MSP430FR5969:GCC 编译器在调用另一个函数的 ISR 中节省的寄存器比所需的更多

Guru**** 2562120 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/799398/compiler-msp430fr5969-gcc-compiler-saves-more-registers-than-required-in-an-isr-that-calls-another-function

器件型号:MSP430FR5969

工具/软件:TI C/C++编译器

我以前曾抱怨过这一点、但似乎在最新版本中未修复。 即使是仅调用另一个函数的简单 ISR、也会以"pushm #12、R15"开头、而只需要"pushm #4、R15"即可。

被调用函数用于保存和恢复 R12以下的任何寄存器、因此这只会浪费堆栈空间和时间。