This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: macro's and local variables

On 10/16/2012 08:00 PM, Ian Lance Taylor wrote:
On Mon, Oct 15, 2012 at 2:24 AM, Mischa Baars <> wrote:
Who can take a look at this example code? When you look at the files
attached, you will see that the two different macro's give different answers
to the same problem.
I don't understand.  Of course the different macros give different
answers, because the macros are different.  One uses ax and one uses
That's only because you can then see the difference in the objdump output file.
Also one uses i and the other uses j, and that matters because
you are invoking them in a loop that also uses i.
This is exactly what I'm pointing at. Apart from the register naming, I was expecting the same values to be assigned to the respective registers. This does not happen, because 'i' is not a local but a global value.
You need to tell us
what you expected to happen, and the difference between what you
expected to happen and what actually happened.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]