Search code examples
assemblyarmcpu-registers

ARM Assembly - what's the difference between v1 and a1 registers?


I'm currently playing around with the arm simulator called armulator. While looking at some small programs I see registers v1 and a1 being used. What's the difference between the two?


Solution

  • I'm going to assume you're really asking "what do the 'a' and 'v' mean?", and answer that instead.

    The procedure call standard designates some registers as being primarily for "arguments" and "variables", and permits referring to them as such by synonyms:

    register  synonym
     r0        a1
     r1        a2
     r2        a3
     r3        a4
     r4        v1
     r5        v2
     r6        v3
     r7        v4
     r8        v5
     r9        v6
     r10       v7
     r11       v8