This is the mail archive of the
mailing list for the binutils project.
Re: macro's and local variables
On 10/18/2012 05:43 PM, Jan Beulich wrote:
On 10/18/2012 12:42 PM, Jan Beulich wrote:
On 18.10.12 at 17:09, Mischa Baars <firstname.lastname@example.org> wrote:
On 18.10.12 at 10:52, Mischa Baars <email@example.com> wrote:
Since I would like to interface with C, you would get as demonstrated in
the attachments. I didn't know that 'shl' is accepted by the C compiler.
Seems to work for now though.
Maybe you just don't reference the respective symbols from
C source? But even once you do, you could
#define shl <<
guarded by some #if to hide it when translating .S files.
Sounds to me, it would be a better plan to make sure that the assembler
accepts it '<<' both with and without '.altmacro' :)
How would you want to deal with <<> (i.e. a literal '<', without
the quotes) or some such?
Well, if you ask me, 'shl' is not supposed to be built-in operator in C,
perhaps in other languages like Pascal. Personally I would make sure
'shl' is replaced by '<<' in the assembler, and make sure that it would
also compile assembly code with '.altmacro' enabled.