A
Size: a a a
A
AV
ЕК
ЕК
AV
ЕК
DS
AV
ЕК
ЕК
DS
ЕК
Clobber descriptions may not in any way overlap with an input or output operand. For example, you may not have an operand describing a register class with one member when listing that register in the clobber list. Variables declared to live in specific registers (see Explicit Register Variables) and used as asm input or output operands must have no part mentioned in the clobber description. In particular, there is no way to specify that input operands get modified without also specifying them as output operands.
ЕК
#include <stdio.h>Результат:
#define mov_blk(src, dest, numwords) \
__asm__ __volatile__ (\
"cld\n\t" \
"rep\n\t" \
"movsl" \
: \
: "S" (src), "D" (dest), "c" (numwords) \
: "%ecx", "%esi", "%edi" \
)
int main()
{
int a[10],b[10];
mov_blk(a,b,10);
return 0;
}
1.cpp:16:18: error: 'asm' operand has impossible constraints
16 | mov_blk(a,b,10);
ЕК
AV
AV
ЕК
AV
AV