关于浮点动态舍入模式的几个疑问 #1939
Answered
by
xiaofeibao-xjtu
HUA-FENG1995
asked this question in
Q&A
-
|
Beta Was this translation helpful? Give feedback.
Answered by
xiaofeibao-xjtu
Apr 20, 2023
Replies: 1 comment
-
首先frm是保存在在fcsr寄存器中的,rm是在浮点指令中的。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cebarobot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先frm是保存在在fcsr寄存器中的,rm是在浮点指令中的。
①动态模式是将浮点指令中的rm设置为111,此时使用fcsr寄存器中保存的frm值作为舍入模式。
②如果先将frm设为无效值(101-111),后续如果将浮点指令中的rm设置为111就会报非法指令异常,如果rm不设置为111,此时为静态舍入模式,是可以正常执行的。