Two days old build breakage on i386.

Johan Tibell johan.tibell at
Mon Jun 30 20:14:06 UTC 2014

I fixed the x86 issue and re-commited my work as

On Fri, Jun 27, 2014 at 1:27 PM, Simon Marlow <marlowsd at> wrote:
> On 27/06/2014 12:23, Johan Tibell wrote:
>> On Fri, Jun 27, 2014 at 1:14 PM, Simon Marlow <marlowsd at> wrote:
>>> The problem is that this instruction requires three separate registers,
>>> but
>>> cmpxchgl already reads and writes %eax leaving only two free registers
>>> (%ecx
>>> and %edx).
>>> You'll need to arrange to not use the complicated addressing modes with
>>> cmpxchg on i386, and keep the number of free regs required <= 2.
>> Where's the best place to arrange for that? If I switch from using
>> getAmode to computing the address into a temp register in StgCmmPrim
>> will that ensure that the address is simple, or could some
>> optimization replace my temp register computation with a complex
>> address again?
> There aren't any optimisations that happen on the instructions after
> codegen, and if there were, they would have to respect the same rule. So
> using a register is the right thing, yes.
> Cheers,
> Simon

More information about the ghc-devs mailing list