“ ya”有什么? “ a”在线装配中的平均值
这是我工作场所的内联汇编代码:
static __inline__ int16 mulI16_I16byI16RndDiv64(int16 a, int16 b) //
{
int16 result;
int16 result2; /* clobbering of the register */
__asm__ __volatile__ (
"muls YA, A, %w3\n\t"
"add YA, #32\n\t"
"asr YA, #6\n\t"
"adc A, #0"
: "=a" (result), "=y" (result2)
: "%a" (a), "r" (b)
);
return result;
}
ya
,a
的意思是什么?
这是一个典型示例的代码。 通常,它似乎使用%0%1
存储输入和输出。
int src = 1;
int dst;
asm ("mov %1, %0\n\t"
"add $1, %0"
: "=r" (dst)
: "r" (src));
printf("%d\n", dst);
This is inline assembly code at my workplace:
static __inline__ int16 mulI16_I16byI16RndDiv64(int16 a, int16 b) //
{
int16 result;
int16 result2; /* clobbering of the register */
__asm__ __volatile__ (
"muls YA, A, %w3\n\t"
"add YA, #32\n\t"
"asr YA, #6\n\t"
"adc A, #0"
: "=a" (result), "=y" (result2)
: "%a" (a), "r" (b)
);
return result;
}
What does YA
, A
mean?
Here is the code of a typical example.
Generally, it seems to use %0 %1
to store input and output.
int src = 1;
int dst;
asm ("mov %1, %0\n\t"
"add $1, %0"
: "=r" (dst)
: "r" (src));
printf("%d\n", dst);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论