This is the mail archive of the binutils@sources.redhat.com 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]

Bug in MDMX/MIPS-3d patch


Chris, I see this code in tc-mips.c now:

  /* 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 (file_mips_gp32 < 0)
    file_mips_gp32 = 0;
  if (file_mips_fp32 < 0)
    file_mips_fp32 = 0;

Notice that last bit.  If something is marked as -1 to mean 'not set', then
it needs to be set to 0 or 1 in some way, not left as -1. 
mips_opts.ase_mdmx stays as -1, so if the CPU does NOT have MDMX support,
then if (mips_opts.ase_mdmx) is true anyway; -1 != 0.

I'd say the intent was pretty obvious, so I've checked in the attached
patch.  If you really meant to default to MDMX, well... :)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2002-06-06  Daniel Jacobowitz  <drow@mvista.com>

	* tc-mips.c (mips_after_parse_args): Always set mips_opts.ase_mips3d
	and mips_opts.ase_mdmx if they are uninitialized.

--- tc-mips.c.orig	Thu Jun  6 12:27:45 2002
+++ tc-mips.c	Thu Jun  6 12:28:47 2002
@@ -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);
+  if (mips_opts.ase_mdmx == -1)
+    mips_opts.ase_mdmx = CPU_HAS_MDMX (mips_arch);
 
   if (file_mips_gp32 < 0)
     file_mips_gp32 = 0;


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