问题
What parameter/constraint do I have to use in order to tell the compiler to use an extended register pair as the output/input?
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));
}
Can anyone help me here? Thank you!
来源:https://stackoverflow.com/questions/52147076/gcc-assembly-extended-register