This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RFC: Jump to const_int

Flow aborts in make_edges if it finds a plain or unconditional jump that
isn't to a label:

          /* Otherwise, we have a plain conditional or unconditional jump.  */
	      if (! JUMP_LABEL (insn))
		abort ();
	      make_label_edge (edge_cache, bb, JUMP_LABEL (insn), 0);

In reviewing the testsuite failures on the vax reported here


I found the following testcase fails (991213-3.c) with the above abort:

int jump () { goto * (int (*) ()) 0xbabebec0; }

The rtl generated for jump () is:

;; Function jump

(note 2 0 3 NOTE_INSN_DELETED -1347440721)

(note 3 2 8 NOTE_INSN_FUNCTION_BEG -1347440721)

(jump_insn 8 3 9 (set (pc)
        (const_int -1161904448 [0xbabebec0])) -1 (nil)

(barrier 9 8 0)

This is not a computed jump because jmp_uses_reg_or_mem only accepts a
REG or MEM that is not in the constant pool.

Changing the predicate for the indirect_jump insn to register_operand
might hide the problem.  I think that this would make the jump look like
a computed jump.  However, this doesn't seem like the correct solution
since the above jump is effectively an exit.

Should make_edges be changed to recognize a jump to CONST_INT or are
there problems in doing this?

J. David Anglin                        
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]