How Many registers?

AARCH64 has a lot of general purpose registers. How many? Lets see.

$ cat simplec.s
.global main
 
main:       MOV X30, #99
 
            MOV     X0, #0
            MOV     X8, #93
            SVC     0
 
ayoung@blue:~/devel/asm$ make simplec
gcc -g -o simplec simplec.s
ayoung@blue:~/devel/asm$ ./simplec

At least 31.

ayoung@blue:~/devel/asm$ cat simplec.s
.global main
 
main:       MOV X31, #99
 
            MOV     X0, #0
            MOV     X8, #93
            SVC     0
ayoung@blue:~/devel/asm$ make simplec
gcc -g -o simplec simplec.s
simplec.s: Assembler messages:
simplec.s:3: Error: operand 1 must be an integer register -- `mov X31,#99'
make: *** [Makefile:10: simplec] Error 1

But not 32.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.