testsuite/sim/cris fix for "macro expansion and operator &&" fix
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Mon Aug 23 18:29:00 GMT 2010
> Date: Wed, 18 Aug 2010 15:27:20 +0930
> From: Alan Modra <amodra@gmail.com>
(in gas/)
> * macro.c (sub_actual): Add back ampersand suffix when no
> substitution.
> (macro_expand_body): Correct comment.
This effectively changed the undocumented requirement to write
operator '&&' as '&&&&' in macros. Release-note-worthy, if not
documentation-worthy; I couldn't find documentation saying
either way. It requires the following fix to the CRIS simulator
test-suite which will be committed soon.
It looks like these were the only failing occurrences in the
simulator test-suites; there were some other '&&' in macros but
parenthesized to neutralize differences in operator '&' (as
which '&&' was previously parsed) vs. operator '&&', so I did
the same, and verified with an old assembler that there's no
change in generated code.
sim/testsuite:
* sim/cris/asm/nonvcv32.ms: Neutralize changed &&-in-macro gas syntax.
Index: nonvcv32.ms
===================================================================
RCS file: /cvs/src/src/sim/testsuite/sim/cris/asm/nonvcv32.ms,v
retrieving revision 1.1
diff -u -p -r1.1 nonvcv32.ms
--- nonvcv32.ms 22 Oct 2007 16:49:25 -0000 1.1
+++ nonvcv32.ms 23 Aug 2010 15:57:48 -0000
@@ -51,7 +51,7 @@
.endm
.macro nonvc2q insn op min=-63 max=63
- .if \op >= \min &&&& \op <= \max
+ .if (\op >= \min) && (\op <= \max)
nonvc2 \insn,\op
.endif
.endm
@@ -118,12 +118,12 @@
; Test all applicable constant, register and memory variants of a value.
.macro tst op
; Constants
- .if (\op <= 31 &&&& \op >= -32)
+ .if (\op <= 31) && (\op >= -32)
nonvciterq \op
- .elseif (\op <= 255 &&&& \op >= -128)
+ .elseif (\op <= 255) && (\op >= -128)
nonvcitermcb \op
nonvcbwd bound,\op
- .elseif (\op <= 65535 &&&& \op >= -32767)
+ .elseif (\op <= 65535) && (\op >= -32767)
nonvcitermcw \op
nonvc2 bound.w,\op
nonvc2 bound.d,\op
brgds, H-P
More information about the Binutils
mailing list