Re: How do you alias a register?
Posted:
Mon Apr 20, 2015 1:40 pm
by cmcconnell
#define will work if you use gcc on a file with a .S extension. (gcc will run the file through the C preprocessor before invoking the assembler.)
Re: How do you alias a register?
Posted:
Mon Apr 20, 2015 2:51 pm
by cmcconnell
You're welcome.
I don't know if there are alternatives to using #define which might have advantages. I just stumbled upon the technique while looking through some example code. (Until I saw the example, I hadn't even realised you could use gcc, rather than as, and thus make use of the preprocessor.)