Change vixl's internal stack pointer constant
commit86f5c0d1a63ae111df56631180be76766455599d
authorOwen Yamauchi <oyamauchi@fb.com>
Mon, 16 Dec 2013 19:33:33 +0000 (16 11:33 -0800)
committerSara Golemon <sgolemon@fb.com>
Tue, 17 Dec 2013 18:30:30 +0000 (17 10:30 -0800)
tree9208848c3a1b786de6c10f9a83e9904f089cc239
parent5a6d2d52544b25e12cf8f3b1736014047d6b03da
Change vixl's internal stack pointer constant

This was a little tricky. On ARM machines, register number 31 is the
stack pointer. However, in some encodings, register number 31 refers to
a virtual "zero" register (basically the /dev/zero of registers). To
make sure that you don't accidentally use the wrong one with the wrong
encoding, vixl uses register number 63 to identify the stack pointer
(does not exist in hardware) and converts it to 31 while assembling.

This means that vixl uses 33 different register codes, so I'm changing
PhysReg to reflect this. This means we can now only represent 31 SIMD
register on ARM. I think this is preferable over losing the stack
pointer / zero register distinction in vixl.

Reviewed By: @edwinsmith

Differential Revision: D1100167
hphp/runtime/vm/jit/phys-reg.h
hphp/vixl/a64/assembler-a64.h
hphp/vixl/a64/instructions-a64.h