public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@codesourcery.com>
To: Ben Elliston <bje@au1.ibm.com>
Cc: binutils@sources.redhat.com
Subject: Correct m68k float flag logic
Date: Fri, 19 May 2006 13:11:00 -0000	[thread overview]
Message-ID: <446D9B43.2000408@codesourcery.com> (raw)

[-- 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 ----

             reply	other threads:[~2006-05-19 10:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19 13:11 Nathan Sidwell [this message]
     [not found] <20060523065246.GA23343@ozlabs.au.ibm.com>
2006-05-25 14:34 ` Ben Elliston
2006-05-25 15:39   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=446D9B43.2000408@codesourcery.com \
    --to=nathan@codesourcery.com \
    --cc=binutils@sources.redhat.com \
    --cc=bje@au1.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).