Patch to enable build on s390x

Andreas Krebbel krebbel at linux.vnet.ibm.com
Tue Sep 20 14:19:54 CEST 2011


On 09/19/2011 11:43 AM, Torbjorn Granlund wrote:
> Andreas Krebbel <krebbel at linux.vnet.ibm.com> writes:
> 
>   On 09/19/2011 09:57 AM, Torbjorn Granlund wrote:
>   > I think we should port GMP properly, not merely apply a patch that works
>   > around one observed problem.
>   
>   Here is a preliminary version of the patch. I did the tuning for 31 and 64 on the latest
>   CPU generation: zEnterprise z196.
>   
> I suppose one should ideally identify the various CPU types, otherwise
> tuning might not be as beneficial as one might hope.  Does
> virtualisation prevent us from such identification?

Ok. Done. No virtualization will not prevent us from identifying the CPU.

> There seem to be no support for ABI=32 for "s390x", as per Marc Glisse's
> patch.  I take it that s390x is an instruction set, and that we will
> want either generate sie 32bit code that will also run on "s390", or
> generate some 32bit code that takes advantage of any (32bit-)
> instructions added to s390x.

Ok. Done.

> Your change to tune/time.c seems to affect 32-bit s390 too.  Is that
> intensional?  Is it known to be beneficial?  Did you look at change log
> history to see any motives for the current code?

Yes that's intentional. clock_gettime should be the better choice for both platforms.
Using STCK directly has a higher resolution but is not stopped when the CPU is taken away
from your system so in general the results will not be reliable when trying to measure the
CPU cycles spent for a certain workload.

I've attached the current version of the patch already to the other mail. I'll come back
with a close to final version after debugging the testcase failure on z196.

Bye,

-Andreas-


More information about the gmp-bugs mailing list