Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么AMD的GCN和VEGA指令集中没有“V_SUB_F64”指令?他们如何实现双精度减法?
在指令集架构文档的第 6.2.1 节“指令输入”中,它说:
使用 VOP3 形式以及使用浮点输入的指令可以选择对任何输入操作数应用绝对值(ABS 字段)或取反(NEG 字段)。
V_ADD_F64被列为 VOP3 编码指令,因此您可以对一个或两个操作数取反以产生(a + b)、(a - b)、(-a + b)或(-a - b).
V_ADD_F64
(a + b)
(a - b)
(-a + b)
(-a - b)