Very interesting IA64 gas bug

H. J. Lu hjl@lucon.org
Sat Jun 7 01:15:00 GMT 2003


On Fri, Jun 06, 2003 at 05:49:18PM -0700, H. J. Lu wrote:
> > > 
> > > This could be fixed by adding a new state for parsing IA-64 qps.  If we 
> > > see an open paren before the opcode, then we switch to the new state, 
> > > and switch back to state 0 after seeing the ).
> > 
> > I tried it. It still doesn't work in all cases. I am enclosing a patch
> > and testsuite here.
> > 
> 
> Never mind. The patch seems to work fine.

There is still a problem. I am enclosing a new patch and a new
testsuite.

# make src
...
# make
./as   -o buffer56.o buffer56.s
buffer56.s: Assembler messages:
buffer56.s:32765: Error: Unknown opcode `hint@pause'
make: *** [buffer56.o] Error 1


H.J.
-------------- next part --------------
2003-06-06  H.J. Lu <hongjiu.lu@intel.com>

	* app.c (do_scrub_chars): Add state 14 to handle predicate for
	ia64.

--- gas/app.c.buffer	2003-04-24 14:19:07.000000000 -0700
+++ gas/app.c	2003-06-06 17:57:22.000000000 -0700
@@ -374,6 +374,10 @@ do_scrub_chars (get, tostart, tolen)
 	 13: After seeing a vertical bar, looking for a second
 	     vertical bar as a parallel expression separator.
 #endif
+#ifdef TC_IA64
+	 14: After seeing a `(' at state 0, looking for a `)' as
+	     predicate.
+#endif
 	  */
 
   /* I added states 9 and 10 because the MIPS ECOFF assembler uses
@@ -674,6 +678,25 @@ do_scrub_chars (get, tostart, tolen)
       /* flushchar: */
       ch = GET ();
 
+#ifdef TC_IA64
+      if (ch == '(' && state == 0)
+	{
+	  state = 14;
+	  PUT (ch);
+	  continue;
+	}
+      else if (state == 14)
+	{
+	  if (ch == ')')
+	    state = 0;
+	  else
+	    {
+	      PUT (ch);
+	      continue;
+	    }
+	}
+#endif
+
     recycle:
 
 #if defined TC_ARM && defined OBJ_ELF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.tar.gz
Type: application/x-gzip
Size: 502 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030607/f7997d6c/attachment.bin>


More information about the Binutils mailing list