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.
工具与软件:
您好!
我在我的项目中放置了一个装配管道。
输出格式为 EABI。 我在 C 文件中调用的函数的原型为: extern float32_t asmfuncEQDIM (float32_t * flt_tabx、float32_t * flt_taby、uint16_t uint16_Dim);
该函数在 asm 文件中定义(以下是网关的开头):
因此、当我调用该函数时、我会修改 XAR4、XAR5、ACC 和 R0H 寄存器。
在网关中,我修改了 XAR7, R3H, R7H,...
在主例程中调用它时、一切都正常。
但在函数中调用它时会出现错误。 我希望编译器会保存所需的每个寄存器、但看起来并非如此。
所以、我在网关中处理的寄存器可能会干扰调用网关的函数。
您能否说明在函数中使用汇编函数的正确方法? (什么保存,如何做它...)
谢谢你
请参阅 spru514的第7.3节