[m-dev.] Building Mercury in i386

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jul 4 17:46:43 AEST 2011


On Fri, 1 Jul 2011, Paul Bone wrote:

> On Fri, Jul 01, 2011 at 01:12:08AM +1000, Julien Fischer wrote:
>>
>> Hi Paul,
>>
>> On Fri, 1 Jul 2011, Paul Bone wrote:
>>
>>>
>>> Hi Guys.
>>>
>>> Has anyone built Mercury on i386 lately.  I'm building on an i386 Debian squeeze system..  I get this:
>>>
>>> ../scripts/mgnuc --grade asm_fast.gc        --      -c ml_backend.ml_closure_gen.c -o ml_backend.ml_closure_gen.o
>>> ml_backend.ml_closure_gen.c: In function 'ml_backend__ml_closure_gen_module11':
>>> ml_backend.ml_closure_gen.c:2985: error: unable to find a register to spill in class 'DIREG'
>>> ml_backend.ml_closure_gen.c:2985: error: this is the insn:
>>> (insn 123 122 124 11 ml_backend.ml_closure_gen.c:2860 (parallel [
>>>           (set (mem:SI (reg/f:SI 136) [0 S4 A32])
>>>               (reg/v:SI 1 dx [orig:80 MR_tempr3 ] [80]))
>>>           (set (reg/v:SI 82 [ MR_tempr1 ])
>>>               (plus:SI (reg/f:SI 136)
>>>                   (const_int 4 [0x4])))
>>>       ]) 852 {*strsetsi_1} (expr_list:REG_DEAD (reg/f:SI 136)
>>>       (nil)))
>>> ml_backend.ml_closure_gen.c:2985: confused by earlier errors, bailing out
>>> Preprocessed source stored into /tmp/cckqSgyE.out file, please attach this to your bugreport.
>>>
>>> This is ROTD 2011-06-23, I'm using gcc (Debian 4.4.5-8) 4.4.5
>>
>> Yes, Sebastian bumped into it the other day.  (Probably, some GCC
>> optimization is not playing nicely with the global registers extension,
>> you may be able to work around it by tweaking the C compiler flags --
>> this tends to be a problem on i386 because there aren't many registers
>> available in the first place.)
>
> Pretty much what I was thinking.
>
>>> This is probably relevent for the release.
>>
>> Yes, we will need identify the versions of GCC that exhibit this problem
>> and find workarounds for it.

I've committed a (fairly crude) workaround for this, so the source
distribution should at least compile again on this platform.

Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list