fstcw assembly operand type mismatch
问题 I'm trying to round an input double using a specified rounding mode in in-line assembly in C. To do so, I need to grab the FPU control word using "fstcw" and then change the bits in the word. Unfortunately I'm encountering an error on the very first line: double roundD(double n, RoundingMode roundingMode) { asm("fstcw %%ax \n" ::: "ax"); //clobbers return n; } The assembler error I receive is: "Error: operand type mismatch for 'fstcw'." I'm under the impression this code snippet should store