GAS: Register equates ?

Jens Bauer jens-lists@gpio.dk
Sat May 18 03:42:00 GMT 2013


Hi all.

I've searched the docs, but haven't found it so far.
When searching on the net, I find different opinions on how to make register equates (including some source showing a ".reg" directive), but I have not been able to get any of them to work.

So far, I've tried...

        .req    myReg,r12		/* unknown pseudo-op: `.req' */
        .requ   myReq,r12		/* unknown pseudo-op: `.requ' */
        .equr   myReq,r12		/* unknown pseudo-op: `.equr' */
        .eqr    myReq,r12		/* unknown pseudo-op: `.eqr' */
        .reg    myReq,r12		/* unknown pseudo-op: `.reg' */
        .equ    myReg,12		/* does not complain, except from when I want to use the register. */
        .equ    myReg,r12		/* does not complain, except from when I want to use the register. */
		.eqv	myReg,r12		/* does not complain, except from when I want to use the register. */
		.equiv	myReg,r12		/* does not complain, except from when I want to use the register. */
		.set	myReg,r12		/* does not complain, except from when I want to use the register. */
myReg=12						/* does not complain, except from when I want to use the register. */
myReg=r12						/* does not complain, except from when I want to use the register. */


-But none of these seem to allow me to make register-equates.
Note: the .equ myReg,12 would work for AVR, but not for ARM.

So my question is: Is it possible to create register-equates in GAS ?


Love
Jens



More information about the Binutils mailing list