Added GAS functionality
Timothy Wall
twall@alum.mit.edu
Tue Feb 8 06:34:00 GMT 2000
Hi all,
I've got a few features that are really general features but are
currently tied to a specific port. Please speak up if you think any of
these would be generally useful. These are features that were added to
the target for compatibility purposes. Personally, I don't like #2,
because people can put nasty things in the strings that would normally
get eaten by the preprocessor, but now have to be handled by the
assembler (I couldn't find a good way of scrubbing the strings as input
before doing the substitution). Of course, #1 is closely related to #2,
since it essentially involves the same substitution operations.
1) Expanding macro arguments without them having to be explicitly
escaped.
OP .macro ARG1, ARG2
add ARG1, ARG2 // normally, GAS requires \ARG if you want it
substituted.
.endm
OP a, b
expands to:
add a, b
2) Arbitrary strings assigned to symbols:
.asg MYREG, "reg10"
add MYREG, 10 // evaluates to "add reg10, 10"
2a) Forced substitution with "2" above:
.asg INDEX, "10"
label:INDEX:
add INDEX, reg
Evaluetes to
label10
add 10, reg
More information about the Binutils
mailing list