Hi,
I'm working on some stuff for a TI F28335 DSP and I have a couple of questions regarding how the TI C89-compliant compiler handles literals:
(1)
unsigned int foo = 1; (I assume the literal '1' defaults to type 'int')
Would this require more "work" (cycles/instructions) than for instance:
unsigned int foo = 1U;
(2)
float foo = 1.0F/2.0F;
I assume the compiler produces instructions for the division that are handled by the FPU, but would this:
float foo = 1.0/2.0;
then be handled in software since the type of the literals defaults to 'double' (which is 64 bit on the DSP)?
(3)
I've read a bit about FPU's on modern 32 bit CPU's having 80 bit registers for temporary values. Does this mean that I can do 80 bit floating point operations on them, e.g.:
extprecision_t foo1 = 1.123 ... (80 bit worth);
extprecision_t foo2 = 2.123 ... (80 bit worth);
extprecision_t foo3 = foo1*foo2; (80 bit result)
?
Any help is greatly appreciated, thanks!
Edit:
Regarding question 2, I just realized that it was 'long double' that was 64 bit on the DSP. 'double' is probably 32 bit. But if we assume 'double' is 64 bit, would it trap to software or the like?