[Bug gas/2848] New: macro name syntax changed

2006-06-26 Thread zippel at linux-m68k dot org
Until at least 2.15 as accepted a macro like this:

.macro  foo size,arg,arg2
move\size   \arg,\arg2
.endm

foo.l   %d0,%d1

Sometimes after that the syntax changed to include the dot into the name and
this breaks code that was working nicely before. The Linux/m68k uses the macro
like this.

Currently I use this simple patch to work around the problem:

diff -u -p -r1.44 macro.c
--- macro.c 7 Jun 2006 11:27:57 -   1.44
+++ macro.c 26 Jun 2006 22:07:33 -
@@ -1202,7 +1202,7 @@ check_macro (const char *line, sb *expan
 return 0;

   s = line + 1;
-  while (is_part_of_name (*s))
+  while (is_part_of_name (*s) && *s != '.')
 ++s;
   if (is_name_ender (*s))
 ++s;

Another alternative is to restore the old behaviour, which only accepts
alphanumeric characters and '_'/'$'.

-- 
   Summary: macro name syntax changed
   Product: binutils
   Version: 2.18 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: zippel at linux-m68k dot org
CC: bug-binutils at gnu dot org
 GCC build triplet: m68k-linux
  GCC host triplet: m68k-linux
GCC target triplet: m68k-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=2848

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/2848] macro name syntax changed

2006-07-24 Thread zippel at linux-m68k dot org

--- Additional Comments From zippel at linux-m68k dot org  2006-07-24 17:32 
---
You read it correctly, the intention is to provide the opcodes
foo.b/foo.w/foo.l, so using "foo .l" would be even more confusing. The point is
that gas broke compatibility here, so I can't provide such opcodes at all 
anymore.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2848

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/2848] macro name syntax changed

2006-07-26 Thread zippel at linux-m68k dot org

--- Additional Comments From zippel at linux-m68k dot org  2006-07-26 11:21 
---
(In reply to comment #3)

> OK, so presumably a workaround is to provide individual macros with the 
> names "foo.b", "foo.w" and so on, rather than just one macro.

This is not possible, if it has to work with various versions of binutils.

> Hmm, well the change was to make macros names consistent with other 
> names.  ie if string was a valid name for a (pseudo) opcode or a label, 
> then it could also be a valid name for a macro.  I appreciate however 
> that this did break backwards compatibility.

What's the point of making this "consistent"?
At least for m68k the old rules made more sense and should be the default here.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2848

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/2848] macro name syntax changed

2006-07-28 Thread zippel at linux-m68k dot org

--- Additional Comments From zippel at linux-m68k dot org  2006-07-28 17:32 
---
BTW while looking through the source it may make sense to disable the dot
completely on m68k as part of the name. It's not really valid as part of any
symbol name, e.g. label.w has a special meaning.
Although this would require a few more changes in the m68k parser, but it should
mainly become simpler, e.g. it would make the extra look ahead in
m68k-parse.y:yylex() unnecessary.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2848

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils