13.07.2015 Views

DSP56xxx C Cross-Compiler User's Guide - Tasking

DSP56xxx C Cross-Compiler User's Guide - Tasking

DSP56xxx C Cross-Compiler User's Guide - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4–92Chapter 4int i;voidfunc( char *p ){char c;char d;c = 2;d = 3;*p = 4; /* cannot write to ’c’ or ’d’, but to some otherobject */}i = c; /* ’*p’ cannot have changed the value of ’c’, *//* so ’c’ may be used from register contents *//* ––> alias checking may be OFF in this case */typedef union{struct{unsigned int exponent;_fract fraction;} binary;double value;} _FDEF;#define _FBIAS 127doublefrexp_excerpt( double value, int *exp ){double loc_value = value; /* prevent taking address ofargument ’value’ */*exp = ((_FDEF *)&loc_value)–>binary.exponent – _FBIAS;((_FDEF *)&loc_value)–>binary.exponent = _FBIAS;}if ( loc_value == –1.0 ){*exp += 1;return( –0.5 );}return( loc_value );loc_value

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!