Article View: gnu.gcc.help
Article #42681GCC with multiple delay slots
From: Frederick Earl Gray
Date: Wed, 08 Nov 1995 00:00
Date: Wed, 08 Nov 1995 00:00
66 lines
3265 bytes
3265 bytes
As part of a research project, we're modifying GCC to support an architecture
with multiple delay slots after each branch instruction. Aside from the
delay slots, our hypothetical machine is identical to the SPARC.
We have tried both four and two delay slots, with the following RTL code
in sparc.md:
(for four delay slots)
(define_delay (eq_attr "type" "branch")
[(eq_attr "in_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")])
(for two delay slots)
(define_delay (eq_attr "type" "branch")
[(eq_attr "in_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")
(eq_attr "in_annul_branch_delay" "true")])
GCC compiles successfully, but while running it with optimization (-O) on
just about anything it aborts. Here is the trace ('where' output in gdb):
#0 0xef7a74b0 in kill ()
#1 0xef7bf874 in abort ()
#2 0xc0198 in add_insn_before (insn=0x266130, before=0x24c790)
at ../src/emit-rtl.c:2193
#3 0xc06cc in emit_insn_before (pattern=0x266128, before=0x24c790)
at ../src/emit-rtl.c:2348
#4 0x1836b4 in update_block (insn=0x24c7f8, where=0x24c790)
at ../src/reorg.c:2218
#5 0x186aa4 in fill_slots_from_thread (insn=0x24c288, condition=0x264dc8,
thread=0x24c790, opposite_thread=0x263b88, likely=0, thread_if_true=0,
own_thread=1, own_opposite_thread=0, slots_to_fill=4,
pslots_filled=0xefffed3c) at ../src/reorg.c:3389
#6 0x1876a0 in fill_eager_delay_slots (first=0x24baf8) at ../src/reorg.c:3687
#7 0x18912c in dbr_schedule (first=0x24baf8, file=0x0) at ../src/reorg.c:4290
#8 0x37268 in rest_of_compilation (decl=0x263100) at ../src/toplev.c:3216
#9 0x1a448 in finish_function (nested=0) at ../src/c-decl.c:6641
#10 0x2c4c in yyparse () at c-parse.y:284
#11 0x34d64 in compile_file (name=0xeffffc06 "/tmp/main.C")
at ../src/toplev.c:2283
#12 0x38d90 in main (argc=3, argv=0xeffffb74, envp=0xeffffb84)
at ../src/toplev.c:3948
Is anyone actively using GCC with multiple delay slots? Are we the first
to try to make use of the code to support this? Does anyone have any good
ideas?
We appreciate your cooperation.
-- Fred Gray -- Frank Alejano
-- fgray@owlnet.rice.edu -- franka@owlnet.rice.edu
Technical Details
Message-ID:
<199511082228.QAA08290@long-eared.owlnet.rice.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,b9e7379e155d60f5,start X-Google-Attributes: gid11318c,public From: fgray@owlnet.rice.edu (Frederick Earl Gray) Subject: GCC with multiple delay slots Date: 1995/11/08 Message-ID: <199511082228.QAA08290@long-eared.owlnet.rice.edu> X-Deja-AN: 118940585 distribution: gnu sender: daemon@cis.ohio-state.edu organization: GNUs Not Usenet newsgroups: gnu.gcc.help