You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
探究 gcc 浮点数精度转换所使用的指令 —— use_vector_fp_converts 优化
在学习 浮点数精度转换指令 时,CS:APP 里提到 gcc 并不使用 vcvtss2sd/vcvtsd2ss,而是使用 vunpcklps & vcvtps2pd / vmovddup & vcvtpd2psx,但是我使用 gcc 12.2.0 编译得到的结果就是 vcvtss2sd/vcvtsd2ss。对此,CS:APP 没有深究:
It is unclear why GCC generates this code. There is neither benefit nor need to have the value duplicated within the XMM register.
但是 CS:APP 选择放弃反而会激发读者的斗志啊(
虽然但是,我确实没想到这玩意会让我断断续续搞了三天,ddl 又要寄了 🌚
https://ouuan.moe/post/2022/10/gcc-use_vector_fp_converts
Beta Was this translation helpful? Give feedback.
All reactions