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

unsigned DI->[SF|DF] conversion #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
DI->?F mode conversion does not work. we need to define expands that will
take care of the high bit (too complex for a simple insn).

default expands do not generate correct code, see output of attached test
case on SX and on an i386.

Original issue reported on code.google.com by jmoc...@gmail.com on 8 Dec 2008 at 4:22

Attachments:

GoogleCodeExporter commented 8 years ago
actually, default expands should be OK: checked assembler code, and it provides
correct semantics.

DI->SF works OK in all cases.

otoh, DI->DF has a problem with converting unsigned 64 bit numbers in the range 
0xFF
... FC00 - 0xFF ... FFFF, yielding in-mem representation 0x43efffffffffffff 
instead
of correct 0x43f0000000000000. strangely enough, this seems to be caused by hw. 
for
0x00 ... 0000 - 0xFF ... FB00, conversion is OK.

should we special-case the top interval?

Original comment by jmoc...@gmail.com on 9 Dec 2008 at 12:46

GoogleCodeExporter commented 8 years ago
just a side note: the above problem with high number DI->DF conversion will not
affect divdi3 code, as we need to do it in sw for numbers larger or equal than 
2^53,
anyway (only 52 bits for the mantissa in double IEEE-754 binary format).

Original comment by jmoc...@gmail.com on 9 Dec 2008 at 4:32

GoogleCodeExporter commented 8 years ago

Original comment by jmoc...@gmail.com on 9 Dec 2008 at 4:38

GoogleCodeExporter commented 8 years ago
this is due to SX hw fp semantics. won't fix. use soft-float for strict 
gcc-compliant
behaviour.

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