This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] tc-m68k.c: Fix "FAIL: pcrel" on fido.


Hi,

Attached is a patch to fix "FAIL: pcrel" on fido.

Here is a reduced version of testsuite/gas/m68k/pcrel.s.

	bsrl	there
there:
	nop

gas prints out the following warning for this testcase:

pcrel.s:1: Warning: Can't use long branches on 68000/68010/5200>, expected: <>

even though fido does support the long branch/subroutine call.

Interestingly, fido-none-elf-as -mcpu=cpu32 doesn't generate the same
message even though fidoa and cpu32 are supposed to be identical
except for several instructions.

The error message comes from tc-m68k.c:2880

  if (! HAVE_LONG_BRANCH (current_architecture))
    as_warn (_("Can't use long branches on 68000/68010/5200"));

where the definition of HAVE_LONG_BRANCH is found in patch.

The patch fixes the problem by adding fido_a to the definition of
HAVE_LONG_BRANCH.

Tested on fido-none-elf.  Committed as obvious.

Kazu Hirata

gas/
2007-04-04  Kazu Hirata  <kazu@codesourcery.com>

	* config/tc-m68k.c (HAVE_LONG_BRANCH): Add fido_a.

Index: gas/config/tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.85
diff -u -r1.85 tc-m68k.c
--- gas/config/tc-m68k.c	16 Mar 2007 18:08:58 -0000	1.85
+++ gas/config/tc-m68k.c	4 Apr 2007 21:10:46 -0000
@@ -334,7 +334,7 @@
 #define arch_coldfire_fpu(x)	((x) & cfloat)
 
 /* Macros for determining if cpu supports a specific addressing mode.  */
-#define HAVE_LONG_BRANCH(x)     ((x) & (m68020|m68030|m68040|m68060|cpu32|mcfisa_b))
+#define HAVE_LONG_BRANCH(x)     ((x) & (m68020|m68030|m68040|m68060|cpu32|fido_a|mcfisa_b))
 
 static struct m68k_it the_ins;	/* The instruction being assembled.  */
 


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