[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Has anyone successfully bootstrapped gcc-4.6.3 on m68k?



I think I finally got the root cause and the stage1 compiler is crunching through the files without ICE, albeit very slowly :-)  It was a bug in gcc, here are my notes:


in gcc/defaults.h:

/* Assume that case vectors are not pc-relative.  */
#ifndef CASE_VECTOR_PC_RELATIVE
#define CASE_VECTOR_PC_RELATIVE 0
#endif

this is included after the target definitions and thus overrides the nextstep.h target definition which includes:

#undef CASE_VECTOR_PC_RELATIVE

the code then subsequently breaks in gcc/config/m68k/m68k.md:

#ifdef CASE_VECTOR_PC_RELATIVE
    operands[0] = gen_rtx_PLUS (SImode, pc_rtx,
				gen_rtx_SIGN_EXTEND (SImode, operands[0]));
#endif

this conditional is always true because of the define in gcc/defaults.h, and needs to be replaced by:

#if CASE_VECTOR_PC_RELATIVE != 0
    operands[0] = gen_rtx_PLUS (SImode, pc_rtx,
				gen_rtx_SIGN_EXTEND (SImode, operands[0]));
#endif


I will report the bug to GCC's Bugzilla.

A HUGE thank you once again to everyone for your help with this!

On 2012-05-23, at 3:21 AM, Andreas Schwab wrote:

> t-rexky <gvvn1200@gmail.com> writes:
> 
>> #undef CASE_VECTOR_PC_RELATIVE
> 
> That is missing.
> 
> Andreas.
> 
> -- 
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."


Reply to: