RFA: Have ira-conflicts.c use base_reg_class()

Nick Clifton nickc@redhat.com
Tue Jan 13 09:12:00 GMT 2009


Hi Bernd,

>>   The bfin port is not currently building in the gcc mainline because
>>   ira-conflicts.c needs a definition of BASE_REGS_CLASS.  The patch
>>   below adds one, although I am not 100% sure that I have used the
>>   right value.
> 
> IMO ira-conflicts.c needs to be fixed to accept MODE_CODE_BASE_REG_CLASS
> like everything else.
> 
> Thanks for trying to fix this, but this patch is clearly wrong.

Fair enough - in which case please could you review the attached patch. 
  It changes ira-conflicts.c to use the base_reg_class() inline function 
defined in addresses.h which will use MODE_CODE_BASE_REG_CLASS if it is 
defined.  I had to guess at the parameters to pass to base_reg_class() 
but I think their exact values will not matter too much.

Tested by rebuilding a lot of toolchains[1], including bfin-elf and by 
preforming a regression test of the gcc testsuite for an 
i686-pc-linux-gnu toolchain.  (There were no regressions).

OK to apply ?

Cheers
   Nick

gcc/ChangeLog
2009-01-13  Nick Clifton  <nickc@redhat.com>

	* ira-conflicts.c: Include addresses.h for the definition of
	base_reg_class.
	(ira_build_conflicts): Use base_reg_class instead of
	BASE_REG_CLASS.
	* Makefile.in: Add a dependency of ira-conflicts.o on
	addresses.h.


[1]: To be exact: h8300-elf m68hc12-elf arc-elf mn10300-elf
  spu-elf xstormy16-elf fr30-elf v850e-elf arm-wince-pe
  arm-epoc-pe avr-elf i386-elf m32c-elf mcore-elf mcore-pe
  mips64vr-elf arm-eabi arm-elf arm-pe bfin-elf cris-elf
  frv-elf ia64-elf iq2000-elf m32r-elf mipsisa32-elf
  mipsisa64-elf mmix-mmixware powerpc-eabispe powerpc-elf
  sh64-elf sh-elf sh-symbianelf tx39-elf	x86_64-pc-linux-gnu
  i686-pc-linux-gnu alpha-netbsd am33_2.0-linux frv-uclinux
  hppa64-hp-hpux11.11 hppa-linux-gnu powerpc-ibm-aix4.3.3.0
  powerpc64-linux-gnu vax-netbsdelf i686-pc-cygwin mingw32-pe
  ppc-linux s390-linux
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bfin.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090113/7f07cb0a/attachment.ksh>


More information about the Gcc-patches mailing list