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.

[参考译文] TMS320C28346:CPU 到 FPU UI16TOF32勘误表也适用于 I16TOF32?

Guru**** 2442090 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1380206/tms320c28346-cpu-to-fpu-ui16tof32-errata-applies-to-i16tof32-too

器件型号:TMS320C28346

工具与软件:

尊敬的专家:

我对以下代码有问题:

void someFunc(int32_t someInt32, uint16_t index)
{
    float fl1 = (float)someInt32;
    float fl2 = (float)someGlobInt16Array[index];
    ...
}

其被编译为:

MOV32     R1H,XAR2
I16TOF32  R3H,*+XAR6[AR0]
...
I32TOF32  R1H,R1H

《TMS320C2834x 勘误表》所述、I16TOF32指令的结果也会加载到 R1H 寄存器中。
编译器不会通过填充 NOP 来处理此指令。
如果我输入5个 NOP、行为将消失。

MOV32     R1H,XAR2
NOP
NOP
NOP
NOP
NOP
I16TOF32  R3H,*+XAR6[AR0]

是否有建议的权变措施?

谢谢!

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

    我忘记提一下 C2000编译器版本:22.6.0.1.LTS