public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Correct m68k float flag logic
@ 2006-05-19 13:11 Nathan Sidwell
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Sidwell @ 2006-05-19 13:11 UTC (permalink / raw)
  To: Ben Elliston; +Cc: binutils

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

I've installed this patch (as obvious), for a problem with the m68k's float 
format logic.  The -mfloat flag is used for both m68k and cf floats, which to 
target is determined by the target cpu.  That check should be done _before_ 
testing whether we've been given flags for both m68k & cf architectures.

We've been using this on the binutils-csl-2_17-branch for some time (and we're 
just going through making sure things get back to mainline).

Ben, do you want this on the binutils-2_17-branch too?

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


[-- Attachment #2: all.diff --]
[-- Type: text/plain, Size: 1451 bytes --]

2006-05-19  Nathan Sidwell  <nathan@codesourcery.com>

	* gas/config/tc-m68k.c (m68k_init_arch): Move checking of
	cfloat/m68881 to correct architecture before using it.

Index: config/tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.75
diff -c -3 -p -r1.75 tc-m68k.c
*** config/tc-m68k.c	28 Mar 2006 07:21:49 -0000	1.75
--- config/tc-m68k.c	19 May 2006 10:12:58 -0000
*************** m68k_init_arch (void)
*** 7233,7238 ****
--- 7233,7247 ----
    
    current_architecture &= ~not_current_architecture;
  
+   if ((current_architecture & (cfloat | m68881)) == (cfloat | m68881))
+     {
+       /* Determine which float is really meant.  */
+       if (current_architecture & (m68k_mask & ~m68881))
+ 	current_architecture ^= cfloat;
+       else
+ 	current_architecture ^= m68881;
+     }
+ 
    if (selected_cpu)
      {
        control_regs = selected_cpu->control_regs;
*************** m68k_init_arch (void)
*** 7244,7258 ****
  	}
      }
  
-   if ((current_architecture & (cfloat | m68881)) == (cfloat | m68881))
-     {
-       /* Determine which float is really meant.  */
-       if (current_architecture & (m68k_mask & ~m68881))
- 	current_architecture ^= cfloat;
-       else
- 	current_architecture ^= m68881;
-     }
- 
    if ((current_architecture & m68k_mask)
        && (current_architecture & ~m68k_mask))
      {
--- 7253,7258 ----

^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <20060523065246.GA23343@ozlabs.au.ibm.com>]

end of thread, other threads:[~2006-05-25 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-19 13:11 Correct m68k float flag logic Nathan Sidwell
     [not found] <20060523065246.GA23343@ozlabs.au.ibm.com>
2006-05-25 14:34 ` Ben Elliston
2006-05-25 15:39   ` Daniel Jacobowitz

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).