#include int main(void) { float x = 2.0; float y = 5.0; asm("fld %1\n\t" "fld %2\n\t" "fxch\n\t" // swap "fsubp\n\t" // subtract and pop "fstp %0\n" // halt FPU and store result : "=m"(x) // output (%0) : "m"(x), "m"(y) // input (%1, %2) ); fprintf(stderr, "%.4f\n", x); }