chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] x32 ABI fits Chicken very well


From: Peter Bex
Subject: Re: [Chicken-users] x32 ABI fits Chicken very well
Date: Tue, 1 Sep 2015 09:53:49 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Sep 01, 2015 at 07:51:42AM +0200, Sven Hartrumpf wrote:
> Hi all.
> 
> Now that the "apply-hack" files are gone, Chicken is even more portable.
> I am happy to report that Chicken 4.10.1 builds perfectly for the x32 ABI
> ( https://en.wikipedia.org/wiki/X32_ABI ).

Wow, this is very cool!  Thank you for trying this and reporting your
experiences!  I've added it to the portability page at
http://wiki.call-cc.org/portability

> Why should you try x32 that most people ignore?
> - For garbage-intense Scheme program, you will see speed-ups of 10 to 30 %
>   compared to x86-64 because the GC has less work to do.
> - You can expect speed-ups of 20 - 30 % compared to i386 because all
>   registers are available (on a 64bit CPU) and the full CPU instruction
>   set is usable by Chicken's C compiler.

This is cool. There's one important caveat: bytevectors (ie, strings and
blobs) are limited to 16MiB.  This is the same limit that applies to i386,
which I think is one of the most important limitations of 32 bit CHICKEN.

> Write a small gccx32 script like:
> #!
> gcc -mx32 $*
> 
> > export CC=gccx32
> > export ARCH=x86-64

I'm a bit unsure about the use of the ARCH option.  Is it still needed
now that we have dropped the apply hack?  So far, it seems to be used
for Mac's universal builds (it passes a -m64 option there).  Perhaps we
can add a similar option for Makefile.linux to support x32 directly?

Can you try whether the attached patch works without requiring the
gccx32 script?  The idea is that you can do simply "make ARCH=x32"
with this.

Cheers,
Peter

Attachment: add-x32-support.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]