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

movdi doesn't work for long long immediates #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Whenever movdi (case 2b) is appearing in the RTL dump, the results will be
bogus. An example is attached. The problem is the general immediate case
for long long type variables.

sxcc is solving this by storing the constant into the local pool and just
loading it. This is slower than putting it together from two or three
instructions which are anyway in the I-cache. The current approach in the
sx.md file is wrong, anyway (lea won't load an immediate).

Original issue reported on code.google.com by efo...@gmail.com on 26 Sep 2008 at 6:03

Attachments:

GoogleCodeExporter commented 8 years ago
Solved with svn r81 checkin.

Interestingly, with -O0 the immediate load made of multiple instructions is in, 
but
is optimized out with -O1, where the llong constant goes to the local constant 
pool.

Original comment by efo...@gmail.com on 30 Sep 2008 at 9:57