jkmcnk / sx-gcc

The GNU Compiler Collection port to NEC SX CPU architecture.
GNU General Public License v2.0
0 stars 2 forks source link

floating point variables translate into a series of "long" pseudo-instructions #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is not a bug, rather an observation.

I noticed that sx-gcc translates floating point types (float, double) into
a series of "long" pseudo-instructions instead of "float", "double"
pseudo-instructions.

To be a little more concrete, in the example below:

{{{
int
main (void)
{
  double f1 = 1.999;
  double f2 = 2.999;
  printf("f1 = %f\n", f1);
  printf("f2 = %f\n", f2);
  return 0;
}
}}}

the "f1" variable is translated into: 
  long 1073740775
  long 1821066134
instead of:
  double 1.999.

Similarly, the "f2" variable is translated into:
  long 1074265587
  long -1236950581
instead of:
  double 2.999.

Of course, all the programs work fine even with the series of longs in
place of float/double, so this is mostly an aesthetical "issue".

Original issue reported on code.google.com by nou...@gmail.com on 27 Oct 2008 at 2:46

GoogleCodeExporter commented 8 years ago

Original comment by jmoc...@gmail.com on 15 Jan 2009 at 12:32