public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* fix a mmix assertion failure
@ 2005-03-01 22:20 Alan Modra
  2005-03-01 23:20 ` Andreas Schwab
  2005-03-01 23:39 ` Hans-Peter Nilsson
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Modra @ 2005-03-01 22:20 UTC (permalink / raw)
  To: binutils

	* symbols.c (fb_label_name): Allow an augend of 2 for mmix.

Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.54
diff -u -p -r1.54 symbols.c
--- gas/symbols.c	21 Jan 2005 05:54:38 -0000	1.54
+++ gas/symbols.c	1 Mar 2005 10:51:53 -0000
@@ -1,6 +1,6 @@
 /* symbols.c -symbol table-
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004
+   1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -1561,7 +1561,13 @@ fb_label_name (long n,	/* We just saw "n
   char symbol_name_temporary[20];	/* Build up a number, BACKWARDS.  */
 
   know (n >= 0);
-  know (augend == 0 || augend == 1);
+  know (
+#ifdef TC_MMIX
+	(unsigned long) augend <= 2 /* See mmix_fb_label.  */
+#else
+	(unsigned long) augend <= 1
+#endif
+	);
   p = symbol_name_build;
 #ifdef LOCAL_LABEL_PREFIX
   *p++ = LOCAL_LABEL_PREFIX;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: fix a mmix assertion failure
  2005-03-01 22:20 fix a mmix assertion failure Alan Modra
@ 2005-03-01 23:20 ` Andreas Schwab
  2005-03-02  0:06   ` Alan Modra
  2005-03-01 23:39 ` Hans-Peter Nilsson
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2005-03-01 23:20 UTC (permalink / raw)
  To: binutils

Alan Modra <amodra@bigpond.net.au> writes:

> @@ -1561,7 +1561,13 @@ fb_label_name (long n,	/* We just saw "n
>    char symbol_name_temporary[20];	/* Build up a number, BACKWARDS.  */
>  
>    know (n >= 0);
> -  know (augend == 0 || augend == 1);
> +  know (
> +#ifdef TC_MMIX
> +	(unsigned long) augend <= 2 /* See mmix_fb_label.  */
> +#else
> +	(unsigned long) augend <= 1
> +#endif
> +	);

That won't work when know is a macro.  You can't have preprocessor
directives inside a macro parameter.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: fix a mmix assertion failure
  2005-03-01 22:20 fix a mmix assertion failure Alan Modra
  2005-03-01 23:20 ` Andreas Schwab
@ 2005-03-01 23:39 ` Hans-Peter Nilsson
  2005-03-02  0:04   ` Alan Modra
  1 sibling, 1 reply; 5+ messages in thread
From: Hans-Peter Nilsson @ 2005-03-01 23:39 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

On Wed, 2 Mar 2005, Alan Modra wrote:

> 	* symbols.c (fb_label_name): Allow an augend of 2 for mmix.

Yuck.  Are you ok with me reverting that later on as part of a
MMIX-local solution?  (No, I haven't looked further.)

brgds, H-P

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

* Re: fix a mmix assertion failure
  2005-03-01 23:39 ` Hans-Peter Nilsson
@ 2005-03-02  0:04   ` Alan Modra
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2005-03-02  0:04 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils

On Tue, Mar 01, 2005 at 06:39:14PM -0500, Hans-Peter Nilsson wrote:
> On Wed, 2 Mar 2005, Alan Modra wrote:
> 
> > 	* symbols.c (fb_label_name): Allow an augend of 2 for mmix.
> 
> Yuck.  Are you ok with me reverting that later on as part of a
> MMIX-local solution?

Of course!

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: fix a mmix assertion failure
  2005-03-01 23:20 ` Andreas Schwab
@ 2005-03-02  0:06   ` Alan Modra
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2005-03-02  0:06 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: binutils

On Wed, Mar 02, 2005 at 12:20:40AM +0100, Andreas Schwab wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
> 
> > @@ -1561,7 +1561,13 @@ fb_label_name (long n,	/* We just saw "n
> >    char symbol_name_temporary[20];	/* Build up a number, BACKWARDS.  */
> >  
> >    know (n >= 0);
> > -  know (augend == 0 || augend == 1);
> > +  know (
> > +#ifdef TC_MMIX
> > +	(unsigned long) augend <= 2 /* See mmix_fb_label.  */
> > +#else
> > +	(unsigned long) augend <= 1
> > +#endif
> > +	);
> 
> That won't work when know is a macro.  You can't have preprocessor
> directives inside a macro parameter.

Arggh.  I should know that!

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

end of thread, other threads:[~2005-03-02  0:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-01 22:20 fix a mmix assertion failure Alan Modra
2005-03-01 23:20 ` Andreas Schwab
2005-03-02  0:06   ` Alan Modra
2005-03-01 23:39 ` Hans-Peter Nilsson
2005-03-02  0:04   ` Alan Modra

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