The root cause of this failure is poor handling of high register
pressure by the current C1 backend. C1's UnsafePutRaw instruction,
which implements stores into New I/O direct buffers, requires several
inputs: the Unsafe object, the destination address, the index (if
present), and the value. The current code generation sequence loads
these values into registers in this order. Stores into byte buffers on
x86 require a register for the value which can be treated as a byte,
namely EAX through EDX; in this particular test case, because the
value was being loaded last, and because of the register allocator's
preference in assigning registers, the compiler ran out of byte
registers and could not spill any, leading to an assertion failure.
All x86 C1 releases from 1.4.x through 1.6 have this problem. The
simplest solution is to force the value to be loaded earlier so it has
the best chance of getting a byte register.
###@###.### 2005-03-24 22:02:00 GMT