简体   繁体   English

霓虹灯指令vsub_f32(a,b),是ab还是ba?

[英]Neon instruction, vsub_f32(a, b), is it a-b or b-a?

In this neon instruction (from here ): 在此霓虹灯指令中(从此处开始 ):

float32x2_t vsub_f32(float32x2_t a, float32x2_t b);  // VSUB.F32 d0,d0,d0

Does it return a - b or b - a? 它返回a-b还是b-a? I cannot find it in the ARM documentation... 我在ARM文档中找不到它...

The VSUB instruction subtracts the value in the second operand register from the value in the first operand register, and places the result in the destination register. VSUB指令从第一个操作数寄存器中的值减去第二个操作数寄存器中的值,并将结果放入目标寄存器。

from http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Bcffigdj.html 来自http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Bcffigdj.html

So, it´s ab 所以,它是ab

You may find the expanded documentation for the Neon Intrinsics more useful. 您可能会发现有关Neon Intrinsics的扩展文档更加有用。 It also gives the mapping from functions parameters to instruction operands, and is available from: 它还提供了从函数参数到指令操作数的映射,并且可以从以下位置获得:

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf http://infocenter.arm.com/help/topic/com.arm.doc.ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf

For vsub_f32 , that document gives the following: 对于vsub_f32 ,该文档提供以下内容:

float32x2_t vsub_f32 (float32x2_t a, float32x2_t b)
a → Vn.2S b → Vm.2S
FSUB Vd.2S,Vn.2S,Vm.2S

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM