FIX and flags

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

FIX and flags

Postby alexrp » Sun Jan 05, 2014 9:45 am

I don't really understand the flag settings of the FIX instruction. Is the manual wrong or does it really set the flags based on a floating point interpretation of the *fixed point* result in RD? If it does, that seems quite pointless.
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: FIX and flags

Postby alexrp » Sun Jan 05, 2014 9:52 am

Similarly, FLOAT appears to compare an input fixed point value to NaN, which would also appear to make little sense.
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: FIX and flags

Postby aolofsson » Mon Jan 06, 2014 12:27 am

Thanks for catching this!

The FIX instruction checks if the RN input is NAN and sets the BI flag accordingly. (was there something else?)

The FLOAT instruction documentation was a "copy/paste" mistake that needs to get fixed (no checking for NAN there of course)
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: FIX and flags

Postby alexrp » Sat Jan 11, 2014 6:04 pm

What about other flags like BN, BZ, BV, BVS, BUS? Does FIX touch those?
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: FIX and flags

Postby notzed » Fri Jan 17, 2014 1:41 am

It's a real bummer these don't take the number of bits to fix to/from.
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: FIX and flags

Postby alexrp » Tue Feb 04, 2014 1:53 pm

@aolofsson - ping :)
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 132 guests