exactly where does your problem lie with your understanding? in x86, there are 8 floating point registers (st0 to st7). in general with the fpu registers, you need to push them onto the fpu stack with some instruction such as fld. then you perform a floating point operation which operates on the top register/s by default or specific registers if you mandate so in the operation operands. for example, if you pushed 1.5 then 2.5 then st0 is 2.5 and st1 is 1.5. as with all stacks, there is the notion of FILO.
There are few things i can't get, is there another stack for the fpu? or the stack is the group of stX registers?
and when you push 1.5 and 2.5 right after, how does it calculate and knows what comes before the dot and what comes after? _________________
yes the stack is a separate one. the numbers are not actually pushed as 1.5 and 2.5. instead they are approximated by a mantissa (also known as significand) and an exponent. see this well known article:
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum