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.

[参考译文] TMS570LC4357:使用 NaN 生成 FPU 无效中断

Guru**** 2468460 points
Other Parts Discussed in Thread: TMS570LC4357

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1054806/tms570lc4357-fpu-invalid-interrupt-generation-using-nan

器件型号:TMS570LC4357

我已经配置 了 TMS570LC4357来启用 FPU、并配置了微控制器协处理器辅助 寄存器来启用 FPU 无效和零除异常的生成。  VIM 中断47已被启用并被配置为生成一个 IRQ 中断请求。

除零异常按预期运行。

使用 NaN 进行测试时的无效异常在使用或 FPU 生成信号 NaN 时似乎按预期工作。  但在软件中传播相当 NaN、直到遇到与异常指令的浮点比较、然后生成无效异常。

是否有方法可以通过编译器开关或微控制器配置强制为所有 FPU 操作生成信号 NaN?  我们使用的是 TI ARM 优化 C/C++编译器
v18.12.0.LTS。   

提前感谢。

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

    尊敬的 Kevin:

    对于所有 FPU 操作、我不知道强制生成信号 NaN 的任何方法。