Allocate XMM registers for doubles
commitd7708fde5badb0a28a0bd53402c57de29b749744
authorGuilherme Ottoni <ottoni@fb.com>
Sun, 12 May 2013 08:58:35 +0000 (12 01:58 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 May 2013 20:52:29 +0000 (20 13:52 -0700)
tree6f21679d37e02893088c2b31cd3ffbc154245ab4
parent5c491af2de6fa58ec8accda2359f1a7af43e651e
Allocate XMM registers for doubles

This diff adds support for allocating SSATmp's of type Dbl directly to
XMM registers. The register allocator now keeps per-reg-type lists of
caller/callee saved registers.  xmm0 and xmm1 are reserved for scratch
as rXMMScratch[01].

Added a runtime option HHIRAllocXMMRegs to enable/disable XMM
allocation -- if disabled, it forces all SSATmps to be allocated to GP
regs, as before.

While here, changed the conversion of int/bool consts to double from
runtime conversions to JIT-time.
15 files changed:
hphp/runtime/base/runtime_option.h
hphp/runtime/vm/translator/abi-x64.h
hphp/runtime/vm/translator/hopt/check.cpp
hphp/runtime/vm/translator/hopt/codegen.cpp
hphp/runtime/vm/translator/hopt/codegen.h
hphp/runtime/vm/translator/hopt/irfactory.h
hphp/runtime/vm/translator/hopt/linearscan.cpp
hphp/runtime/vm/translator/hopt/print.cpp
hphp/runtime/vm/translator/hopt/tracebuilder.h
hphp/runtime/vm/translator/physreg.h
hphp/runtime/vm/translator/translator-x64-internal.h
hphp/runtime/vm/translator/translator-x64.cpp
hphp/test/quick/xmm-spill1.php [new file with mode: 0644]
hphp/test/quick/xmm-spill1.php.expect [new file with mode: 0644]
hphp/util/asm-x64.h