Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted by asdasd ( 17 years ago )
int
asm_func (char a, char b)
{
int d = 0;
asm ( ".intel_syntax noprefix
" /* 15 */
"mov al, a
"
"add al, b
"
"adc ah, b
"
"mov d, ax "
".att_syntax prefix "
: "=r" (d)
: "a" (a), "b" (b), "c" (c)
: "%eax", "%ebx", "%ecx"
);
return d;
}
//////////
amber >gcc -o 1 1.c
1.c: In function ‘asm_func’:
1.c:15: error: can't find a register in class ‘AREG’ while reloading ‘asm’
1.c:15: error: ‘asm’ operand has impossible constraints
Revise this Paste
Children: 5331