This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C, C++] fundamental type object representation


Gabriel Dos Reis wrote
> Paul Schlie writes:
> [...]
> | > OK, thanks.  I was rewriting part of valarray and I saw I made that
> | > assumption, and since it is bug chasing time I thought I should make
> | > sure my use of memset() isn't going to bomb out.
> | 
> | - If of any help, the c4x's float format is: [exp:8|sign:1|fract:23]
> |   where the exponent is encoded in 2's complement form thereby:
> | 
> |   (float)0  :: [0|0|0] :: 1.0*2^0 :: 1.0
> | 
> |   and further defined that an exponent of -128 regardless of the value
> |   of it's sign and fraction fields is interpreted as 0.0, thereby:
> | 
> |   (int)0.0 :: (int)X*2^-128 :: may = (int)[-128|0|0] :: -2,147,483,648
> | 
> |   So if it's defined that non otherwise initialized static data fields
> |   are initialized to all zero's, then correspondingly such floats will be
> |   interpreted as being initialized to 1.0 as far as the c4x is concerned;
> |   which may or may not be ok, but possibly reasonable if simply known to
> |   the the case?
> 
> That may probably be OK -- I haven't heard of a C4X user doing
> instensive computations with valarray.  But I guess I'll stick to the
> explicit loop and avoid having to revisit the valarray mess again.
> 
> However, Ian and you have intrigued me; do you have a (preferably
> online) reference to C4X model?

- General TI DSP Docs:

 http://focus.ti.com/dsp/docs/dspsupporttechdocs.tsp?sectionId=3&tabId=409&t
echDoc=6&familyId=497&documentCategoryId=6

- c4x User Guide:

 http://focus.ti.com/lit/ug/spru063c/spru063c.pdf




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]