PATCH: Very interesting IA64 gas bug
H. J. Lu
hjl@lucon.org
Sat Jun 7 04:47:00 GMT 2003
On Fri, Jun 06, 2003 at 06:15:11PM -0700, H. J. Lu wrote:
> 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
>
This patch seems to fix this bug.
H.J.
-------------- next part --------------
2003-06-06 H.J. Lu <hongjiu.lu@intel.com>
* app.c (do_scrub_chars): Add states 14 and 15 to handle
predicate for ia64.
--- gas/app.c.pred 2003-04-24 14:19:07.000000000 -0700
+++ gas/app.c 2003-06-06 21:41:08.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
+ 15: 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 == 1))
+ {
+ state += 14;
+ PUT (ch);
+ continue;
+ }
+ else if (state == 14 || state == 15)
+ {
+ if (ch == ')')
+ state -= 14;
+ else
+ {
+ PUT (ch);
+ continue;
+ }
+ }
+#endif
+
recycle:
#if defined TC_ARM && defined OBJ_ELF
More information about the Binutils
mailing list