This is the mail archive of the gcc-patches@gcc.gnu.org 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]

PATCH for m68k port


Has anyone built gcc with "--target=m68k-elf" lately?  I tried and the
build fails when trying to build some libraries. For the devo-based
compiler the following error message is produced when it attempts to
compile libgcc1-test.c:

/tmp/ccYkkDFu.s:389: Error: Value of -830 too large for field of 1 bytes
at 829
/tmp/ccYkkDFu.s:389: Error: Value of -856 too large for field of 1 bytes
at 855
/tmp/ccYkkDFu.s:389: Error: Value of -882 too large for field of 1 bytes
at 881
/tmp/ccYkkDFu.s:389: Error: Value of -908 too large for field of 1 bytes
at 907
/tmp/ccYkkDFu.s:389: Error: Value of -934 too large for field of 1 bytes
at 933

I have tracked this down to the jbsr statement like the following:

        jbsr foo        | 8     *m68k.md:6875

The assembler is attempting to generate PC relative short versions of
the JSR instruction with 8-bit PC relative addressing. I found that gas
has a "-S" option to force the generation of the long version of the
instruction.

I have a patch for gcc which fixes this problem.  I have attached the
patch to this email and the changelog entry is below:

2001-02-23  Will Cohen  <wcohen@redhat.com>

	* config/m68k/m68k-none.h (ASM_SPEC): Added "-S" option.

Is it okay to apply this patch?

-Will
Index: m68k-none.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/m68k-none.h,v
retrieving revision 1.3
diff -c -2 -p -r1.3 m68k-none.h
*** m68k-none.h	1998/12/16 21:06:54	1.3
--- m68k-none.h	2001/02/23 18:17:18
*************** Unrecognized value in TARGET_CPU_DEFAULT
*** 143,147 ****
  
  #undef ASM_SPEC
! #define ASM_SPEC "\
  %{m68851}%{mno-68851}%{m68881}%{mno-68881}%{msoft-float:-mno-68881 }%{m68000}%{m68302}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}%{m68040}%{m68020-40:-mc68040 }%{m68020-60:-mc68040 }%{m68060}%{mcpu32}%{m68332}%{m5200}%{!mc68000:%{!m68000:%{!m68302:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68020-60:%{!m68060:%{!mcpu32:%{!m68332:%{!m5200:%(asm_cpu_default) }}}}}}}}}}}}}} \
  "
--- 143,147 ----
  
  #undef ASM_SPEC
! #define ASM_SPEC "-S \
  %{m68851}%{mno-68851}%{m68881}%{mno-68881}%{msoft-float:-mno-68881 }%{m68000}%{m68302}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}%{m68040}%{m68020-40:-mc68040 }%{m68020-60:-mc68040 }%{m68060}%{mcpu32}%{m68332}%{m5200}%{!mc68000:%{!m68000:%{!m68302:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68020-60:%{!m68060:%{!mcpu32:%{!m68332:%{!m5200:%(asm_cpu_default) }}}}}}}}}}}}}} \
  "

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