public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/RFA] MIPS breakage with MDMX changes
@ 2002-06-06 14:44 Jason R Thorpe
  2002-06-06 14:48 ` Daniel Jacobowitz
  2002-06-06 16:55 ` cgd
  0 siblings, 2 replies; 8+ messages in thread
From: Jason R Thorpe @ 2002-06-06 14:44 UTC (permalink / raw)
  To: cgd; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]

Hi Chris...

I'm seeing some new testsuite failures for gcc when used with a freshly
CVS update'd binutils ... The failure mode I'm seeing is:

/usr/local/gnu/mipseb-unknown-netbsd/bin/ld: /amd/yeah-baby/u1/hack/gnu-toolchai
n/gcc/build/mipseb-mipseb/gcc/libgcc.a(unwind-dw2.o): uses different e_flags (0x
8000002) fields than previous modules (0x2)^M

That flag appears to be:

/* Use MDMX multimedia extensions */
#define EF_MIPS_ARCH_ASE_MDMX   0x08000000  

...which my R4400 certainly does not have :-)

Gas sets that bit like so:

  if (file_ase_mdmx)
    elf_elfheader (stdoutput)->e_flags |= EF_MIPS_ARCH_ASE_MDMX;

file_ase_mdmx is set via mips_opts.ase_mdmx, which is initialized to -1,
which appears to mean that file_ase_mdmx will be set to -1 unless an
explicit -mno-mdmx is used, thus causing the bit to be erroneously set.

It looks like the mips3d stuff has the same problem (although no bits get
set in that case).  I think the default handling of ase_mips3d and ase_mdmx
should be like the attached patch.

	* config/tc-mips.c (mips_after_parse_args): Fix default handling
	of mips_opts.ase_mips3d and mips_opts.ase_mdmx.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

[-- Attachment #2: mips-patch --]
[-- Type: text/plain, Size: 837 bytes --]

Index: tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.137
diff -u -r1.137 tc-mips.c
--- tc-mips.c	4 Jun 2002 16:33:55 -0000	1.137
+++ tc-mips.c	6 Jun 2002 21:44:00 -0000
@@ -10614,10 +10614,10 @@
 
   /* If the selected architecture includes support for ASEs, enable
      generation of code for them.  */
-  if (mips_opts.ase_mips3d == -1 && CPU_HAS_MIPS3D (mips_arch))
-    mips_opts.ase_mips3d = 1;
-  if (mips_opts.ase_mdmx == -1 && CPU_HAS_MDMX (mips_arch))
-    mips_opts.ase_mdmx = 1;
+  if (mips_opts.ase_mips3d == -1)
+    mips_opts.ase_mips3d = CPU_HAS_MIPS3D (mips_arch) ? 1 : 0;
+  if (mips_opts.ase_mdmx == -1)
+    mips_opts.ase_mdmx = CPU_HAS_MDMX (mips_arch) ? 1 : 0;
 
   if (file_mips_gp32 < 0)
     file_mips_gp32 = 0;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-06-07  0:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-06 14:44 [PATCH/RFA] MIPS breakage with MDMX changes Jason R Thorpe
2002-06-06 14:48 ` Daniel Jacobowitz
2002-06-06 14:56   ` Jason R Thorpe
2002-06-06 16:55 ` cgd
2002-06-06 17:03   ` Jason R Thorpe
2002-06-06 17:04     ` cgd
2002-06-06 17:05   ` Daniel Jacobowitz
2002-06-06 17:32     ` Jason R Thorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).