From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14011 invoked by alias); 14 Sep 2004 01:34:04 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 13996 invoked from network); 14 Sep 2004 01:34:03 -0000 Received: from unknown (HELO dair.pair.com) (209.68.1.49) by sourceware.org with SMTP; 14 Sep 2004 01:34:03 -0000 Received: (qmail 4783 invoked by uid 20157); 14 Sep 2004 01:34:02 -0000 Date: Tue, 14 Sep 2004 02:02:00 -0000 From: Hans-Peter Nilsson X-X-Sender: hp@dair.pair.com To: Petar Penchev cc: gcc@gcc.gnu.org Subject: Re: Could not split insn In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-09/txt/msg00813.txt.bz2 On Mon, 13 Sep 2004, Petar Penchev wrote: > > Hello all, > I have define "iorsi3" instruction in my .md file as follows : > > (define_insn_and_split "iorsi3" > [(set (match_operand:SI 0 "nonimmediate_nonstack_operand" "=b, o") > (ior:SI (match_operand:SI 1 "nonimmediate_nonstack_operand" "%0, 0") > (match_operand:SI 2 "general_operand" "boi, boi"))) > (clobber (match_scratch:HI 3 "=X, &r"))] > "" > "#" > "reload_completed" > [(const_int 0)] > "split_logical(HImode, IOR, operands); > DONE;" > ) > > Where constraint 'b' is general-purpose register, which supports SImode. > I tried to compile newlib with optimization -O1 and I have got folowing > message: > > ../../../../../newlib_src/newlib/libc/stdlib/mprec.c: In function > `_lshift': > ../../../../../newlib_src/newlib/libc/stdlib/mprec.c:515: error: could not > split insn > (insn 222 278 279 (parallel [ > (set (reg:SI 0 A) > (ior:SI (reg:SI 0 A) > (const_int 0 [0x0]))) > (clobber (scratch:HI)) > ]) 62 {iorsi3} (insn_list 96 (nil)) > (expr_list:REG_UNUSED (scratch:HI) > (nil))) > ../../../../../newlib_src/newlib/libc/stdlib/mprec.c:515: internal > compiler error: in final_scan_insn, at final.c:2429 > > Register A is accessible in SImode. > But it seems to me that pattern should be matched by the split. That depends entirely on the splitter code in split_logical(), which you didn't show. Besides, the constraint "o" seems wrong: it allows any offsettable operand, which includes stack operands, supposedly refused by nonimmediate_nonstack_operand. You must not allow operands in a constraint that are disallowed by the predicate. > Does anybody have met the same problem ? I suppose you mean generally, bugs in an initial port? You bet. You *really* have to debug this on your own; sending port snippets will not work. Luckily, all the source code is there. ;-) brgds, H-P