1 / 5

Floating Point Processor Condition Bit

The MIPS Floating Point Accelerator (FPA) chip (now, usually part of the processor chip) has a condition bit that is set to 0 or 1 to indicate if a condition is false or true . Several FPA instructions affect this bit and several CPU instructions test this bit.

robinw
Télécharger la présentation

Floating Point Processor Condition Bit

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The MIPS Floating Point Accelerator (FPA) chip (now, usually part of the processor chip) has a condition bit that is set to 0 or 1to indicate if a condition is false or true. Several FPA instructions affectthis bit and several CPU instructions testthis bit. Early MIPS floating point was done on a separate chip. Special instructions were used to bridge the gap between the two chips (such as the two move instructions mtc1 and mfc1 we have already seen). Although these days there is usually just one processor chip, some of the instructions act as if the chips were separate. Floating Point Processor Condition Bit

  2. Floating Point Comparison Instructions • These instructions change the value in the condition bit, a part of the processor. • The condition bit is set(made equal to one) if the condition is true. • Otherwisethe condition bit is cleared(made equal to zero).

  3. Floating Point Comparison Instructions • Testing if two floating point numbers are exactly equal is sometimes NOT a good idea. • Floating point calculations are not exact. • Sometimes values are not equal even though mathematically they should be. • It is best to use "less than" or "less than or equal" instead of testing for exact equality.

  4. Branch Instructions and usage • There is a branch delay slot after branch instructions. l.s $f0,A l.s $f2,B c.lt.s$f0,$f2 # is A < B? bc1t printA# yes -- print A nop c.lt.s $f2,$f0 # is B < A? bc1t printB# yes -- print B nop

  5. 0xc1300000 An example. Which number is this? • The decimal number is - 99.0 (negative)

More Related