“ ya”有什么? “ a”在线装配中的平均值

发布于 2025-02-08 19:56:23 字数 653 浏览 1 评论 0原文

这是我工作场所的内联汇编代码:

 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;
 }

yaa的意思是什么?

这是一个典型示例的代码。 通常,它似乎使用%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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文