assembler syntax: low(sym) vs. sym@l
Michael Meissner
meissner@cygnus.com
Fri Jan 26 10:14:00 GMT 2001
On Thu, Jan 25, 2001 at 10:28:00PM -0700, Greg McGary wrote:
> PPC provides this syntax for specifying 16-bit pieces of a word:
> sym@h, sym@ha, sym@l. m32r, OTOH, uses this syntax: high(sym),
> shigh(sym), low(sym).
>
> I need to choose a syntax for a new gas port. Is there a substantial
> reason (i.e., other than aesthetics) for choosing one over the other?
> I'll likely go with @xx suffixes if there's no good reason to prefer
> the other notation.
You do have to make sure that no matter which syntax you use, you can specify
an addition of a constant, ie:
(foo+1)@l
or foo+1@l
or low(foo+1)
That being said, it is probably slightly easier to parse <ref>@l instead of
low(<ref>). Note, if you use the low(...) form, you might want to use some
leading character like '%' such as %low(...).
--
Michael Meissner, Red Hat, Inc. (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482
More information about the Binutils
mailing list