[Solved] GAS: Register equates ?

Erik Christiansen dvalin@internode.on.net
Sat May 18 07:54:00 GMT 2013


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



More information about the Binutils mailing list