public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Unable to generate reloads
@ 2002-03-18  6:15 Alexandre Courbot
  2002-03-18  7:23 ` Alan Lehotsky
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Courbot @ 2002-03-18  6:15 UTC (permalink / raw)
  To: GCC List

Hello everybody,

I'm currently porting GCC to our architecture. I managed to get a basic
MD completed so GCC does compile, but when trying to compile the
following simple program:

char c;

int barfunc()
{
    c = 2;
}

But GCC complains:

test.c: In function `barfunc':
test.c:6: Unable to generate reloads for:

(insn 9 8 10 (set (mem/f:QI (reg/f:SI 15) 0)
        (const_int 2 [0x2])) 1 {movqi} (nil)
    (expr_list:REG_DEAD (reg/f:SI 15)
        (nil)))
test.c:6: Internal compiler error in find_reloads, at reload.c:3486

From the manual, it looks like there is a problem with the register
allocation or something like this, as it fails in the reload pass - but
I still can't get what's wrong with it. It's the first time I mess with
GCC, and a lot of its internals are still unclear to me. Although the
machine I'm porting GCC to is register-less, I've defined 10 dummy
hard-register for testing purposes. Does someone see something I missed
and could give me a pointer to where the error could come from? Should I
provide more information?

Thank you for your time,
Alex.
-- 
http://www.gnurou.org


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Unable to generate reloads
@ 2001-09-21  6:09 Lars Brinkhoff
  2001-09-21 21:16 ` Joern Rennecke
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Lars Brinkhoff @ 2001-09-21  6:09 UTC (permalink / raw)
  To: gcc

In my back end, there is an instruction that can load a value from
memory (or another register) and then conditionally jump depending on
how the value compares with zero.  The instruction is recognized by
the combine pass and is defined like this:

(define_insn "*load_and_jump"
  [(set (pc)
	(if_then_else (match_operator 0 "comparison_operator"
		       [(match_operand:SI 2 "reg_or_mem_operand" "rm")
		        (const_int 0)])
	 (label_ref (match_operand 3 "" ""))
	 (pc)))
   (set (match_operand:SI 1 "register_operand" "=r")
	(match_dup 2))]
  ...)

A few files in the testsuite generate the "Unable to generate reloads
for:" error for this instruction.  Example:

testsuite/gcc.c-torture/compile/920625-1.c:279: Unable to generate reloads for:
(jump_insn 45 4975 5103 (parallel[ 
            (set (pc)
                (if_then_else (ge (reg:SI 1217)
                        (const_int 0 [0x0]))
                    (label_ref 48)
                    (pc)))
            (set (reg/v:SI 30)
                (reg:SI 1217))
        ] ) 68 {*move_and_skipsi} (nil)
    (expr_list:REG_DEAD (reg:SI 1217)
        (expr_list:REG_BR_PROB (const_int 8900 [0x22c4])
            (nil))))

How do I avoid this error?

-- 
Lars Brinkhoff          http://lars.nocrew.org/     Linux, GCC, PDP-10
Brinkhoff Consulting    http://www.brinkhoff.se/    programming

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-03-19 12:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-18  6:15 Unable to generate reloads Alexandre Courbot
2002-03-18  7:23 ` Alan Lehotsky
2002-03-19  5:09   ` Alexandre Courbot
  -- strict thread matches above, loose matches on Subject: below --
2001-09-21  6:09 Lars Brinkhoff
2001-09-21 21:16 ` Joern Rennecke
2001-09-24  2:41   ` Lars Brinkhoff
2001-09-21 21:26 ` Joern Rennecke
2001-09-24  6:37 ` Lars Brinkhoff
2001-09-24 13:10   ` Geoff Keating

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).