MIPS64: Improve non-trivial 64-bit constant loading.

- Add special case where the upper 32 bits of the constant are equal to
  the lower 32 bits of the constant. Use the "dinsu" instruction to
  replicate the bottom 32 bits into the top 32 bits.

- Test output of LoadConst32()/LoadConst64() against various test
  constants.
  o Make the implementation of LoadConst64() into a template.
  o Using the template code for LoadConst64() implement test
    cases which simulate the computation of the value which the
    generated code sequence is actually supposed to load.
  o Add conditionally compiled code to verify that all of the
    various data paths through the LoadConst64() function
    actually get exercised.

Test: Booted MIPS64 in QEMU, and ran assembler tests.

Change-Id: Ie1ec050e65c666168a9ea582bae9fda97e4cf36a
3 files changed