This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: assembler syntax: low(sym) vs. sym@l
- To: greg at mcgary dot org
- Subject: Re: assembler syntax: low(sym) vs. sym@l
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Fri, 26 Jan 2001 16:28:05 +0100
- CC: binutils at sources dot redhat dot com
> Date: Thu, 25 Jan 2001 22:28:00 -0700
> From: Greg McGary <greg@mcgary.org>
>
> 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.
Just as an alternative :-) you could also catch the right piece
with "(symexpr >> N) & 65535", N = 0, 16, 32, 48. That means
you need to do a bit more hacking to inspect the operand
expression, though.
brgds, H-P