gcc汇编扩展寄存器

时间:2018-09-03 09:39:29

标签: gcc inline-assembly

我必须使用什么参数/约束来告诉编译器使用扩展寄存器对作为输出/输入?

static inline void mac_dsp(int64_t *c, uint32_t a, uint32_t b){
    //This does not compile - "madd.u [%a15]0,[%a15]0,%d15,%d2: Too many operands"      
    __asm__ ("madd.u  %0,%0,%1,%2" : "+m" (*c) : "d" (a), "d" (b));

    //This does compile but I don't explicitly want to use e2 only but let the compiler 
    //chose which one...
    __asm__ ("madd.u  %%e2,%%e2,%1,%2" : "+m" (*c) : "d" (a), "d" (b));
}

有人可以在这里帮助我吗?谢谢!

0 个答案:

没有答案