There is no problem.

Segher is concerned that -mcpu=powerpc64, which is suppose to generate
"generic" PPC64 code produces mftb instead of mfspr.

And the MFTB instruction is phased out of the architecture.  I was
under the impression that now or in the near future there would be
implementations where MFTB does not work.  Hopefully this will
never happen.

However, there
is no right answer and it is unclear if it is better for
-mcpu=powerpc64 to support the most processors now or only forward
compatibility for the future.  for the moment, working on all PPC64
systems seems like the better option.  we can revisit this in the
future when POWER3 is even father in the past.

Yes, my concern is that if you compile code as "generic", it will
not work on too new systems.  This would be rather unfortunate.

There are more catches...  You focus on 64-bit, but MFTB is also
phased-out for 32-bit implementations.  Also, assemblers will under
certain circumstances emit MFSPR insns where you wrote MFTB.

It's a huge mess.

Let's just use what you have now, and we can tune this decision in
the future.  The far, far future, hopefully :-)


Segher

Reply via email to