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: [Solved] GAS: Register equates ?

Hi Erik.

Unfortunately I have to do without info. I also have to do without apt-get; I have only PowerMacs (eg. no intel).
...But regarding register equates...

On AVR, try...
...and you will see it does not work.

You can also try...
 .equ rHasToWork,22
...This won't work either.
But try the same with...
rColor req r17
rHasToWork req r22
...and see if it does.

In other words: *ANY* equate that starts with lowercase 'r' would not work for me, when I wrote some assembly-code for AVR.
I ended up using the preprocessor #define instead (but I prefer to avoid the preprocessor now).


On Sat, 18 May 2013 17:54:29 +1000, Erik Christiansen wrote:
> On 18.05.13 06:48, Jens Bauer wrote:
>>> So my question is: Is it possible to create register-equates in GAS ?
>> I figured out (by going through the GAS source) that I need to use...
>> myReg   .req    r12
>> -This seems to work. :)
> For ARM, according to "info gas". There's a description in "9.3.4 ARM
> Machine Directives". (Is an "apt-get install binutils-doc" perhaps
> required?)
> For other architectures, I find that either:
> ; Register synonyms:
>    Z      = 30             ; r31:r30 (e.g. For use with adiw)
>    ZL     = 30             ; r30
>    ZH     = 31             ; r31
> and
>    .equ r30, 30
>    .equ r31, 31
> work fine on those tried.
> Erik
> -- 
> manual, 
> n.:                                                                   
> A unit of documentation. There are always three or more on a given 
> item.      
> One is on the shelf; someone has the 
> others.                                 
> The information you need is in the others.               - Ray Simard

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