recent as(1) doesn't think that . terminates a macro name, so
getuser.l is _not_ treated as invoking getuser with .l as the
first argument.

Note that this behaviour remains in all recent versions and is
unrelated to _another_ binutils problems we used to have for
a while (having (%a0)+ parsed as two arguments).  This one is
there to stay.

Patch works by having a macro with name that would be treated differently
by new and old rules; if expanded, it adds definition for getuser.b, etc.
via getuser.  Old as(1) sees
definition of gas_fscked with one argument
redefinition of gas_fscked (with empty body and ignored argument)
invocation of gas_fscked with .x as argument
=> expands to nothing
New as(1) sees
definition of gas_fscked.x
definition of gas_fscked (independent from gas_fscked.x)
invocation of gas_fscked.x
=> expands to definitions of getuser.l, etc.

IOW, the trigger for workaround is precisely the behaviour we need to
work around.  Incidentally, this description is a couple of times
longer than patch itself...

Signed-off-by: Al Viro <[EMAIL PROTECTED]>
---
 include/asm-m68k/math-emu.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/include/asm-m68k/math-emu.h b/include/asm-m68k/math-emu.h
index 7ac6259..d9f15f4 100644
--- a/include/asm-m68k/math-emu.h
+++ b/include/asm-m68k/math-emu.h
@@ -226,6 +226,20 @@ #define FPS_PC2            (PT_PC+10)
        .previous
 .endm
 
+/* work around binutils idiocy */
+.macro  gas_fscked.x
+.irp   m b,w,l
+.macro  getuser.\m src,dest,label,addr
+        getuser .\m,"\src","\dest","\label","\addr"
+.endm
+.macro  putuser.\m src,dest,label,addr
+       putuser .\m,"\src","\dest","\label","\addr"
+.endm
+.endr
+.endm
+.macro  gas_fscked x=0
+.endm
+        gas_fscked.x
 
 .macro movestack       nr,arg1,arg2,arg3,arg4,arg5
        .if     \nr
-- 
1.4.2.GIT


-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to