I\'m trying to do a 64=32x32 multiply via the x86 mul instruction, but I only need the high dword of the result (the edx register). So naturally,
mul
edx
Just make a useless temp for the output to go into and the compiler will optimize it out. For example:
__asm__("mull\t%2" : "=d"(div10), "=a"((int){0}) : "a"(UINT32_C(0x1999999A)), "r"(number) : "cc");
That's the easiest way I know to handle clobbered inputs.