If I use register names I get:
Error: illegal operands `add $t0,$zero,$zero'
If I use register number ($8 instead of $t0 and $0 instead of $zero) it works. (I’m using binutils 2.17).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The GNU assembler doesn’t support symbolic register names directly. A common approach, if using gcc to drive the assembler, is to use the ‘.S’ extension for the assembler source file (which tells gcc to pass the source through the C preprocessor before the assembler) and #include a header file containing definitions like:
Then the assembler source can have statements like