我试图理解这个来自_hypercall0
here的内联汇编代码.
asm volatile ("call hypercall_page+%c[offset]" \ : "=r" (__res) \ : [offset] "i" (__HYPERVISOR_##name * sizeof(hypercall_page[0])) \ : "memory","edi","esi","edx","ecx","ebx","eax")
我无法找到第一行中%c的含义的信息.我没有在GCC manual最明显的部分找到任何信息,这解释了%[name],但没有找到%c [name].还有其他我应该看的地方吗?
解决方法
从
GCC internals documentation:
`%cdigit‘ can be used to substitute an operand that is a constant value without the Syntax that normally indicates an immediate operand.