This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i370 port
- From: "Paul Edwards" <mutazilah at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 10 Sep 2009 08:32:30 +1000
- Subject: Re: i370 port
2. I am unable to do an optimized compile even as a cross-compile,
I get an internal error in this function:
gcse.c:
static void
compute_hash_table_work (struct hash_table *table)
{
...
if (!current_bb) /* +++ why are we getting NULL here? */
It appears I have misdiagnosed this. The code will handle NULL
already. Taking that out though, exposes this internal error:
int
i370_branch_dest (branch)
rtx branch;
{
rtx dest = SET_SRC (PATTERN (branch));
int dest_uid;
int dest_addr;
/* first, compute the estimated address of the branch target */
if (GET_CODE (dest) == IF_THEN_ELSE)
dest = XEXP (dest, 1);
dest = XEXP (dest, 0);
/* +++ why is this becoming NULL? */
if (!dest)
{
printf("internal error in branch dest\n");
exit (0);
}
which is obviously specific to the i370 port. This code works fine on
3.2.3 though, so any idea what 3.4.6 changed to stop this from
working?
Thanks. Paul.
dest_uid = INSN_UID (dest);
dest_addr = INSN_ADDRESSES (dest_uid);
/* next, record the address of this insn as the true addr of first ref */
{
label_node_t *lp;
rtx label = JUMP_LABEL (branch);
int labelno = CODE_LABEL_NUMBER (label);
if (!label || CODE_LABEL != GET_CODE (label)) abort ();
lp = mvs_get_label (labelno);
if (-1 == lp -> first_ref_page) lp->first_ref_page = mvs_page_num;
just_referenced_page = lp->label_page;
}
return dest_addr;
}