What does the instruction FCOMP compare ? I mean what does gets compared with ? goatass
Posted on 2000-12-06 19:41:00 by goatass
Hi goatass. gets compared to ST and sets the condition codes of the status word according to the result. The instruction, FCOMP , subtracts the source operand () from ST without changing either operand. Here, we're dealing with coprocessor architecture (FCOMP obviously being a coprocessor instruction). The 80486 coprocessor, as well as earlier, all have a register stack made up of eight 80-bit data registers. These can contain floating-point numbers in the temporary real format. These eight data registers are known as ST, ST(1), ST(2), ST(3), ST(4), ST(5), ST(6) and ST(7). Their format is, from right to left, bit 0 through bit 63 is the decimal part. Bit 64 through bit 79 is the exponent and bit 80 is the sign bit. The coprocessors also have 14 bytes of control registers. The format is Control Word (2 bytes), Status Word (2 bytes), Tag Word (2 bytes), Instruction Pointer (4 bytes) and Operand Pointer (4 bytes). So, after FCOMP, the condition codes get set in the Status Word control register above.
Posted on 2000-12-06 23:31:00 by vReal