x86 assembler: floating point compare
问题 As part of a compiler project I have to write GNU assembler code for x86 to compare floating point values. I have tried to find resources on how to do this online and from what I understand it works like this: Assuming the two values I want to compare are the only values on the floating point stack, then the fcomi instruction will compare the values and set the CPU-flags so that the je , jne , jl , ... instructions can be used. I'm asking because this only works sometimes. For example: