HI there.  I'm working on porting gcc to a new architecture which only
does indirect addressing - there is no indirect with displacement.

The problem is with spill locations in GCC 4.4.0.  The elimination
code correctly elimates the frame and args pointer and replaces it
with register X.  The problem is that it then generates indirect with
offset loads to load spilt values.

Normal usage such as:

struct foo
{
  int a;
  int b;
}

int bar(struct foo* p)
{
   return p->b;
}

is correctly split into load X with p, add four, and then de-references.

The RTL is generated after the IRA stage.  GCC aborts in post reload
with a 'instruction does not satisfy constraints' on:
(insn 183 181 75 3 mandelbrot.c:117 (set (reg:SI 6 R11)
        (mem/c:SI (plus:SI (reg:SI 3 X)
                (const_int -8 [0xfffffffffffffff8])) [0 %sfp+-8 S4
A32])) -1 (nil))

The movsi it matches against is:

(define_insn "movsi_insn"
  [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r,rm,rm,rm,C, rm")
        (match_operand:SI 1 "general_operand"       "r, m,I, i ,n, rm,C"))]
  ""
  "@
   LOADACC, %1\;STOREACC, %0
   LOADACC, %1\;STOREACC, %0
   LOADI, #%1\;STOREACC, %0
   LOADLONG, #%1\;STOREACC, %0
   LOADLONG, %1\;STOREACC, %0
   Foo
   Bar"
)

I believe it fails on the constraints as the 'm' constraint misses as
go_if_legitimate_address only supports (mem (reg)) and not (mem (plus
(reg...)))

I don't think I had this problem when working against 4.3.3 but I'm not sure.

Could someone point me in the right direction please?  Is it
appropriate to ask such questions on this list?

-- Michael

Reply via email to