Extend the general-purpose/vector register test for AArch64 to test
all regular registers rather than just the first eight. While this
might seem redundant, we've historically had a bug in reading a single
registers due to a typo.
While at it, use a single array of values for the test. I have
permitted myself to use a different values that were relatively easy
to generate via the following script:
for x in range(32): print(' { ', end='') for y in range(2): print('0x', end='') for z in range(8): print('%02X' % (x+(1-y)*8+z), end='') if y == 0: print(', ', end='') print(' },')
x8 is used as the special register to hold the data pointer, as this
is what clang is forcing on my system (and it should use it anyway since
it's the only register not in the clobber list), so it is overwritten
last. x29 (fp) is backed up on the stack. The stack pointer (x31)
is tested via pushing the respective value to the stack and then reading
it rather than modifying it directly.
I'm not quite sure what this bit actually tests, with regards to inspecting registers - as it loads a value to a simple register and writes it somewhere else. I guess the thing it tests is expressions involving $sp though?
I guess that's fine but it'd be nice to have it spelled out a bit clearer about the aspect that it actually tests.