public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: "Jan Beulich" <JBeulich@novell.com>
Cc: binutils@sources.redhat.com
Subject: Re: Use of as_fatal
Date: Mon, 18 Apr 2005 20:25:00 -0000	[thread overview]
Message-ID: <20050418132003.5af29cef.davem@davemloft.net> (raw)
In-Reply-To: <s263c04c.050@emea1-mh.id2.novell.com>

On Mon, 18 Apr 2005 15:12:36 +0200
"Jan Beulich" <JBeulich@novell.com> wrote:

> As the new 'macros dot' test has uncovered and (assuming the
> corresponding patch will get approved) 'macros purge' will too for
> some of the targets mentioned below, there is an issue with using
> as_fatal in places where the failure doesn't really appear to be
> fatal. Namely, when just an opcode isn't recognized (as would happen
> when one tries to reference a macro that isn't defined (yet/anymore),
> this condition is supposed to be hit. I am therefore wondering if the
> maintainers of the following targets could shed some light on the
> reasons why as_fatal is being used in this case by these targets; the
> outcome will help determine whether the target specific code should be
> changed or instead the target be excluded from running these tests.

[ please line-wrap your emails in the future, much appreciated... ]

I fixed the as_fatal() which was tripping up the macro dot testcases.
Patch below.

While macro dot appears to be fixes on Sparc, the new macro purge testcase
seems to hang infinitely.  As far as I can tell it is trying to expand macros
over and over for some reason.  I thought initially this was caused
by tc-sparc.c:sparc_ip()'s modification of the string it is given,
yet tests of making sparc_ip() not do this didn't fix the problem.

2005-04-18  David S. Miller  <davem@davemloft.net>

	* config/tc-sparc.c (md_assemble): If sparc_ip gives us a
	NULL insn, exit early.  Remove now spurious NULL checks.
	(sparc_ip): Use as_bad for unknown opcode errors, set *pinsn
	to NULL and exit.

--- config/tc-sparc.c	18 Feb 2005 00:49:03 -0000	1.54
+++ config/tc-sparc.c	18 Apr 2005 20:20:58 -0000
@@ -1304,11 +1304,12 @@ md_assemble (str)
 
   know (str);
   special_case = sparc_ip (str, &insn);
+  if (insn == NULL)
+    return;
 
   /* We warn about attempts to put a floating point branch in a delay slot,
      unless the delay slot has been annulled.  */
-  if (insn != NULL
-      && last_insn != NULL
+  if (last_insn != NULL
       && (insn->flags & F_FBR) != 0
       && (last_insn->flags & F_DELAYED) != 0
       /* ??? This test isn't completely accurate.  We assume anything with
@@ -1321,7 +1322,6 @@ md_assemble (str)
      point instruction and a floating point branch.  We insert one
      automatically, with a warning.  */
   if (max_architecture < SPARC_OPCODE_ARCH_V9
-      && insn != NULL
       && last_insn != NULL
       && (insn->flags & F_FBR) != 0
       && (last_insn->flags & F_FLOAT) != 0)
@@ -1417,7 +1417,9 @@ sparc_ip (str, pinsn)
       break;
 
     default:
-      as_fatal (_("Unknown opcode: `%s'"), str);
+      as_bad (_("Unknown opcode: `%s'"), str);
+      *pinsn = NULL;
+      return special_case;
     }
   insn = (struct sparc_opcode *) hash_find (op_hash, str);
   *pinsn = insn;

  reply	other threads:[~2005-04-18 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18 13:12 Jan Beulich
2005-04-18 20:25 ` David S. Miller [this message]
2005-04-19  6:40 Jan Beulich
2005-04-19 19:06 ` David S. Miller

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=20050418132003.5af29cef.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=JBeulich@novell.com \
    --cc=binutils@sources.redhat.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).