http://d.puremagic.com/issues/show_bug.cgi?id=6189



--- Comment #2 from d...@dawgfoto.de 2011-08-29 09:56:49 PDT ---
I've further dissected this bug.

Chain of infection.
- p1 (passed in RDX) is marked as being not register candidate
  because it is used in an OPrelconst (probably p1.x/p1.y)
- => Symbol for p1 doesn't get a live range
- => blcodgen doesn't mark regcon.used for RDX because parameter isn't marked
     alive in entry block

  if (s->Sclass & SCfastpar &&
      regcon.params & mask[s->Spreg] &&
      vec_testbit(dfoidx,s->Srange))
  {
      regcon.used |= mask[s->Spreg];
  }

- => cgreg_assign for quad figures DX is a neat register to assign quad to
     (passed in RDI)
- => nobody is responsible for saving fastpars and the function prolog creates
     a mov RDX, RDI before RDX is saved

There are two things involved which work suboptimal for the ABI64 conventions.

I. The current way of marking a fastpar register as being used effectively
prevents cgreg_assign to leave them in this register.
II. With the 32 LinkD ABI there was only one register parameter. So moving it
in the function prolog couldn't conflict with other parameters.

Both of them can be improved but still they won't guarantee a proper fix for
this bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to