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.

[参考译文] TMS320F280025:如何在 C 编程期间使用 FPU 中的"Round"相关指令

Guru**** 2585275 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1037419/tms320f280025-how-to-use-round-related-instructions-in-fpu-during-c-programming

器件型号:TMS320F280025

您好、香榭丽舍

如果 我们以  "int"格式定义名为"x"的变量、以  "float"格式定义另一个变量"y"、当我们 在 C 中编写代码"y = x"时、编译后、我们可以发现在生成的".asm"文件中使用了"F32TOI16"指令。

但是、如果我们需要在 ".asm"文件中生成"F32TOI16R"指令、 我们应该如何用 C 编写代码?  

请提供帮助吗? 谢谢!

此致、

Linda